# Support for making talking creatures

**URL:** <https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073>\
**Category:** The Drawing Board\
**Created:** [November 17, 2013, 11:33pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073 "2013-11-17T23:33:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fniff](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@Fniff](https://discourse.cataclysmdda.org/u/Fniff)\
**Post date:** [November 17, 2013, 11:33pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/1 "2013-11-17T23:33:13Z")

</div>

So, based on [earlier discussions,](http://smf.cataclysmdda.com/index.php?topic=4037.0) I decided to try modding in humans. I used the parrot flag that is usually only used on Mi’go to allow them to speak. Since the humans I modded in were meant to be psychotics, it made sense that they were saying random gibberish, but a few lines were kinda off and it wouldn’t work for more complicated humans like rogue army soldiers or dangerous criminals. So, I think there should be an option to have choose what your monster says. You’d find the dialog json file, put in a new entry with the new lines, then put the name of the entry in a part of the monster’s entry.

Another thing could tags for individual lines that make sure they are only said in specific situations. This would prevent enemies from saying lines that don’t fit the context or behaving oddly (Like having no real reaction to their friends dying, or saying “Time to die, motherfucker!” when they haven’t spotted the player), which would be handy.

What do you guys think?

---

<div class="post-metadata">

**Author:** ![Sidower](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/sidower/32/127_2.png) [@Sidower](https://discourse.cataclysmdda.org/u/Sidower)\
**Post date:** [November 18, 2013, 3:02pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/2 "2013-11-18T15:02:00Z")

</div>

I support this. It also would be quite awesome having the zombies moaning around while walking, or wolfs howling during the night, right before attacking you.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 18, 2013, 4:29pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/3 "2013-11-18T16:29:02Z")

</div>

I slurped the existing dialog-handling stuff\* into speech.cpp, and added a field to allow differntiating speakers, an entry looks like this now:

```auto
{
    "type" : "speech",
    "speaker" : "migo",
    "sound" : "\"Hello?\"",
    "volume" : 10
},
{
    "type" : "speech",
    "speaker" : "creepy_doll",
    "sound" : "Do you really need that much honey?",
    "volume" : 10
}
```

It’d be pretty easy to add some optional fields for mood or similar.  
If we want to do it with more monsters, we probably want to dedicate a speech flag to it that matches the “speaker” field I added, that way you can add everything you need in json. I can see a mod with zombies walking around saying random crap being really funny, just not for the main game 😉

\*Completely independent of this request, heh.

---

<div class="post-metadata">

**Author:** ![Fniff](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@Fniff](https://discourse.cataclysmdda.org/u/Fniff)\
**Post date:** [November 18, 2013, 5:16pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/4 "2013-11-18T17:16:40Z")

</div>

Well, for zombies, I think it’d be just random moans and groans. Of course, this’d actually be a great way to introduce idle actions as well, but that’s another topic.

---

<div class="post-metadata">

**Author:** ![GrizzlyAdamz](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/grizzlyadamz/32/8056_2.png) [@GrizzlyAdamz](https://discourse.cataclysmdda.org/u/GrizzlyAdamz)\
**Post date:** [November 18, 2013, 5:21pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/5 "2013-11-18T17:21:57Z")

</div>

You’d also need to make sure monsters know who’s making the sound, otherwise they’ll be attracted to their own moans.

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [November 18, 2013, 5:36pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/6 "2013-11-18T17:36:37Z")

</div>

Kevin - there should probably be a way to control FREQUENCY of speaking too, through the JSONs. Not sure the best way to add that though.

Also, I’m totally adding a Christian Bale monster once this gets in. “What don’t you fucking understand?”

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 18, 2013, 5:40pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/7 "2013-11-18T17:40:00Z")

</div>

Seems like frequency would be tied to the monster, not the text.  
I’m not sure if anything more sophisticated than, “randomly spout phrases from this list” can be handled automatically from json, but I’d love to be proven wrong.

---

<div class="post-metadata">

**Author:** ![jimboblordofeskimos](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jimboblordofeskimos/32/2_2.png) [@jimboblordofeskimos](https://discourse.cataclysmdda.org/u/jimboblordofeskimos)\
**Post date:** [November 18, 2013, 5:46pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/8 "2013-11-18T17:46:51Z")

</div>

Make the child zombies all sing ring around the rosie next halloween.

---

<div class="post-metadata">

**Author:** ![Fniff](https://avatars.discourse-cdn.com/v4/letter/f/ecd19e/32.png) [@Fniff](https://discourse.cataclysmdda.org/u/Fniff)\
**Post date:** [November 18, 2013, 5:48pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/9 "2013-11-18T17:48:21Z")

</div>

[quote=“Kevin Granade, post:7, topic:4073”]Seems like frequency would be tied to the monster, not the text.  
I’m not sure if anything more sophisticated than, “randomly spout phrases from this list” can be handled automatically from json, but I’d love to be proven wrong.[/quote]  
Why not have it so that every phrase is tied to a flag? You’d only need a few for various situations that would crop up a lot, like the monster being injured or just idling without having noticed the player.

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [November 18, 2013, 5:52pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/10 "2013-11-18T17:52:12Z")

</div>

[quote=“Kevin Granade, post:7, topic:4073”]Seems like frequency would be tied to the monster, not the text.  
I’m not sure if anything more sophisticated than, “randomly spout phrases from this list” can be handled automatically from json, but I’d love to be proven wrong.[/quote]  
I do agree that it should be defined as part of the monster, I’m just saying it’s worth at least figuring out a way to define it as part of the monster.

Since I’ll be doing the next stage of the monster rewrite this week, I could easily stick an optional “dialogue frequency” variable in if you want to use it.

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 18, 2013, 6:45pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/11 "2013-11-18T18:45:46Z")

</div>

We could stand to have a little structure, maybe have a speech section with parameters.

```auto
{
    "type" : "monster",
    "id" : "migo",
    ...
    "speech" : { "phrase_list" : "migo", "frequency" : 100 }
}
```

---

<div class="post-metadata">

**Author:** ![GlyphGryph](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/glyphgryph/32/847_2.png) [@GlyphGryph](https://discourse.cataclysmdda.org/u/GlyphGryph)\
**Post date:** [November 18, 2013, 6:52pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/12 "2013-11-18T18:52:45Z")

</div>

Yeah, that’s the sort of thing I was thinking of. It looks good to me, doing it like that instead of using the flags system.

---

<div class="post-metadata">

**Author:** ![i2amroy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/i2amroy/32/909_2.png) [@i2amroy](https://discourse.cataclysmdda.org/u/i2amroy)\
**Post date:** [November 19, 2013, 4:04pm UTC](https://discourse.cataclysmdda.org/t/support-for-making-talking-creatures/4073/13 "2013-11-19T16:04:47Z")

</div>

Agreed, something like that seems like it would work rather nicely. 🙂
