From ed45398146905d6bb9fa4dfe706b86f63c8be250 Mon Sep 17 00:00:00 2001 From: El-Jekozo Date: Wed, 21 Oct 2020 18:55:02 +0300 Subject: [PATCH 1/9] Add new mission Add new mission --- data/json/npcs/TALK_COMMON_MISSION.json | 17 ++++++++ data/json/npcs/missiondef.json | 55 +++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index 66ac6931aaffd..dcfde566e4f25 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -324,5 +324,22 @@ { "text": "Thank you.", "topic": "TALK_NONE", "effect": "clear_mission" }, { "text": "Thanks, bye.", "topic": "TALK_DONE", "effect": "clear_mission" } ] + }, + { + "//":"MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", + "type": "talk_topic", + "id": "MISSION_PYROMANIAC", + "dynamic_line": "Are we there? I can't wait to burn that house!", + "responses": [ + { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", + "condition":{ + "and":[ + "mission_complete", + {"u_has_item":"gasoline", "count":200} + ] + } + }, + { "text": "Not yet.", "topic": "TALK_DONE"} + ] } ] diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index ac1809f7afd48..4945f225d1fd4 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -795,5 +795,60 @@ "success_lie": "OK, then hand them over.", "failure": "Well, that's a shame." } + }, + { + "id": "MISSION_PYROMANIAC", + "type": "mission_definition", + "name": { "str": "Angry pyromaniac" }, + "goal": "MGOAL_GO_TO", + "difficulty": 0, + "value": 0, + "//":"NPC will ask player to burn tagged house. Will follow player after accepting mission.", + "//2":"Change first topic to do proper checks. MGOAL_GO_TO to check if player stands on tagged tile.", + "//3":"At the end of the mission, will place fire on tagged tile and NPC will join player faction.", + "has_generic_rewards":false, + "start":{ + "effect":[ + "follow_only", + {"npc_first_topic":"MISSION_PYROMANIAC"} + ], + "assign_mission_target":{ + "om_terrain":"house", + "om_terrain_replace": "forest", + "om_terrain_match_type":"PREFIX", + "search_range": 75, + "random":true, + "z": 0 + } + }, + "end":{ + "effect":[ + "follow", + {"u_consume_item":"gasoline", "count":200}, + {"mapgen_update":"MISSION_PYROMANIAC_BURN"} + ] + }, + "origins": [ "ORIGIN_OPENER_NPC" ], + "dialogue": { + "describe": "Oh man, I want to burn it so bad…", + "offer": "I'm so angry! I have an enemy that ruined my life, and I want revenge! I don't care about , I just want to burn his house! Would you help me?", + "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you? I was so angry I forgot to bring it with me…", + "rejected": "Seriously? It's an easy job…", + "advice": "Maybe we can find some gasoline at gas station.", + "inquire": "Are you ready?", + "success": "Sweet, sweet revenge! It smells so nice! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", + "success_lie": "What?! You liar!", + "failure": "Wow, you failed? How…" + } + }, + { + "//":"For MISSION_PYROMANIAC. Will spawn fire on tile where PC is standing.", + "type": "mapgen", + "update_mapgen_id": "MISSION_PYROMANIAC_BURN", + "method": "json", + "object": { + "place_liquids": [ { "liquid": "gasoline", "x": [ 5, 20 ], "y": [ 5, 20 ], "amount": 5 , "repeat": 40 } ], + "place_fields": [ { "field": "fd_fire", "x": [ 5, 20 ], "y": [ 5, 20 ], "repeat": 40 } ] + } } ] From 6c578bac7e2e45c8024d4655b9a011dbb0acab43 Mon Sep 17 00:00:00 2001 From: El-Jekozo Date: Wed, 21 Oct 2020 19:19:37 +0300 Subject: [PATCH 2/9] Fix 2 Fix 2 --- data/json/npcs/TALK_COMMON_MISSION.json | 4 ++-- data/json/npcs/missiondef.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index dcfde566e4f25..c3f437cf35399 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -329,7 +329,7 @@ "//":"MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", "type": "talk_topic", "id": "MISSION_PYROMANIAC", - "dynamic_line": "Are we there? I can't wait to burn that house!", + "dynamic_line": "Are we there yet? I can't wait to burn that house!", "responses": [ { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", "condition":{ @@ -339,7 +339,7 @@ ] } }, - { "text": "Not yet.", "topic": "TALK_DONE"} + { "text": "Be patient, we're getting there soon.", "topic": "TALK_DONE"} ] } ] diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index 4945f225d1fd4..441ea614975a3 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -831,12 +831,12 @@ "origins": [ "ORIGIN_OPENER_NPC" ], "dialogue": { "describe": "Oh man, I want to burn it so bad…", - "offer": "I'm so angry! I have an enemy that ruined my life, and I want revenge! I don't care about , I just want to burn his house! Would you help me?", + "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you? I was so angry I forgot to bring it with me…", - "rejected": "Seriously? It's an easy job…", + "rejected": "Seriously? It's such an easy job…", "advice": "Maybe we can find some gasoline at gas station.", "inquire": "Are you ready?", - "success": "Sweet, sweet revenge! It smells so nice! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", + "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", "success_lie": "What?! You liar!", "failure": "Wow, you failed? How…" } From 1a6c2f034b0ef09dc824702ab2048ea1d49338b2 Mon Sep 17 00:00:00 2001 From: El-Jekozo Date: Wed, 21 Oct 2020 20:25:39 +0300 Subject: [PATCH 3/9] Linting Linting --- data/json/npcs/TALK_COMMON_MISSION.json | 17 +++---- data/json/npcs/missiondef.json | 59 ++++++++++++------------- 2 files changed, 35 insertions(+), 41 deletions(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index c3f437cf35399..709df821ac342 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -326,20 +326,17 @@ ] }, { - "//":"MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", + "//": "MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", "type": "talk_topic", "id": "MISSION_PYROMANIAC", "dynamic_line": "Are we there yet? I can't wait to burn that house!", "responses": [ - { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", - "condition":{ - "and":[ - "mission_complete", - {"u_has_item":"gasoline", "count":200} - ] - } - }, - { "text": "Be patient, we're getting there soon.", "topic": "TALK_DONE"} + { + "text": "We're here. Let's do it!", + "topic": "TALK_MISSION_INQUIRE", + "condition": { "and": [ "mission_complete", { "u_has_item": "gasoline", "count": 200 } ] } + }, + { "text": "Be patient, we're getting there soon.", "topic": "TALK_DONE" } ] } ] diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index 441ea614975a3..9914d68f5aba1 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -799,36 +799,33 @@ { "id": "MISSION_PYROMANIAC", "type": "mission_definition", - "name": { "str": "Angry pyromaniac" }, + "name": { + "str": "Angry pyromaniac" + }, "goal": "MGOAL_GO_TO", "difficulty": 0, "value": 0, - "//":"NPC will ask player to burn tagged house. Will follow player after accepting mission.", - "//2":"Change first topic to do proper checks. MGOAL_GO_TO to check if player stands on tagged tile.", - "//3":"At the end of the mission, will place fire on tagged tile and NPC will join player faction.", - "has_generic_rewards":false, - "start":{ - "effect":[ - "follow_only", - {"npc_first_topic":"MISSION_PYROMANIAC"} - ], - "assign_mission_target":{ - "om_terrain":"house", - "om_terrain_replace": "forest", - "om_terrain_match_type":"PREFIX", - "search_range": 75, - "random":true, - "z": 0 - } - }, - "end":{ - "effect":[ - "follow", - {"u_consume_item":"gasoline", "count":200}, - {"mapgen_update":"MISSION_PYROMANIAC_BURN"} - ] - }, - "origins": [ "ORIGIN_OPENER_NPC" ], + "//": "NPC will ask player to burn tagged house. Will follow player after accepting mission.", + "//2": "Change first topic to do proper checks. MGOAL_GO_TO to check if player stands on tagged tile.", + "//3": "At the end of the mission, will place fire on tagged tile and NPC will join player faction.", + "has_generic_rewards": false, + "start": { + "effect": [ "follow_only", { "npc_first_topic": "MISSION_PYROMANIAC" } ], + "assign_mission_target": { + "om_terrain": "house", + "om_terrain_replace": "forest", + "om_terrain_match_type": "PREFIX", + "search_range": 75, + "random": true, + "z": 0 + } + }, + "end": { + "effect": [ "follow", { "u_consume_item": "gasoline", "count": 200 }, { "mapgen_update": "MISSION_PYROMANIAC_BURN" } ] + }, + "origins": [ + "ORIGIN_OPENER_NPC" + ], "dialogue": { "describe": "Oh man, I want to burn it so bad…", "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", @@ -842,13 +839,13 @@ } }, { - "//":"For MISSION_PYROMANIAC. Will spawn fire on tile where PC is standing.", + "//": "For MISSION_PYROMANIAC. Will spawn fire on tile where PC is standing.", "type": "mapgen", "update_mapgen_id": "MISSION_PYROMANIAC_BURN", "method": "json", "object": { - "place_liquids": [ { "liquid": "gasoline", "x": [ 5, 20 ], "y": [ 5, 20 ], "amount": 5 , "repeat": 40 } ], - "place_fields": [ { "field": "fd_fire", "x": [ 5, 20 ], "y": [ 5, 20 ], "repeat": 40 } ] - } + "place_liquids": [ { "liquid": "gasoline", "x": [ 5, 20 ], "y": [ 5, 20 ], "amount": 5, "repeat": 40 } ], + "place_fields": [ { "field": "fd_fire", "x": [ 5, 20 ], "y": [ 5, 20 ], "repeat": 40 } ] + } } ] From 4a7c18556fa0a658d8d5cbfc880e630ffa237d75 Mon Sep 17 00:00:00 2001 From: El-Jekozo Date: Wed, 21 Oct 2020 21:00:49 +0300 Subject: [PATCH 4/9] LINTING! LINTING! --- data/json/npcs/missiondef.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index 9914d68f5aba1..abd9af6915910 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -799,9 +799,7 @@ { "id": "MISSION_PYROMANIAC", "type": "mission_definition", - "name": { - "str": "Angry pyromaniac" - }, + "name": { "str": "Angry pyromaniac" }, "goal": "MGOAL_GO_TO", "difficulty": 0, "value": 0, @@ -823,9 +821,7 @@ "end": { "effect": [ "follow", { "u_consume_item": "gasoline", "count": 200 }, { "mapgen_update": "MISSION_PYROMANIAC_BURN" } ] }, - "origins": [ - "ORIGIN_OPENER_NPC" - ], + "origins": [ "ORIGIN_OPENER_NPC" ], "dialogue": { "describe": "Oh man, I want to burn it so bad…", "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", From 195f260b42b0b64ca01d84c65a01785e0ae54b80 Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Tue, 27 Oct 2020 14:15:15 +0300 Subject: [PATCH 5/9] Apply suggestions from code review --- data/json/npcs/TALK_COMMON_MISSION.json | 6 +++--- data/json/npcs/missiondef.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index 709df821ac342..a0fc4b6e36fb3 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -329,12 +329,12 @@ "//": "MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", "type": "talk_topic", "id": "MISSION_PYROMANIAC", - "dynamic_line": "Are we there yet? I can't wait to burn that house!", + "dynamic_line": "Are we there yet? I can't wait to burn that house!", "responses": [ { - "text": "We're here. Let's do it!", + "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", - "condition": { "and": [ "mission_complete", { "u_has_item": "gasoline", "count": 200 } ] } + "condition": { "and": [ "mission_complete", { "u_has_items": "gasoline", "count": 200 } ] } }, { "text": "Be patient, we're getting there soon.", "topic": "TALK_DONE" } ] diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index abd9af6915910..a503473eeb084 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -824,9 +824,9 @@ "origins": [ "ORIGIN_OPENER_NPC" ], "dialogue": { "describe": "Oh man, I want to burn it so bad…", - "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", - "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you? I was so angry I forgot to bring it with me…", - "rejected": "Seriously? It's such an easy job…", + "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", + "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you? I was so angry I forgot to bring it with me…", + "rejected": "Seriously? It's such an easy job…", "advice": "Maybe we can find some gasoline at gas station.", "inquire": "Are you ready?", "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", From 71488933f1ff77b0e5b700e67a1a8033bf313bae Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Tue, 27 Oct 2020 14:15:52 +0300 Subject: [PATCH 6/9] Apply suggestions from code review --- data/json/npcs/missiondef.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index a503473eeb084..5fba60c825a56 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -829,7 +829,7 @@ "rejected": "Seriously? It's such an easy job…", "advice": "Maybe we can find some gasoline at gas station.", "inquire": "Are you ready?", - "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", + "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", "success_lie": "What?! You liar!", "failure": "Wow, you failed? How…" } From 19468048c0cada22b101ac5c8dd3f6ebd3065df7 Mon Sep 17 00:00:00 2001 From: El-Jekozo Date: Fri, 30 Oct 2020 15:25:20 +0200 Subject: [PATCH 7/9] Added few talk_tags --- data/json/npcs/TALK_COMMON_MISSION.json | 4 ++-- data/json/npcs/missiondef.json | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index a0fc4b6e36fb3..2e7c9cd183dd6 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -329,14 +329,14 @@ "//": "MISSION_PYROMANIAC mission set this topic as starting topic for mission giver.", "type": "talk_topic", "id": "MISSION_PYROMANIAC", - "dynamic_line": "Are we there yet? I can't wait to burn that house!", + "dynamic_line": "Are we there yet, ? I can't wait to burn that building!", "responses": [ { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", "condition": { "and": [ "mission_complete", { "u_has_items": "gasoline", "count": 200 } ] } }, - { "text": "Be patient, we're getting there soon.", "topic": "TALK_DONE" } + { "text": "Be patient, , we're getting there soon.", "topic": "TALK_DONE" } ] } ] diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index 5fba60c825a56..82ff70c8aea3c 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -823,13 +823,13 @@ }, "origins": [ "ORIGIN_OPENER_NPC" ], "dialogue": { - "describe": "Oh man, I want to burn it so bad…", - "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me?", - "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you? I was so angry I forgot to bring it with me…", + "describe": "Oh man, I want to burn it so bad…", + "offer": "I'm so infuriated! I've got an enemy that ruined my life, and now I want to get revenge! I don't care about , I just want to burn his house! Would you help me, ?", + "accepted": "Good. Let's go to his house and burn it down! Oh, by the way, could you bring gasoline with you, ? I was so angry I forgot to bring it with me…", "rejected": "Seriously? It's such an easy job…", "advice": "Maybe we can find some gasoline at gas station.", - "inquire": "Are you ready?", - "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even himself, will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, my friend!", + "inquire": "Are you ready, ?", + "success": "Sweet, sweet revenge! Ah, smells so nice! Feels like the smell of napalm in the morning! All his stuff, and probably even that , will burn to ashes in a matter of minutes. You helped me get my revenge, so I'll follow you to the end, !", "success_lie": "What?! You liar!", "failure": "Wow, you failed? How…" } From 5f2899e4ab4d865d096e732e6f795a0be29294be Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Sat, 31 Oct 2020 11:16:06 +0300 Subject: [PATCH 8/9] Apply suggestions from code review --- data/json/npcs/TALK_COMMON_MISSION.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index 2e7c9cd183dd6..4361566bdcf34 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -334,7 +334,7 @@ { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", - "condition": { "and": [ "mission_complete", { "u_has_items": "gasoline", "count": 200 } ] } + "condition": { "and": [ "mission_complete", { "u_has_items": { "item": "gasoline", "count": 200 } } ] } }, { "text": "Be patient, , we're getting there soon.", "topic": "TALK_DONE" } ] From 06ff945e244a96858f7da82f2c99b1b9144a7181 Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Sat, 31 Oct 2020 11:16:31 +0300 Subject: [PATCH 9/9] Lint --- data/json/npcs/TALK_COMMON_MISSION.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/json/npcs/TALK_COMMON_MISSION.json b/data/json/npcs/TALK_COMMON_MISSION.json index 4361566bdcf34..aec99176255fc 100644 --- a/data/json/npcs/TALK_COMMON_MISSION.json +++ b/data/json/npcs/TALK_COMMON_MISSION.json @@ -334,7 +334,7 @@ { "text": "We're here. Let's do it!", "topic": "TALK_MISSION_INQUIRE", - "condition": { "and": [ "mission_complete", { "u_has_items": { "item": "gasoline", "count": 200 } } ] } + "condition": { "and": [ "mission_complete", { "u_has_items": { "item": "gasoline", "count": 200 } } ] } }, { "text": "Be patient, , we're getting there soon.", "topic": "TALK_DONE" } ]