Skip to content

Commit

Permalink
Expand Defense Mode and fix a bug (CleverRaven#67960)
Browse files Browse the repository at this point in the history
* Update recipe_deconstruction.json

* Update recipe_deconstruction.json

* Update recipe_deconstruction.json

* Add myself to comment commands list

* Add the stuff

* Update data/mods/Defense_Mode/mapgen/survivor_forest_camp.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/mods/Defense_Mode/specials.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Bugfixer #1

* Add the overmap terrain entry

* Update eocs.json

* Use more default start location IDs, some to fit.

* Fix an ID typo

* Some om_special fixes

* More om_special fixes

* Update data/json/npcs/missiondef.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update data/json/npcs/other/NPC_pizzaiolo.json

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Final bug fix

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
MNG-cataclysm and github-actions[bot] authored Sep 17, 2023
1 parent bb0bdee commit 1570eb2
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"difficulty": 2,
"value": 0,
"start": {
"assign_mission_target": { "om_terrain": "s_restaurant", "reveal_radius": 5, "search_range": 400 },
"assign_mission_target": { "om_terrain": "s_restaurant", "om_special": "restraunt", "reveal_radius": 5, "search_range": 400 },
"effect": { "u_add_var": "directions", "type": "BOSS", "context": "mission", "value": "chef" }
},
"origins": [ "ORIGIN_SECONDARY" ],
Expand Down
9 changes: 8 additions & 1 deletion data/json/npcs/missiondef.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,14 @@
"start": {
"update_mapgen": { "place_item": [ { "item": "safe_box", "x": [ 18, 21 ], "y": [ 4, 6 ], "amount": 1 } ] },
"effect": "follow_only",
"assign_mission_target": { "om_terrain": "bank", "om_terrain_match_type": "PREFIX", "search_range": 120, "random": true, "z": 0 }
"assign_mission_target": {
"om_terrain": "bank",
"om_terrain_match_type": "PREFIX",
"om_special": "bank",
"search_range": 120,
"random": true,
"z": 0
}
},
"end": {
"effect": [
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/other/NPC_pizzaiolo.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"has_generic_rewards": false,
"start": {
"effect": [ "follow_only", { "npc_first_topic": "MISSION_PYROMANIAC" } ],
"assign_mission_target": { "om_terrain": "s_restaurant", "min_distance": 5, "z": 0 }
"assign_mission_target": { "om_terrain": "s_restaurant", "om_special": "restraunt", "min_distance": 5, "z": 0 }
},
"end": {
"effect": [
Expand Down
1 change: 1 addition & 0 deletions data/mods/Defense_Mode/eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"type": "effect_on_condition",
"id": "DEFENSE_MODE_WAVE_CONTROL",
"recurrence": "1 day",
"global": true,
"effect": [
{ "arithmetic": [ { "global_val": "var", "var_name": "wave_number" }, "+=", { "const": 1 } ] },
{ "math": [ "wave_cash_number", "++" ] },
Expand Down
101 changes: 101 additions & 0 deletions data/mods/Defense_Mode/mapgen/survivor_forest_camp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
[
{
"type": "mapgen",
"method": "json",
"om_terrain": [ "dm_survivor_forest_camp" ],
"weight": 100,
"object": {
"fallback_predecessor_mapgen": "forest_thick",
"rows": [
" ",
" ",
" ",
" ,,,,,,, ,,,,,,, ",
" ,,===,, ,,===,, ",
" ,,===,, ,,===,, ",
" ,E,,,,, ,E,,,,, ",
" ,,,,,,,,,,,,,,M,,,,,, ",
" ,,,,,,,,,,,,,,B,,,,,, ",
" ,,,,,,,,,A@,,,C,,,,,, ",
" ,,,,,,,,,,O,,,S,,,,,, ",
" ,,,,,,,,,,@,,,,,,,,,, ",
" ,,,,,,,,E,,,,,,,,,,,, ",
" ,,,,,,,,,,, ",
" ,,,,,,,,,,, ",
" ,,,,,,,,,,, ",
" ,,,,,,,,,,, ",
" ,,,,,,,,,,, ",
" ,,,,@,,,,,, ",
" ----------- ",
" --~~~~~~~~~-- ",
" --~~~~~~~~~~~-- ",
" --~~~~~~~~~-- ",
" ----------- "
],
"flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ],
"nested": { "E": { "chunks": [ [ "leather_tent_5x5_S", 100 ] ] }, "A": { "chunks": [ [ "survivor_corpse", 25 ] ] } },
"terrain": {
",": [ "t_region_groundcover" ],
"~": "t_water_dp",
"O": "t_region_soil",
"@": "t_region_groundcover",
"E": "t_region_groundcover",
"S": "t_region_soil",
"=": "t_dirtmound",
"-": "t_water_sh",
"C": "t_region_soil",
"B": "t_region_groundcover",
"A": "t_region_groundcover",
"M": "t_region_groundcover"
},
"furniture": {
"O": "f_firering",
"@": "f_logstool",
"S": "f_smoking_rack",
"C": "f_kiln_empty",
"B": "f_butcher_rack",
"M": "f_fiber_mat"
},
"place_traps": [
{ "trap": "tr_fur_rollmat", "x": 12, "y": 14 },
{ "trap": "tr_fur_rollmat", "x": [ 18, 20 ], "y": [ 7, 9 ] },
{ "trap": "tr_fur_rollmat", "x": [ 4, 6 ], "y": [ 7, 9 ] }
],
"place_furniture": [
{ "furn": "f_cattails", "x": [ 10, 16 ], "y": [ 21, 23 ], "repeat": [ 3, 7 ] },
{ "furn": "f_boulder_large", "x": [ 10, 16 ], "y": [ 21, 23 ], "repeat": [ 1, 3 ] }
],
"sealed_item": { "=": { "items": { "item": "farming_seeds", "chance": 100 }, "furniture": "f_plant_seedling" } },
"place_monster": [ { "group": "GROUP_POND_FISH_2", "x": 13, "y": 21, "chance": 100, "repeat": [ 4, 8 ] } ],
"place_items": [
{ "item": "book_survival_2", "x": 11, "y": 14, "chance": 100, "repeat": [ 1, 3 ] },
{ "item": "corpse_child_survival", "x": [ 18, 20 ], "y": [ 7, 9 ], "chance": 100 },
{ "item": "corpse_female_survival", "x": [ 18, 20 ], "y": [ 7, 9 ], "chance": 100 }
],
"place_fields": [ { "field": "fd_blood", "x": [ 18, 20 ], "y": [ 7, 9 ], "repeat": [ -1, 3 ] } ],
"place_loot": [
{ "item": "compositebow", "x": 5, "y": 7, "chance": 100 },
{ "item": "arrow_wood_heavy", "x": 5, "y": 7, "repeat": [ 1, 3 ], "chance": 100 },
{ "item": "quiver_birchbark", "x": 5, "y": 7, "chance": 100 },
{ "item": "childnote", "x": 19, "y": 7, "chance": 100 },
{ "item": "dry_meat", "x": 16, "y": 7, "chance": 100, "repeat": [ 5, 20 ] },
{ "item": "dry_fruit", "x": 16, "y": 7, "chance": 100, "repeat": [ 5, 20 ] },
{ "item": "makeshift_pillow", "x": 12, "y": 14, "chance": 100 },
{ "item": "needle_bone", "x": 11, "y": 13, "chance": 100 },
{ "item": "primitive_adze", "x": 11, "y": 13, "chance": 100 },
{ "item": "wicker_backpack", "x": 11, "y": 13, "chance": 100 },
{ "item": "primitive_hammer", "x": 11, "y": 13, "chance": 100 },
{ "item": "sickle_stone", "x": 11, "y": 13, "chance": 100 },
{ "item": "stone_chisel", "x": 11, "y": 13, "chance": 100 },
{ "item": "fire_drill_large", "x": 11, "y": 13, "chance": 100 },
{ "item": "oil_lamp_clay", "x": 11, "y": 13, "chance": 100 },
{ "item": "primitive_axe", "x": 11, "y": 9, "chance": 100 },
{ "item": "log", "x": 8, "y": 10, "chance": 100, "repeat": 3 },
{ "item": "clay_watercont", "x": 8, "y": 9, "chance": 100 },
{ "item": "clay_pot", "x": 13, "y": 18, "chance": 100 },
{ "item": "fish_bait", "x": 13, "y": 18, "chance": 100, "repeat": [ 1, 2 ] },
{ "item": "fishing_rod_basic", "x": 12, "y": 18, "chance": 100 }
]
}
}
]
9 changes: 9 additions & 0 deletions data/mods/Defense_Mode/overmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,14 @@
"sym": "W",
"color": "light_gray",
"see_cost": 5
},
{
"type": "overmap_terrain",
"id": [ "dm_survivor_forest_camp" ],
"name": "survivor forest camp",
"sym": "+",
"color": "green",
"see_cost": 5,
"flags": [ "REQUIRES_PREDECESSOR" ]
}
]
69 changes: 66 additions & 3 deletions data/mods/Defense_Mode/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@
"name": "Fortified",
"points": 0,
"description": "You do not know who you are, nor do you know why you're here. All you know is that you must fight and defend yourself from the horde.",
"allowed_locs": [ "bar", "hospital", "public_works", "megastore", "mansion" ],
"allowed_locs": [
"sloc_bar",
"sloc_hospital",
"public_works",
"megastore",
"mansion",
"sloc_shelter_a",
"sloc_gun_store",
"survivor_camp",
"sloc_cabin",
"cave",
"sugar_house",
"sloc_bank",
"sloc_pawn_shop",
"sloc_restaurant"
],
"eoc": [ "scenario_defense_mode" ],
"forced_traits": [ "HAS_NEMESIS" ],
"flags": [ "LONE_START" ],
Expand All @@ -19,13 +34,13 @@
},
{
"type": "start_location",
"id": "bar",
"id": "sloc_bar",
"name": "Bar",
"terrain": [ "bar" ]
},
{
"type": "start_location",
"id": "hospital",
"id": "sloc_hospital",
"name": "Hospital",
"terrain": [ "dm_hospital_3" ]
},
Expand All @@ -46,5 +61,53 @@
"id": "mansion",
"name": "Mansion",
"terrain": [ "dm_mansion_e2" ]
},
{
"type": "start_location",
"id": "sloc_gun_store",
"name": "Gun Store",
"terrain": [ "s_gunstore_looted" ]
},
{
"type": "start_location",
"id": "survivor_camp",
"name": "Survivor Camp",
"terrain": [ "dm_survivor_forest_camp" ]
},
{
"type": "start_location",
"id": "cave",
"name": "Cave",
"terrain": [ "cave" ]
},
{
"type": "start_location",
"id": "sugar_house",
"name": "Sugar House",
"terrain": [ "sugar_house" ]
},
{
"type": "start_location",
"id": "motel",
"name": "Motel",
"terrain": [ "motel_twd_1" ]
},
{
"type": "start_location",
"id": "sloc_pawn_shop",
"name": "Pawn Shop",
"terrain": [ "pawn" ]
},
{
"type": "start_location",
"id": "sloc_restaurant",
"name": "Restaurant",
"terrain": [ "s_restaurant" ]
},
{
"type": "start_location",
"id": "sloc_bank",
"name": "Bank",
"terrain": [ "bank" ]
}
]
111 changes: 111 additions & 0 deletions data/mods/Defense_Mode/specials.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,116 @@
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "s_gunstore_looted",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "s_gunstore_looted_north" },
{ "point": [ 0, 0, 1 ], "overmap": "s_gunstore_2ndfloor_north" },
{ "point": [ 0, 0, 2 ], "overmap": "s_gunstore_roof_north" }
],
"locations": [ "field" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "survivor_forest_camp",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "dm_survivor_forest_camp_north" } ],
"locations": [ "forest_center" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "Evac Shelter",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "shelter_north" },
{ "point": [ 0, 0, -1 ], "overmap": "shelter_under_north" },
{ "point": [ 0, 0, 1 ], "overmap": "shelter_roof_north" }
],
"locations": [ "wilderness" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "Cabin",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cabin_north" }, { "point": [ 0, 0, 1 ], "overmap": "cabin_roof_north" } ],
"locations": [ "forest" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "Cave",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "cave" }, { "point": [ 0, 0, -1 ], "overmap": "cave_underground" } ],
"locations": [ "forest" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "Sugar House",
"overmaps": [
{ "point": [ 0, -1, 0 ], "overmap": "sugar_house_parking_north" },
{ "point": [ 0, 0, 0 ], "overmap": "sugar_house_north" },
{ "point": [ 0, 0, 1 ], "overmap": "sugar_house_roof_north" }
],
"locations": [ "forest" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "motel-twd",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "motel_twd_1_north" },
{ "point": [ 1, 0, 0 ], "overmap": "motel_twd_2_north" },
{ "point": [ 0, 0, 1 ], "overmap": "motel_twd_1_f1_north" },
{ "point": [ 1, 0, 1 ], "overmap": "motel_twd_2_f1_north" },
{ "point": [ 0, 0, 2 ], "overmap": "motel_twd_1_f2_north" }
],
"locations": [ "land" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "bank",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "bank_north" }, { "point": [ 0, 0, 1 ], "overmap": "bank_roof_north" } ],
"locations": [ "land" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "pawn_shop",
"overmaps": [ { "point": [ 0, 0, 0 ], "overmap": "pawn_north" }, { "point": [ 0, 0, 1 ], "overmap": "pawn_roof_north" } ],
"locations": [ "land" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
},
{
"type": "overmap_special",
"id": "restraunt",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "s_restaurant_north" },
{ "point": [ 0, 0, 1 ], "overmap": "s_restaurant_roof_north" }
],
"locations": [ "land" ],
"city_distance": [ 40, -1 ],
"occurrences": [ 100, 100 ],
"flags": [ "DEFENSE_MODE", "GLOBALLY_UNIQUE" ]
}
]

0 comments on commit 1570eb2

Please sign in to comment.