# Couple of questions about military robots

**URL:** <https://discourse.cataclysmdda.org/t/couple-of-questions-about-military-robots/8663>\
**Category:** The Lab\
**Created:** [January 18, 2015, 9:57am UTC](https://discourse.cataclysmdda.org/t/couple-of-questions-about-military-robots/8663 "2015-01-18T09:57:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florin](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@Florin](https://discourse.cataclysmdda.org/u/Florin)\
**Post date:** [January 18, 2015, 9:57am UTC](https://discourse.cataclysmdda.org/t/couple-of-questions-about-military-robots/8663/1 "2015-01-18T09:57:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [January 18, 2015, 4:51pm UTC](https://discourse.cataclysmdda.org/t/couple-of-questions-about-military-robots/8663/2 "2015-01-18T16:51:06Z")

</div>

[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.

---

<div class="post-metadata">

**Author:** ![Florin](https://avatars.discourse-cdn.com/v4/letter/f/91b2a8/32.png) [@Florin](https://discourse.cataclysmdda.org/u/Florin)\
**Post date:** [January 18, 2015, 11:27pm UTC](https://discourse.cataclysmdda.org/t/couple-of-questions-about-military-robots/8663/3 "2015-01-18T23:27:17Z")

</div>

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.
