Currently, responses can key off NPC effects or player traits. It’ll be easy for me to add having them key off an NPC trait. After that is added, you’ll be able to set a trait in the npc class definition and then add a response based on it. NPC traits can be set up as distributions, so you can make them exclusive.
So you’d end up with something like:
{
"type" : "npc_class",
"id" : "NC_NONE",
"name" : "Hunter",
"traits": [
[ "NPC_HUNTER_STORY1", 100 ]
]
},
{
"type" : "npc_class",
"id" : "NC_NURSE",
"name" : "Nurse",
"traits": [
{
"type": "trait_group",
"id": "trait_group_NONADDICTIVE",
"subtype": "distribution",
"traits": [
{ "trait": "NPC_NURSE_STORY1" },
{ "trait": "NPC_NURSE_STORY2" }
]
}
]
},
{
"id": "TALK_LEADER",
"type": "talk_topic",
"response": [
{ "text": "I'd like to know your background.", "topic": "TALK_HUNTER_STORY_1", "condition": { "npc_has_trait": "NPC_HUNTER_STORY1" } },
{ "text": "I'd like to know your background.", "topic": "TALK_NURSE_STORY_1", "condition": { "npc_has_trait": "NPC_NURSE_STORY1" } },
{ "text": "I'd like to know your background.", "topic": "TALK_NURSE_STORY_2", "condition": { "npc_has_trait": "NPC_NURSE_STORY2" } }
]
},
{
"id": "TALK_HUNTER_STORY_1",
"type": "talk_topic",
"dynamic_line": "My twin brother and I were raised by wolves after our mother died in childbirth.",
"response": [ { "text": "You're kidding, right?", "topic": "TALK_HUNTER_STORY_1b" } ]
},
{
"id": "TALK_NURSE_STORY_1",
"type": "talk_topic",
"dynamic_line": "I always wanted to be a doctor, but I didn't study enough in college to pass the MCATs.",
"response": [ { "text": "That's a shame.", "topic": "TALK_NURSE_STORY_1b" } ]
},
{
"id": "TALK_NURSE_STORY_2",
"type": "talk_topic",
"dynamic_line": "I got a job as an EMT after high school, but decided trauma medicine was too traumatic.",
"response": [ { "text": "Ironic, given the current circumstances.", "topic": "TALK_NURSE_STORY_2b" } ]
},
{
"type" : "mutation",
"id" : "NPC_HUNTER_STORY1",
"name" : "Hunter background 1",
"points" : 0,
"description" : "This hunter was raised by wolves.",
"valid": false,
"purifiable": false
},
{
"type" : "mutation",
"id" : "NPC_NURSE_STORY1",
"name" : "Nurse background 1",
"points" : 0,
"description" : "This nurse was a failed pre-med student.",
"valid": false,
"purifiable": false
},
{
"type" : "mutation",
"id" : "NPC_NURSE_STORY2",
"name" : "Nurse background 2",
"points" : 0,
"description" : "This nurse was an EMT.",
"valid": false,
"purifiable": false
}
I may have gotten the syntax on the trait distribution group slightly wrong, but if you look at data/mods/NPC_Traits/ you’ll see how to set it up.