From 9e5b682b725face1c57168f9873cce7c4d5e8ef8 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Fri, 11 Aug 2023 02:08:10 -0700 Subject: [PATCH] Passerby character with more dialog, to teach ai when it's weird to speak --- assets/drama.mdesk | 14 +++++++++++++- character_info.h | 8 +++++++- main.c | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/assets/drama.mdesk b/assets/drama.mdesk index f6dde60..d27330a 100644 --- a/assets/drama.mdesk +++ b/assets/drama.mdesk @@ -1,5 +1,4 @@ [ - {can_hear: [NPC_Daniel, NPC_Raphael]} {enum: NPC_Devil, dialog: "What's up cracker jack", to: Daniel} {enum: NPC_Daniel, dialog: "What the hell are you talking about?", to: Devil} @@ -22,6 +21,19 @@ {enum: NPC_Devil, dialog: "I'll take my leave them. Until next time!", to: Daniel} {enum: NPC_Raphael, dialog: "What a psycho...", to: Daniel} +{can_hear: [NPC_Daniel, NPC_Raphael, NPC_Passerby]} +{enum: NPC_Passerby, dialog: "Yo", to: Raphael} +{enum: NPC_Raphael, dialog: "What's up", to: Passerby} +{enum: NPC_Passerby, dialog: "What do you think of farmers", to: Raphael} +{enum: NPC_Raphael, dialog: "What?", to: Passerby} +{enum: NPC_Daniel, dialog: "Let me 'say somthin here. Farmers are the backbone of this town, so you'd best give them some respect", to: Passerby} +{enum: NPC_Raphael, dialog: "I mean, scientists really are what's most important", to: Daniel} +{enum: NPC_Daniel, dialog: "First of all, what the hell is a scientist? Second of all, whoever they are, if they can't eat they're worthless!", to: Raphael} +{enum: NPC_Raphael, dialog: "FIne fine whatever, no need to get heated...", to: Daniel} +{enum: NPC_Daniel, dialog: "Anyways, sorry about that. What's your name?", to: Passerby} +{enum: NPC_Passerby, dialog: "Nevermind I'll just take my leave, later.", to: Daniel} + + /* {can_hear: [NPC_WellDweller, NPC_Farmer, NPC_ManInBlack]}, {enum: NPC_WellDweller, dialog: "What a fearful farm you live in, come down to the well, the grass is damper down here.", to: Farmer, mood: Scared, thoughts: "Nobody can take me from my well"}, diff --git a/character_info.h b/character_info.h index 6c4b0a8..0340679 100644 --- a/character_info.h +++ b/character_info.h @@ -77,4 +77,10 @@ CharacterGen characters[] = { .name = "The Devil", .enum_name = "Devil", .prompt = CHARACTER_PROMPT_PREFIX("The Devil") "strange red beast, the devil himself, evil incarnate. You mercilessly mock everybody who talks to you, and are intending to instill absolute chaos.", - },}; + }, + { + .name = "Passerby", + .enum_name = "Passerby", + .prompt = CHARACTER_PROMPT_PREFIX("Random Passerby") "random person, just passing by", + }, +}; diff --git a/main.c b/main.c index 94f6560..c51f68d 100644 --- a/main.c +++ b/main.c @@ -2154,7 +2154,7 @@ void initialize_gamestate_from_threedee_level(GameState *gs, ThreeDeeLevel *leve if(!found) { - PushWithLint(scratch.arena, &drama_errors, "Couldn't find NPC of kind %s in the current map", characters[want].enum_name); + Log("Warning: NPC of kind %s isn't on the map, but has entries in the drama document\n", characters[want].enum_name); } } Log("Propagated to %d name '%s'...\n", want, characters[want].name);