Stand and fight!

I would like a don’t move key, so i can stand and kill the zombies when they steps into the doorway. Now i can accidently step into it and get grabbed, beated etc.

Try using tab, it automatically attacks a nearby enemy, or waits a turn if nothing is nearby.

3 Likes

I can’t believe i didn’t know that! :man_facepalming:
Thank you!

Edit: now i would mark this as answered, but i don’t see the solution icon at Shard’s comment, so i can’t. Interesting.

I would like to have an instruction I could give to an NPC that told them to move toward me if I was being attacked, but then not move away. The current AI has “only attack foes you can reach without moving” or “attack nearby foes.” The first will prevent the NPC from moving a single tile to defend my survivor from attackers; the second will cause the NPC to climb out of windows to attack the zombie that is two tiles away. I want an NPC that will move to defend me, but won’t go chasing after zombies. Is that too much to ask?

Unfortunately, that is a lot harder to do than it sounds. Additionally, AI code is a nightmare that almost no one wants to touch.

That feature is only enabled in q&a oriented subforums (e.g. the garage). It doesn’t really make sense to “answer” a design discussion.

1 Like

I had really hoped that I’d bounded it enough to be relatively easy:
on each turn, the NPC checks to see if a monster has attacked me since the NPC’s last turn. Hopefully that is something can be determined.
If one or more monster has attacked, the NPC moves toward the closest, lowest move count square that allows the NPC to attack that monster, favoring squares that are adjacent to me. A little more complex but close enough.

I’d be fine with the NPC asking me to get out of the way (the way they already do) if I’m blocking a doorway and the monster is on the other side.

I guess I should go look into the NPC AI code.

1 Like