Couple of questions about military robots

I’m working on a small personal mod to make military bots/turrets recognise characters with a military profession and refrain from shooting them. Two questions:

  • Aside from milspec turrets, are there any other military-aligned critters that would not target military personnel? Tank drones? I don’t know what’s considered military and what’s considered law enforcement.

  • I’m basing this off the code that stops bots/turrets from targeting mutants. It works fine, but I’ve had to disable the part of it that checks the monster’s current vs max health to determine whether it’s been attacked, since that doesn’t account for health lost via monster infighting. Unfortunately that means that at the moment the player can attack the monster with impunity and it will never react. Is there any existing code I could co-opt for the purpose of checking whether the player has specifically attacked the critter to elicit a response from it?

Thanks.

[quote=“Florin, post:1, topic:8663”]I’m working on a small personal mod to make military bots/turrets recognise characters with a military profession and refrain from shooting them. Two questions:

  • Aside from milspec turrets, are there any other military-aligned critters that would not target military personnel? Tank drones? I don’t know what’s considered military and what’s considered law enforcement.

  • I’m basing this off the code that stops bots/turrets from targeting mutants. It works fine, but I’ve had to disable the part of it that checks the monster’s current vs max health to determine whether it’s been attacked, since that doesn’t account for health lost via monster infighting. Unfortunately that means that at the moment the player can attack the monster with impunity and it will never react. Is there any existing code I could co-opt for the purpose of checking whether the player has specifically attacked the critter to elicit a response from it?

Thanks.[/quote]

Antimateriel turrets are military, as are chicken bots and tank drones.

I rigged the turrets that way specifically because there’s no such code, to my knowledge.

If nothing else, I know NPC behaviour can differentiate between damage taken from other sources and attacks made by the player, but that looks too complicated for me to figure out. Oh well.