Skip to content

Commit 5e66810

Browse files
MilopetiloMaleclypseGuardianDll
authored
Add hub 02 (#81528)
* Add first bits of balthazar Adds first mission, npc, faction, epilogue * Add top floor of bunker Make intercom work, add snippets for camp name, balthazar bots * First few EOCs for keeping track of power * Make solar farm update * first version of radio * Add balthazar radio * Bunker finishing * More conversations, eocs & achievement * Spellcheck * Fix solar panels to arrays, typos & radio * Count solar panels on ground * Fix trading working + make bots aggro on attacked * Check if they don't die after losing power * Consume solar panels from ground * Update src/iexamine.cpp Co-authored-by: Anton Simakov <[email protected]> --------- Co-authored-by: Maleclypse <[email protected]> Co-authored-by: Anton Simakov <[email protected]>
1 parent 3c978ee commit 5e66810

File tree

24 files changed

+1286
-0
lines changed

24 files changed

+1286
-0
lines changed

data/json/achievements.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,6 +1975,20 @@
19751975
}
19761976
]
19771977
},
1978+
{
1979+
"id": "achievement_reach_balthazar",
1980+
"type": "achievement",
1981+
"name": "Bunker Robot(s)",
1982+
"requirements": [
1983+
{
1984+
"event_statistic": "last_overmap_special_avatar_entered",
1985+
"is": "==",
1986+
"target": [ "overmap_special_id", "balthazar_bunker" ],
1987+
"visible": "when_achievement_completed",
1988+
"description": "Find the bunker complex"
1989+
}
1990+
]
1991+
},
19781992
{
19791993
"id": "achievement_reach_hub01",
19801994
"type": "achievement",
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[
2+
{
3+
"type": "effect_on_condition",
4+
"id": "EOC_START_BALTHAZAR_COUNTERS",
5+
"//": "Initialize counters for balthazar at start of game",
6+
"eoc_type": "EVENT",
7+
"required_event": "game_start",
8+
"global": true,
9+
"effect": [
10+
{ "math": [ "balthazar_power = 10" ] },
11+
{ "math": [ "balthazar_daily_power_gain = rand(2) - 1" ] },
12+
{ "run_eocs": "EOC_DAILY_BALTHAZAR_POWER" }
13+
]
14+
},
15+
{
16+
"type": "effect_on_condition",
17+
"id": "EOC_DAILY_BALTHAZAR_POWER",
18+
"//": "Balthazar gains power daily",
19+
"recurrence": "1d",
20+
"global": true,
21+
"effect": [ { "math": [ "balthazar_power += balthazar_daily_power_gain" ] }, { "run_eocs": "EOC_BALTHAZAR_CHECK_PROGRESS" } ]
22+
},
23+
{
24+
"type": "effect_on_condition",
25+
"id": "EOC_BALTHAZAR_CHECK_PROGRESS",
26+
"global": true,
27+
"effect": [
28+
{ "if": { "math": [ "balthazar_power <= 0" ] }, "then": { "run_eocs": "EOC_BALTHAZAR_GONE" } },
29+
{
30+
"if": { "and": [ { "math": [ "balthazar_solar_power != 1" ] }, { "math": [ "balthazar_power >= 50" ] } ] },
31+
"then": { "run_eocs": "EOC_BALTHAZAR_SET_UP_SOLAR" }
32+
}
33+
]
34+
},
35+
{
36+
"type": "effect_on_condition",
37+
"id": "EOC_BALTHAZAR_SET_UP_SOLAR",
38+
"global": true,
39+
"effect": [
40+
{ "mapgen_update": "balthazar_bunker_solar_panel_row_l", "om_terrain": "balthazar_bunker_02" },
41+
{ "mapgen_update": "balthazar_bunker_solar_panel_row_r", "om_terrain": "balthazar_bunker_03" },
42+
{ "math": [ "balthazar_power += 20" ] },
43+
{ "math": [ "balthazar_daily_power_gain += 1" ] },
44+
{ "math": [ "balthazar_solar_power = 1" ] }
45+
]
46+
},
47+
{
48+
"type": "effect_on_condition",
49+
"id": "EOC_BALTHAZAR_GONE",
50+
"global": true,
51+
"effect": [
52+
{ "mapgen_update": "remove_balthazar_intercom", "om_terrain": "balthazar_bunker_01" },
53+
{ "math": [ "balthazar_power = 0" ] },
54+
{ "math": [ "balthazar_daily_power_gain = 0" ] }
55+
]
56+
},
57+
{
58+
"type": "effect_on_condition",
59+
"id": "EOC_BALTHAZAR_SECUBOT_DEATH",
60+
"global": true,
61+
"effect": [ { "math": [ "balthazar_power -= 5" ] }, { "run_eocs": "EOC_BALTHAZAR_CHECK_PROGRESS" } ]
62+
},
63+
{
64+
"type": "effect_on_condition",
65+
"id": "EOC_BALTHAZAR_TURRET_DEATH",
66+
"global": true,
67+
"effect": [ { "math": [ "balthazar_power -= 2" ] }, { "run_eocs": "EOC_BALTHAZAR_CHECK_PROGRESS" } ]
68+
}
69+
]

data/json/furniture_and_terrain/furniture-industrial.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,5 +549,89 @@
549549
{ "item": "lead", "charges": [ 12, 18 ] }
550550
]
551551
}
552+
},
553+
{
554+
"type": "furniture",
555+
"id": "f_metal_detector",
556+
"name": "metal detector",
557+
"description": "A metal detector like one you'd see at the airport. This one is no longer functioning.",
558+
"symbol": "M",
559+
"color": "light_blue",
560+
"coverage": 20,
561+
"move_cost_mod": 2,
562+
"//": "Based on https://uniqscan.com/products/copy-of-walk-through-metal-detector-ub500, 70cm * 200cm * 60cm",
563+
"max_volume": "800 L",
564+
"required_str": -1,
565+
"flags": [ "PERMEABLE", "THIN_OBSTACLE", "TRANSPARENT" ],
566+
"bash": {
567+
"str_min": 12,
568+
"str_max": 45,
569+
"sound": "metal screeching!",
570+
"sound_fail": "clang!",
571+
"items": [
572+
{ "item": "scrap", "count": [ 1, 6 ] },
573+
{ "item": "plastic_chunk", "count": [ 4, 8 ] },
574+
{ "item": "cable", "count": [ 2, 6 ] },
575+
{ "item": "e_scrap", "count": [ 8, 12 ] }
576+
]
577+
}
578+
},
579+
{
580+
"type": "furniture",
581+
"id": "f_balthazar_server",
582+
"name": "Balthazar's server racks",
583+
"looks_like": "t_machinery_electronic",
584+
"description": "The servers Balthazar is running on. Destroying these will severely damage, if not kill them.",
585+
"symbol": "$",
586+
"color": "yellow",
587+
"move_cost_mod": -1,
588+
"coverage": 55,
589+
"required_str": -1,
590+
"flags": [ "ALARMED" ],
591+
"deconstruct": {
592+
"skill": { "skill": "electronics", "min": 1, "max": 8 },
593+
"items": [
594+
{ "item": "lc_wire", "count": [ 1, 16 ], "prob": 80 },
595+
{ "item": "mc_wire", "count": [ 1, 8 ], "prob": 15 },
596+
{ "item": "hc_wire", "count": [ 1, 8 ], "prob": 15 },
597+
{ "item": "qt_wire", "count": [ 1, 8 ], "prob": 15 },
598+
{ "item": "mc_steel_chunk", "count": [ 1, 4 ] },
599+
{ "item": "processor", "count": 1 },
600+
{ "item": "RAM", "count": [ 1, 4 ] },
601+
{ "item": "cable", "charges": [ 1, 4 ] },
602+
{ "item": "small_lcd_screen", "count": 1 },
603+
{ "item": "e_scrap", "count": [ 5, 10 ] },
604+
{ "item": "circuit", "count": [ 3, 8 ] },
605+
{ "item": "power_supply", "count": [ 1, 3 ] },
606+
{ "item": "amplifier", "count": [ 1, 3 ] },
607+
{ "item": "plastic_chunk", "count": [ 2, 8 ] },
608+
{ "item": "scrap", "count": [ 1, 5 ] }
609+
]
610+
},
611+
"bash": {
612+
"str_min": 10,
613+
"str_max": 80,
614+
"sound": "clang!",
615+
"sound_fail": "ting.",
616+
"items": [
617+
{ "item": "lc_wire", "count": [ 1, 8 ], "prob": 60 },
618+
{ "item": "mc_wire", "count": [ 1, 4 ], "prob": 5 },
619+
{ "item": "hc_wire", "count": [ 1, 4 ], "prob": 5 },
620+
{ "item": "qt_wire", "count": [ 1, 4 ], "prob": 5 },
621+
{ "item": "pipe", "prob": 40 },
622+
{ "item": "mc_steel_chunk", "prob": 40 },
623+
{ "item": "bearing", "charges": [ 2, 4 ] },
624+
{ "item": "processor", "prob": 40 },
625+
{ "item": "RAM", "count": [ 1, 2 ] },
626+
{ "item": "cable", "charges": [ 1, 2 ] },
627+
{ "item": "small_lcd_screen", "prob": 40 },
628+
{ "item": "e_scrap", "count": [ 3, 8 ] },
629+
{ "item": "circuit", "count": [ 1, 3 ] },
630+
{ "item": "power_supply", "prob": 40 },
631+
{ "item": "amplifier", "prob": 40 },
632+
{ "item": "plastic_chunk", "count": [ 2, 8 ] },
633+
{ "item": "scrap", "count": [ 3, 8 ] }
634+
]
635+
}
552636
}
553637
]

data/json/furniture_and_terrain/terrain-mechanisms.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,28 @@
290290
"items": [ { "item": "plastic_chunk", "count": [ 0, 2 ] }, { "item": "scrap", "prob": 50 } ]
291291
}
292292
},
293+
{
294+
"type": "terrain",
295+
"id": "t_intercom_balthazar",
296+
"name": "intercom",
297+
"description": "A rudimentary intercom panel. This one looks to be set up in a hurry with the microphone and speaker just dangling.",
298+
"symbol": "=",
299+
"color": "light_gray",
300+
"move_cost": 0,
301+
"connect_groups": "WALL",
302+
"connects_to": "WALL",
303+
"flags": [ "NOITEM", "FREE_TO_EXAMINE" ],
304+
"//": "For the player to chat with an NPC through the intercom, the npc must have NC_BALTHAZAR and must be within 10 tiles of the intercom.",
305+
"examine_action": "intercom_balthazar",
306+
"bash": {
307+
"str_min": 18,
308+
"str_max": 180,
309+
"sound": "crunch!",
310+
"sound_fail": "whack!",
311+
"ter_set": "t_strconc_wall",
312+
"items": [ { "item": "plastic_chunk", "count": [ 0, 2 ] }, { "item": "scrap", "prob": 50 } ]
313+
}
314+
},
293315
{
294316
"type": "terrain",
295317
"id": "t_card_robofac",

data/json/itemgroups/Locations_MapExtras/map_extras.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"entries": [
1616
{ "group": "wallets_science", "prob": 75 },
1717
{ "item": "coat_lab", "damage": [ 1, 3 ] },
18+
{ "item": "balthazar_radio", "prob": 10 },
1819
{ "group": "mutagenic_field_kit", "prob": 1, "damage": [ 1, 3 ] },
1920
{ "group": "lab_pants", "damage": [ 1, 3 ] },
2021
{ "group": "socks_unisex", "damage": [ 1, 3 ] },

data/json/itemgroups/military.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@
463463
{ "item": "e_tool", "prob": 60 },
464464
{ "group": "gasmask_bag_full", "prob": 20 },
465465
{ "item": "two_way_radio", "prob": 60, "charges": [ 0, 100 ] },
466+
{ "item": "balthazar_radio", "prob": 1 },
466467
{ "group": "infantry_knives", "prob": 80 }
467468
]
468469
},

data/json/items/generic.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,6 +3525,11 @@
35253525
"weight": "75 kg",
35263526
"copy-from": "broken_turret"
35273527
},
3528+
{
3529+
"type": "ITEM",
3530+
"id": "broken_turret_rifle_balthazar",
3531+
"copy-from": "broken_turret_rifle"
3532+
},
35283533
{
35293534
"type": "ITEM",
35303535
"id": "broken_crows_m240",
@@ -3569,6 +3574,11 @@
35693574
"flags": [ "TRADER_AVOID", "NO_REPAIR", "NO_SALVAGE" ],
35703575
"melee_damage": { "bash": 4, "cut": 4 }
35713576
},
3577+
{
3578+
"type": "ITEM",
3579+
"id": "broken_secubot_balthazar",
3580+
"copy-from": "broken_secubot"
3581+
},
35723582
{
35733583
"type": "ITEM",
35743584
"id": "broken_talon_m202a1",

data/json/items/tool/radio_tools.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,5 +202,52 @@
202202
}
203203
],
204204
"tool_ammo": [ "battery" ]
205+
},
206+
{
207+
"id": "balthazar_radio",
208+
"type": "ITEM",
209+
"subtypes": [ "TOOL" ],
210+
"name": { "str": "modified radio" },
211+
"description": "A modified portable radio. A mess of metal and wires has been attached to the back and the frequency dial has been removed.",
212+
"//": "Slightly heavier and bulkier since it has had a block attached to the back",
213+
"weight": "325 g",
214+
"volume": "1250 ml",
215+
"price": "10 USD",
216+
"price_postapoc": "2 USD",
217+
"material": [ "plastic", "aluminum" ],
218+
"symbol": ";",
219+
"color": "light_gray",
220+
"faults": [ { "fault_group": "electronic_general" } ],
221+
"flags": [ "WATER_BREAK", "ELECTRONIC" ],
222+
"use_action": {
223+
"type": "effect_on_conditions",
224+
"menu_text": "Use radio",
225+
"effect_on_conditions": [
226+
{
227+
"id": "EOC_BALTHAZAR_RADIO_FALSE",
228+
"condition": { "u_has_mission": "MISSION_FIND_BALTHAZAR_BUNKER" },
229+
"effect": [ { "u_message": "You turn the radio on.\n\nJust static.", "popup": true } ]
230+
},
231+
{
232+
"id": "EOC_BALTHAZAR_RADIO_TRUE",
233+
"condition": { "not": { "u_has_mission": "MISSION_FIND_BALTHAZAR_BUNKER" } },
234+
"effect": [
235+
{
236+
"if": { "math": [ "balthazar_power < 50" ] },
237+
"then": {
238+
"u_message": "You turn on the radio. You hear a broadcast:\n\"If anyone can hear, I'm stuck in a bunker and need help. I'm also transmitting my coordinates. This message will repeat.\"\nYou note down the coordinates.",
239+
"popup": true
240+
},
241+
"else": {
242+
"u_message": "You turn on the radio. You hear a broadcast:\n\"If anyone who is listening to this broadcast is willing to do work for weapons, head to the transmitted coordinates. This message will repeat.\"\nYou write down the coordinates.",
243+
"popup": true
244+
}
245+
},
246+
{ "assign_mission": "MISSION_FIND_BALTHAZAR_BUNKER" }
247+
]
248+
}
249+
]
250+
},
251+
"melee_damage": { "bash": 6 }
205252
}
206253
]

0 commit comments

Comments
 (0)