Skip to content

Commit

Permalink
Random encounter 2: refugee center visitors (CleverRaven#56940)
Browse files Browse the repository at this point in the history
* Add nested map infrastructure

This begins the work, eventually will split this to a few files.

Also updates with region groundcovers because obviously.

* Update roadstop.json

* Update roadstop.json

* Update roadstop.json

* Update roadstop.json

* Update roadstop.json

* Update roadstop.json

* dialogue

* Update free_merchant_caravans.json

* cleanup after playtesting

* Add NPC remove script by Mylie

* astyle

* Apply suggestions from code review

Co-authored-by: Anton Burmistrov <Night_Pryanik@mail.ru>

* Update NPC_free_merchant_shopkeep.json

* change recurrence type

Prevents player from forcing a respawn by constantly coming and going from the map.

* Make the pickup custom

Contents should still be adjusted a bit.

* Update factional.json

* Update NPC_free_merchant_shopkeep.json

* Update free_merchant_caravans.json

* Update randenc_caravans.json

* begin making some more simple NPCs

* Update NPC_visiting_scavenger.json

* Update NPC_visiting_scavenger.json

Adds directions to many factions, similar to the teamster.

* Update NPC_john_bailey_visitor.json

* Some of John's dialogue

* more dialogue for john

* almost done John's dialogue

probably got that arithmetic function wrong though

* Add teaching and advice

* updated johns gear (#25)

* updated johns gear

* woops deleted everything

* don't need the camel group anymore

* touch up arithmetic

* Update NPC_john_bailey_visitor.json

* Update NPC_john_bailey_visitor.json

* clear change to roadstop

* Rename data/json/npcs/refugee_center/surface_visitors/NPC_john_bailey_visitor.json to data/json/npcs/random_encounters/john_bailey.json

* Create randenc_refugee_center.json

* Update john_bailey.json

* Update john_bailey.json

* playtest fixes

* Update randenc_refugee_center.json

* Update NPC_visiting_scavenger.json

* Make john able to teach more than once

Now he'll teach a random number of times but usually 2-3

* Update john_bailey.json

Remove the random it was causing problems

Co-authored-by: Anton Burmistrov <Night_Pryanik@mail.ru>
Co-authored-by: Dillon Matchett <dillon.matchett@gmail.com>
  • Loading branch information
3 people authored Apr 29, 2022
1 parent 993af16 commit 494c5cd
Show file tree
Hide file tree
Showing 3 changed files with 783 additions and 0 deletions.
84 changes: 84 additions & 0 deletions data/json/encounters/randenc_refugee_center.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[
{
"type": "effect_on_condition",
"id": "EOC_RandEnc_RC_Shoppers_add",
"//": "Adds random survivors visiting the refugee center to shop",
"recurrence": 6000,
"global": true,
"condition": {
"and": [
"is_day",
{ "one_in_chance": 10 },
{ "u_has_var": "FMShopkeep_Mission1", "type": "mission", "context": "flag", "value": "yes" },
{
"not": { "u_compare_time_since_var": "RandEnc", "type": "timer", "context": "RC_Shoppers", "op": "<", "time": "1 d" }
}
]
},
"effect": [
{ "mapgen_update": "nest_RandEnc_RC_Shoppers_add", "om_terrain": "evac_center_13" },
{ "u_add_var": "RandEnc", "type": "timer", "context": "RC_Shoppers", "time": true }
]
},
{
"type": "effect_on_condition",
"id": "EOC_RandEnc_RC_Shoppers_remove",
"recurrence": 200,
"global": true,
"condition": {
"or": [
{ "u_compare_time_since_var": "RandEnc", "type": "timer", "context": "RC_Shoppers", "op": ">", "time": "6 h" },
"is_night"
]
},
"effect": [ { "remove_npc": "RC_survivor_visiting" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_RandEnc_RC_JohnBailey_add",
"//": "Specific travelling NPC John Bailey stops in at the refugee center. Regardless of where you meet him, you can't meet John more than once per 3 days.",
"recurrence": 6200,
"global": true,
"condition": {
"and": [
"is_day",
{ "one_in_chance": 15 },
{ "u_has_var": "FMShopkeep_Mission1", "type": "mission", "context": "flag", "value": "yes" },
{
"not": { "u_compare_time_since_var": "RandEnc", "type": "timer", "context": "JohnBailey", "op": "<", "time": "3 d" }
}
]
},
"effect": [
{ "mapgen_update": "nest_RandEnc_RC_JohnBailey_add", "om_terrain": "evac_center_13" },
{ "u_add_var": "RandEnc", "type": "timer", "context": "JohnBailey", "time": true }
]
},
{
"type": "effect_on_condition",
"id": "EOC_RandEnc_RC_JohnBailey_remove",
"recurrence": 200,
"global": true,
"condition": {
"or": [
{ "u_compare_time_since_var": "RandEnc", "type": "timer", "context": "JohnBailey", "op": ">", "time": "6 h" },
"is_night"
]
},
"effect": [ { "remove_npc": "RC_John_Bailey_visiting" } ]
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "nest_RandEnc_RC_Shoppers_add",
"//": "Adds a random NPC to the refugee center, placed somewhere it won't intersect with beggars or other random NPCs.",
"object": { "place_npcs": [ { "class": "RC_survivor_visiting", "x": 20, "y": 23 } ] }
},
{
"type": "mapgen",
"method": "json",
"update_mapgen_id": "nest_RandEnc_RC_JohnBailey_add",
"//": "Adds a random NPC to the refugee center, placed somewhere it won't intersect with beggars or other random NPCs.",
"object": { "place_npcs": [ { "class": "RC_John_Bailey_visiting", "x": 19, "y": 21 } ] }
}
]
Loading

0 comments on commit 494c5cd

Please sign in to comment.