One NPC is immidiately finished with work (git 00efc6d7fe)

Hello.

I have been experimenting lately with NPC zones and hit my first issue: I have one NPC complete their assigned task after about 2 hours of working on repairing a vehicle with another NPC. He has mechanics 3 and there are still many parts of that vehicle to repair <= mech3. I have a basecamp storage zone with nearly 2 full charged arc welders, 2 welding masks, 2 pliers, 1 wrench and a few bone glues. When ordering it back to work, it waits a few seconds and again “completed their assigned task”. The other NPC is still busy at work.

Talking->c does not yield any status of being unable to work. I have no_npc_needs on and no food zone defined.

What could be wrong here?

The things to repair were right beside the wall, so when I moved the car by 1 tile, the NPC went back to work. But it approached those parts through the inside of the car.

Another issue is with tools: there is a quarterpanel left to repair (uses 150 charges of arc welder) and I have two arc welders, one with 100 charges and other with 500. The NPC completed the assigned task anyway, without repairing that quarterpanel.

the only thing i can think of is try spacing the tools out, have one set of tools next to one worker, and the other set next to the other, and see if their behavior changes

(honestly though, i havent messed with NPC’s that much, because getting them to do stuff properly seems to be a pain, due to their false autonomy.)

I have also noticed that NPCs will use items from outside the storage zone… much to my sadness for those 70 units of duct tape…

This time it ran out of materials/tools, and when I moved them closer it resumed working upon being told so. Of course there was no message in log stating that they ran out of tools/material.

I suspect there’s an issue with the arc welders. When I’ve spawned a bunch of them, loaded them with batteries and had companions build base camp facilities out of metal I get traceback messages for the ones out of charges (but the task is performed after getting through the messages). I suspect the code looking for charges doesn’t handle (partial) charge depletion resulting in insufficient charges correctly, which may cause the companion to give up rather than use the next welder.

I’ve noticed another thing, the required tools must be within 5 or so tiles of the job in question. That was probably the true reason why moving the car earlier made the workers carry on.