# Interacting with a NPC on guard

**URL:** https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560
**Category:** The Bunker
**Created:** [January 24, 2020, 5:16am UTC](https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560 "2020-01-24T05:16:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Lorelei43](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@Lorelei43](https://discourse.cataclysmdda.org/u/Lorelei43)
#### Post date: [January 24, 2020, 5:16am UTC](https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560/1 "2020-01-24T05:16:02Z")

</div>

Why exactly this possibility is removed (except for the only possible option, switching off guard duty?)

That’s a bother because it would seem convenient to have NPCs stay on guard duty while you talk to them for inventory transfer for example. I don’t want them all to bunch against me while I rummage through my 1000+ items…

---

<div class="post-metadata">

### Author: ![Mega\_Glub](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mega_glub/32/5063_2.png) [@Mega\_Glub](https://discourse.cataclysmdda.org/u/Mega_Glub)
#### Post date: [January 24, 2020, 6:53am UTC](https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560/2 "2020-01-24T06:53:31Z")

</div>

It probably has something to do with the way NPCs are programmed to do tasks, in that they can only do one task at a time and don’t have a task “queue”. When an NPC completes a task it probably changes their “idle?” state from false to true, meaning that an NPC has to be idle at least once before getting a new task. Since guarding is an infinite task, the only way to get an NPC to go back to being idle in order to assign a new task is to give them the command.

It honestly probably wouldn’t be too hard to fix this, but it’s not a very pressing issue.

---

<div class="post-metadata">

### Author: ![dpwb](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/dpwb/32/2609_2.png) [@dpwb](https://discourse.cataclysmdda.org/u/dpwb)
#### Post date: [January 24, 2020, 11:21am UTC](https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560/3 "2020-01-24T11:21:16Z")

</div>

Pretty much.

I actually don’t see many issues arising from simply giving them the same dialogue options as a follower, but with the option of " follow me " being there if they are on guard.

But as with most things NPC code, seemingly simple changes snowball with bizarre bugs until a 1 line change results in them wearin their underpants on their head and eating plutonium.

---

<div class="post-metadata">

### Author: ![mlangsdorf](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mlangsdorf/32/2462_2.png) [@mlangsdorf](https://discourse.cataclysmdda.org/u/mlangsdorf)
#### Post date: [January 24, 2020, 6:16pm UTC](https://discourse.cataclysmdda.org/t/interacting-with-a-npc-on-guard/22560/4 "2020-01-24T18:16:15Z")

</div>

Internally, I think I would want to create a new `TALK_` option, `TALK_SAME`, which would return to the same talk topic (instead of `TALK_NONE` returning to the previous talk topic). Then some of the topics in `TALK_FRIEND` could change their next topic to `TALK_SAME` instead of `TALK_FRIEND`, and `TALK_FRIEND_GUARD` could share most topics with `TALK_FRIEND` and `TALK_RADIO`. We could move the greetings and good-byes to the individual topics.

I think you just added `TALK_FRIEND_GUARD` to `TALK_FRIEND` right now, you’d get a weird situation where you could tell people to guard twice and stuff. But the kind of restructuring I’m talking about should be too hard.
