NPC do not tractor in stuff and freeze(not about loot_preference line)
-
Suddenly encountered such a problem:
I gave some volume to guns, now guns take some cargo space. In case with a player I can’t tractor in guns with huge volume flying starflier, for example battleship turrets that have volume = 500 line(just an example). And can’t tractor in smaller guns when my cargo is full. Just the way it should be.
Npcs cant tractor in those turrets too, but they just sit still without moving trying to do it. after I destroy the gun, npc will get back to their job.So, an example.
Npc ship has cargo space volume of 70.
40 is occupied with ammo and cargo.
Looted gun volume is 50.
NPC tries to tractor it in(cos npc still has cargo space left I guess) but fails, and just freezes in space without moving until I destroy the looted gun.I guess it’s a bad idea to give a volume less or more than 1 to something in freelancer.
Anybody knows how to fix this???
Guess a hack is needed again:(
-
I’m sorry to bump this, but it doesn’t appear to be working. I’m seeing a lot of NPCs just hanging around in space doing nothing, and I’ve tried putting the plugin on the server only and on the server and client to no avail.
Could there be something specific to MP?
-
I copied Aggressor 1K from the Manhattan Docking Ring, giving the Gunslinger a volume of 100. Started Solo MP, shot it and the NPCs hung around. Added chklootvol to the client, they still hung around. Added it to the server, they moved on. Seems to be working fine, maybe it’s not volume related?
-
Hmm…
One thing I noticed is that when the NPCs first spawn and notice the loot, the Volume function you made gets called very rapidly, but if I remove the breakpoint and add it back in a second later, it’s no longer tripped until new NPCs spawn.
I also believe that they can usually tractor a part of the loot in the loot container, but not all of it. They’ll tractor in the first part, but then hang around trying to tractor the rest. If I blow up all the loot, they’ll move on. Could it be a problem with updating the cargo capacity remaining?
-
Okay, this time I copied Flint, replacing the Cardamine with 200 Diamonds, each with volume 10. Again, they all moved on, except for the Repair Ship. There’s two things different about it - it has no tractor and it’s a transport (unlike the Heavy Lifter, which also has no tractor, but it’s a fighter and it moved on). Since you’ve got a debugger, try NOPping the jump at 62CEBF8 and see if that helps (I don’t think it will, since I think it just controls movement). Otherwise, try patching get_cargo_hold_remaining to return 0 and see if that has an effect. If it does, restore it and find the right call…
-
Sorry to bump this once more:
I noticed that your plugin does not cover the case of nano bots and shield batteries. NPCs will try to loot them, but freeze if their limit is reached.
-
Thanks anyway. Then the workaround is just to set NPCs not to loot nanobots/batteries at all.