Skip to content

Commit

Permalink
Fix NPC dialog around lying and succeeding mission
Browse files Browse the repository at this point in the history
JSON refactoring for dialog changed some outcomes and chances with the
mission dialogs. This brings the chances and results back in line with
what they were before the JSON refactor.

Fixes #27971
  • Loading branch information
mscarter committed Jan 31, 2019
1 parent e6e1890 commit a11526b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 35 deletions.
82 changes: 48 additions & 34 deletions data/json/npcs/TALK_COMMON_MISSION.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,91 +128,108 @@
"condition": "mission_failed",
"trial": { "type": "LIE", "difficulty": 10, "mod": [ [ "TRUST", 3 ] ] },
"success": { "topic": "TALK_NONE" },
"failure": { "topic": "TALK_MISSION_FAILURE" }
"failure": { "topic": "TALK_MISSION_FAILURE", "opinion": { "trust": -3, "value": -1, "anger": 2 } }
},
{ "text": "Not yet.", "condition": "mission_incomplete", "topic": "TALK_NONE" },
{
"truefalsetext": { "true": "I killed him.", "false": "I killed it.", "condition": { "mission_goal": "ASSASSINATE" } },
"truefalsetext": { "true": "I killed him.", "false": "I killed it.", "condition": { "mission_goal": "MGOAL_ASSASSINATE" } },
"condition": {
"and": [
"mission_incomplete",
{
"or": [
{ "mission_goal": "ASSASSINATE" },
{ "mission_goal": "KILL_MONSTER" },
{ "mission_goal": "KILL_MONSTER_SPEC" },
{ "mission_goal": "KILL_MONSTER_TYPE" }
{ "mission_goal": "MGOAL_ASSASSINATE" },
{ "mission_goal": "MGOAL_KILL_MONSTER" },
{ "mission_goal": "MGOAL_KILL_MONSTER_SPEC" },
{ "mission_goal": "MGOAL_KILL_MONSTER_TYPE" }
]
}
]
},
"trial": { "type": "LIE", "difficulty": 10, "mod": [ [ "TRUST", 3 ] ] },
"success": { "topic": "TALK_NONE" },
"failure": { "topic": "TALK_MISSION_FAILURE" }
"trial": { "type": "LIE", "difficulty": 10, "mod": [ [ "TRUST", 5 ] ] },
"success": { "topic": "TALK_MISSION_SUCCESS", "effect": "mission_success" },
"failure": { "topic": "TALK_MISSION_SUCCESS_LIE", "opinion": { "trust": -5, "value": -1, "anger": 5 } }
},
{ "text": "No. I'll get back to it, bye!", "condition": "mission_incomplete", "topic": "TALK_NONE" },
{
"text": "Yup! Here it is!",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ { "or": [ { "mission_goal": "FIND_ITEM" }, { "mission_goal": "FIND_ANY_ITEM" } ] }, "mission_complete" ] },
"switch": true
"condition": {
"and": [ { "or": [ { "mission_goal": "MGOAL_FIND_ITEM" }, { "mission_goal": "MGOAL_FIND_ANY_ITEM" } ] }, "mission_complete" ]
},
"switch": true,
"effect": "mission_success"
},
{
"text": "We're here!",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "GO_TO_TYPE" } ] },
"switch": true
"condition": { "and": [ "mission_complete", { "mission_goal": "MGOAL_GO_TO_TYPE" } ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "Here I am.",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ { "or": [ { "mission_goal": "GO_TO" }, { "mission_goal": "FIND_NPC" } ] }, "mission_complete" ] },
"switch": true
"condition": { "and": [ { "or": [ { "mission_goal": "MGOAL_GO_TO" }, { "mission_goal": "MGOAL_FIND_NPC" } ] }, "mission_complete" ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "Here it is!",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "FIND_MONSTER" } ] },
"switch": true
"condition": { "and": [ "mission_complete", { "mission_goal": "MGOAL_FIND_MONSTER" } ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "Justice has been served.",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "ASSASSINATE" } ] },
"switch": true
"condition": { "and": [ "mission_complete", { "mission_goal": "MGOAL_ASSASSINATE" } ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "I killed it.",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "KILL_MONSTER" } ] },
"switch": true
"condition": { "and": [ "mission_complete", { "mission_goal": "MGOAL_KILL_MONSTER" } ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "I killed them. All of them.",
"topic": "TALK_MISSION_SUCCESS",
"condition": {
"and": [ { "or": [ { "mission_goal": "KILL_MONSTER_SPEC" }, { "mission_goal": "KILL_MONSTER_TYPE" } ] }, "mission_complete" ]
"and": [
{ "or": [ { "mission_goal": "MGOAL_KILL_MONSTER_SPEC" }, { "mission_goal": "MGOAL_KILL_MONSTER_TYPE" } ] },
"mission_complete"
]
},
"switch": true
"switch": true,
"effect": "mission_success"
},
{
"text": "I brought 'em.",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "RECRUIT_NPC" }, { "mission_goal": "RECRUIT_NPC_CLASS" } ] },
"switch": true
"condition": {
"and": [ "mission_complete", { "mission_goal": "MGOAL_RECRUIT_NPC" }, { "mission_goal": "MGOAL_RECRUIT_NPC_CLASS" } ]
},
"switch": true,
"effect": "mission_success"
},
{
"text": "I've taken care of it",
"topic": "TALK_MISSION_SUCCESS",
"condition": { "and": [ "mission_complete", { "mission_goal": "COMPUTER_TOGGLE" } ] },
"switch": true
"condition": { "and": [ "mission_complete", { "mission_goal": "MGOAL_COMPUTER_TOGGLE" } ] },
"switch": true,
"effect": "mission_success"
},
{
"text": "Mission success! I don't know what else to say.",
"topic": "TALK_MISSION_SUCCESS",
"condition": "mission_complete",
"switch": true,
"default": true
"default": true,
"effect": "mission_success"
}
]
},
Expand All @@ -223,10 +240,8 @@
"responses": [
{
"text": "Glad to help. I need no payment.",
"topic": "TALK_NONE",
"effect": "clear_mission",
"mission_opinion": { "trust": 4, "value": 3 },
"opinion": { "fear": -1, "anger": -1 }
"success": { "topic": "TALK_NONE", "mission_opinion": { "trust": 4, "value": 3 }, "opinion": { "fear": -1, "anger": -1 } }
},
{
"text": "How about some items as payment?",
Expand All @@ -238,14 +253,13 @@
"text": "Maybe you can teach me something as payment?",
"topic": "TALK_TRAIN",
"condition": { "or": [ "npc_train_skills", "npc_train_styles" ] },
"effect": "mission_reward"
"effect": "clear_mission"
},
{
"text": "Glad to help. I need no payment. Bye!",
"topic": "TALK_DONE",
"effect": "clear_mission",
"mission_opinion": { "trust": 4, "value": 3 },
"opinion": { "fear": -1, "anger": -1 }
"success": { "topic": "TALK_DONE", "mission_opinion": { "trust": 4, "value": 3 }, "opinion": { "fear": -1, "anger": -1 } }
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/TALK_COMMON_OTHER.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
"text": "I'll give it back!",
"switch": true,
"default": true,
"trial": { "type": "LIE", "difficulty": 10, "mod": [ [ "TRUST", 2 ], [ "VALUE", 5 ], [ "ALTRUISM", 3 ] ] },
"trial": { "type": "LIE", "difficulty": 0, "mod": [ [ "TRUST", 2 ], [ "VALUE", 5 ], [ "ALTRUISM", 3 ] ] },
"success": {
"topic": "TALK_GIVE_EQUIPMENT",
"effect": [ { "add_debt": [ [ "TRUST", 1 ], [ "VALUE", 3 ], [ "ALTRUISM", 2 ], [ "TOTAL", 300 ] ] }, "give_equipment" ],
Expand Down

0 comments on commit a11526b

Please sign in to comment.