# Adding NPCs to mods

**URL:** https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635
**Category:** The Lab
**Created:** [October 2, 2015, 9:36pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635 "2015-10-02T21:36:04Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 2, 2015, 9:36pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/1 "2015-10-02T21:36:04Z")

</div>

I want to add an NPC that when you start at a location, they will have dialogue to chose from and then follow you like a regular NPC. I added the npc.json file with my NPC, along with test TALK file and NC file, I added the NPC in the mapgen but It will not spawn…

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 6:43am UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/2 "2015-10-03T06:43:18Z")

</div>

Hmm. First, I’m assuming you’ve looked at the bandit camp’s mapgen or other NPC-spawning mapgens to see how the function is formatted?

Second, and the more obvious question, is static NPCs on in the wold you’re testing this with?

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 5:02pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/3 "2015-10-03T17:02:24Z")

</div>

…_Turns on Static NPCs_…Why am so stupid!..

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 5:11pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/4 "2015-10-03T17:11:24Z")

</div>

It’s fine, I’ve made worse mistakes than that. o3o

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 5:29pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/5 "2015-10-03T17:29:14Z")

</div>

How do I make the dialoge ask the npc to follow the player? The whole “Why should I join you?”

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 5:43pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/6 "2015-10-03T17:43:47Z")

</div>

Hmm. Trying to find the conversation hook for that…

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 6:19pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/7 "2015-10-03T18:19:25Z")

</div>

found it! TALK\_AGREE\_FOLLOW

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 6:23pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/8 "2015-10-03T18:23:24Z")

</div>

Ah, nice. o.o

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 9:32pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/9 "2015-10-03T21:32:38Z")

</div>

Its always something…is there a way to change the npc’s attitude via .json?

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 9:52pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/10 "2015-10-03T21:52:53Z")

</div>

Certain conversation responses should be able to adjust attitude. I wish that I knew how to add it to other checks, like checking for profession and such.

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 9:59pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/11 "2015-10-03T21:59:52Z")

</div>

I added this as a response thinking it would work…`{
                "text": "Lets go then.",
                "attitude": "NPCATT_FOLLOW"
,
                "topic": "TALK_AGREE_FOLLOW"`  
It will show "Lets go then as a response and the topic makes it go to the follower npc menu but the attitude portion doesn’t work. It doesn’t create an error, it just doesn’t work…

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 3, 2015, 10:01pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/12 "2015-10-03T22:01:07Z")

</div>

Hmm, odd. Definitely something I haven’t experimented with enough. @\_@

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 3, 2015, 10:03pm UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/13 "2015-10-03T22:03:16Z")

</div>

I guess I will just keep poking at it until it works. Thanks anyway for you help.

---

<div class="post-metadata">

### Author: ![vache](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@vache](https://discourse.cataclysmdda.org/u/vache)
#### Post date: [October 4, 2015, 1:18am UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/14 "2015-10-04T01:18:21Z")

</div>

Enable debug messages with ~. I’ve noticed some NPCs will agree to follow you then cannot walk anywhere. The debug information even states that they’re trying to follow you, but they never move at all.

---

<div class="post-metadata">

### Author: ![Noctifer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/noctifer/32/458_2.png) [@Noctifer](https://discourse.cataclysmdda.org/u/Noctifer)
#### Post date: [October 4, 2015, 3:27am UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/15 "2015-10-04T03:27:00Z")

</div>

The problem is that when I exit a conversation with the npc, when I talk to them again the same conversation starts from the beginning instead of the follower menu.

---

<div class="post-metadata">

### Author: ![Random\_dragon](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Random\_dragon](https://discourse.cataclysmdda.org/u/Random_dragon)
#### Post date: [October 4, 2015, 4:08am UTC](https://discourse.cataclysmdda.org/t/adding-npcs-to-mods/10635/16 "2015-10-04T04:08:29Z")

</div>

Huh, odd…
