From 1242c591ee8fff1af249dda26131abcebd534f74 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Thu, 28 Mar 2024 20:38:51 -0700 Subject: [PATCH] Tranzit: add Mystery Box at Tunnel and Cornfield --- README.md | 8 +-- maps/mp/zm_transit.d3dbsp | 72 ++++++++++++++++++++ scripts/zm/_zm_reimagined.gsc | 13 +++- scripts/zm/locs/zm_transit_loc_cornfield.gsc | 32 +++------ scripts/zm/locs/zm_transit_loc_diner.gsc | 4 +- scripts/zm/locs/zm_transit_loc_power.gsc | 4 +- scripts/zm/locs/zm_transit_loc_tunnel.gsc | 32 +++------ 7 files changed, 110 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 671853d9..83273396 100644 --- a/README.md +++ b/README.md @@ -867,6 +867,8 @@ * Added SVU-AS wallbuy at Cornfield * Added M27 to the Mystery Box * Added Fire Sale powerup +* Added Mystery Box at Tunnel +* Added Mystery Box at Cornfield * Power switch and Pack-a-Punch automatically crafted * Any door that requires a Turbine to open is automatically open whenever the power is on * Increased bus speed by 100% @@ -889,8 +891,8 @@ * Zombies spawn in the Warehouse zone when in the Outside Power Station zone before the Warehouse door is opened * Zombies spawn in the Outside Power Station zone when in the Fog After Power Station zone * Zombies spawn in the Warehouse zone when in the Fog After Power Station zone -* Added "Avenged Sevenfold - Carry On" song (activated by triggering the teddy bear in the Farm area last) -* Added "Skrillex - Try It Out" song (activated by triggering the teddy bear in the Bus Depot area last) +* Added "Avenged Sevenfold - Carry On" song (activated by triggering the teddy bear at Farm last) +* Added "Skrillex - Try It Out" song (activated by triggering the teddy bear at Bus Depot last) * Quest: added "Benn - Just Like You" song * Quest: increased pylon powerup drop rate from 4-12 minutes to 2-6 minutes * Quest (Maxis): Avogadro step only requires 1 Turbine under the pylon @@ -932,13 +934,11 @@ #### Tunnel * Wallbuys: SMR, Ballista, Vector K10, SWAT-556 Semtex, Bowie Knife -* Added Mystery Box location * Perks: Jugger-Nog, Quick Revive, Speed Cola, Double Tap, Stamin-Up * Pack-a-Punch #### Cornfield * Wallbuys: SMR, Ballista, B23R, MSMC, Vector K10, SWAT-556 Remington 870 MCS, Semtex, Claymore -* Added Mystery Box location * No perks * Pack-a-Punch diff --git a/maps/mp/zm_transit.d3dbsp b/maps/mp/zm_transit.d3dbsp index 1083f9ef..57ee1015 100644 --- a/maps/mp/zm_transit.d3dbsp +++ b/maps/mp/zm_transit.d3dbsp @@ -26726,6 +26726,78 @@ "guid" "4EFDB2AC" } { +"classname" "script_struct" +"zombie_cost" "950" +"script_noteworthy" "tunnel_chest" +"targetname" "treasure_chest_use" +"angles" "0 89 0" +"origin" "-10803 -1897 209" +"guid" "4A436038" +} +{ +"classname" "zbarrier_zmcore_MagicBox" +"zbarrierboardanim5" "o_zombie_magic_box_teddy_rise" +"zbarriertearanim5" "o_zombie_magic_box_weapon_dual_rise" +"zbarrierboardmodel5" "tag_origin" +"zbarrierboardanim4" "o_zombie_magic_box_teddy_rise" +"zbarriertearanim4" "o_zombie_magic_box_weapon_rise" +"zbarrierboardmodel4" "tag_origin" +"zbarrierboardanim3" "o_zombie_magic_box_close" +"zbarriertearanim3" "o_zombie_magic_box_open" +"zbarrierboardmodel3" "p6_anim_zm_magic_box" +"zbarrierboardanim2" "o_zombie_magic_box_leave" +"zbarriertearanim2" "o_zombie_magic_box_arrive" +"zbarrierboardmodel2" "p6_anim_zm_magic_box" +"zbarrierboardanim1" "o_zombie_magic_box_fake_idle_twitch_a" +"zbarriertearanim1" "o_zombie_magic_box_fake_idle_twitch_b" +"zbarrierboardmodel1" "p6_anim_zm_magic_box_fake" +"zbarriernumboards" "5" +"showupgradedmodel" "0" +"showalternatemodel" "0" +"barrieranimtime" "0" +"angles" "0 89 0" +"type" "zmcore_MagicBox" +"origin" "-10803 -1897 209" +"script_noteworthy" "tunnel_chest_zbarrier" +"guid" "C82823B1" +} +{ +"classname" "script_struct" +"zombie_cost" "950" +"script_noteworthy" "cornfield_chest" +"targetname" "treasure_chest_use" +"angles" "0 180 0" +"origin" "13337 72 -176" +"guid" "4A436037" +} +{ +"classname" "zbarrier_zmcore_MagicBox" +"zbarrierboardanim5" "o_zombie_magic_box_teddy_rise" +"zbarriertearanim5" "o_zombie_magic_box_weapon_dual_rise" +"zbarrierboardmodel5" "tag_origin" +"zbarrierboardanim4" "o_zombie_magic_box_teddy_rise" +"zbarriertearanim4" "o_zombie_magic_box_weapon_rise" +"zbarrierboardmodel4" "tag_origin" +"zbarrierboardanim3" "o_zombie_magic_box_close" +"zbarriertearanim3" "o_zombie_magic_box_open" +"zbarrierboardmodel3" "p6_anim_zm_magic_box" +"zbarrierboardanim2" "o_zombie_magic_box_leave" +"zbarriertearanim2" "o_zombie_magic_box_arrive" +"zbarrierboardmodel2" "p6_anim_zm_magic_box" +"zbarrierboardanim1" "o_zombie_magic_box_fake_idle_twitch_a" +"zbarriertearanim1" "o_zombie_magic_box_fake_idle_twitch_b" +"zbarrierboardmodel1" "p6_anim_zm_magic_box_fake" +"zbarriernumboards" "5" +"showupgradedmodel" "0" +"showalternatemodel" "0" +"barrieranimtime" "0" +"angles" "0 180 0" +"type" "zmcore_MagicBox" +"origin" "13337 72 -176" +"script_noteworthy" "cornfield_chest_zbarrier" +"guid" "C82823B2" +} +{ "model" "*125" "origin" "1444 -1878 140" "classname" "info_volume" diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index acf85a29..d9c79580 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -216,7 +216,18 @@ spawn_mystery_box_blocks_and_collision() continue; } - if (level.script == "zm_highrise") + if (level.script == "zm_transit") + { + if (chest.script_noteworthy == "tunnel_chest") + { + chests_to_spawn_ents[chests_to_spawn_ents.size] = chest; + } + else if (chest.script_noteworthy == "cornfield_chest") + { + chests_to_spawn_ents[chests_to_spawn_ents.size] = chest; + } + } + else if (level.script == "zm_highrise") { if (chest.script_noteworthy == "gb1_chest") { diff --git a/scripts/zm/locs/zm_transit_loc_cornfield.gsc b/scripts/zm/locs/zm_transit_loc_cornfield.gsc index a0e18648..dbe5e81c 100644 --- a/scripts/zm/locs/zm_transit_loc_cornfield.gsc +++ b/scripts/zm/locs/zm_transit_loc_cornfield.gsc @@ -81,40 +81,26 @@ struct_init() precache() { - start_chest_zbarrier = getEnt("start_chest_zbarrier", "script_noteworthy"); - start_chest_zbarrier.origin = (13487, 33, -182); - start_chest_zbarrier.angles = (0, 90, 0); - start_chest = spawnStruct(); - start_chest.origin = start_chest_zbarrier.origin; - start_chest.angles = start_chest_zbarrier.angles; - start_chest.script_noteworthy = "start_chest"; - start_chest.zombie_cost = 950; - collision = spawn("script_model", start_chest_zbarrier.origin + (0, 0, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - collision = spawn("script_model", start_chest_zbarrier.origin + (0, -32, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - collision = spawn("script_model", start_chest_zbarrier.origin + (0, 32, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - level.chests = []; - level.chests[0] = start_chest; } main() { + treasure_chest_init(); init_barriers(); disable_zombie_spawn_locations(); setup_standard_objects("cornfield"); - maps\mp\zombies\_zm_magicbox::treasure_chest_init(random(array("start_chest"))); scripts\zm\locs\loc_common::init(); } +treasure_chest_init() +{ + chest = getstruct("cornfield_chest", "script_noteworthy"); + level.chests = []; + level.chests[0] = chest; + maps\mp\zombies\_zm_magicbox::treasure_chest_init("cornfield_chest"); +} + init_barriers() { model = spawn("script_model", (10176.5, -14.8391, -221.988), 1); diff --git a/scripts/zm/locs/zm_transit_loc_diner.gsc b/scripts/zm/locs/zm_transit_loc_diner.gsc index 5832636b..3aae1070 100644 --- a/scripts/zm/locs/zm_transit_loc_diner.gsc +++ b/scripts/zm/locs/zm_transit_loc_diner.gsc @@ -146,9 +146,9 @@ main() treasure_chest_init() { - chests = getstructarray("treasure_chest_use", "targetname"); + chest = getstruct("start_chest", "script_noteworthy"); level.chests = []; - level.chests[0] = chests[3]; + level.chests[0] = chest; maps\mp\zombies\_zm_magicbox::treasure_chest_init("start_chest"); } diff --git a/scripts/zm/locs/zm_transit_loc_power.gsc b/scripts/zm/locs/zm_transit_loc_power.gsc index 9daff275..bc3dbbea 100644 --- a/scripts/zm/locs/zm_transit_loc_power.gsc +++ b/scripts/zm/locs/zm_transit_loc_power.gsc @@ -91,9 +91,9 @@ main() treasure_chest_init() { - chests = getstructarray("treasure_chest_use", "targetname"); + chest = getstruct("pow_chest", "script_noteworthy"); level.chests = []; - level.chests[0] = chests[2]; + level.chests[0] = chest; maps\mp\zombies\_zm_magicbox::treasure_chest_init("pow_chest"); } diff --git a/scripts/zm/locs/zm_transit_loc_tunnel.gsc b/scripts/zm/locs/zm_transit_loc_tunnel.gsc index f214e623..7e139ee7 100644 --- a/scripts/zm/locs/zm_transit_loc_tunnel.gsc +++ b/scripts/zm/locs/zm_transit_loc_tunnel.gsc @@ -30,39 +30,25 @@ struct_init() precache() { - start_chest_zbarrier = getEnt("start_chest_zbarrier", "script_noteworthy"); - start_chest_zbarrier.origin = (-10803, -1897, 196); - start_chest_zbarrier.angles = (0, 89, 0); - start_chest = spawnStruct(); - start_chest.origin = start_chest_zbarrier.origin; - start_chest.angles = start_chest_zbarrier.angles; - start_chest.script_noteworthy = "start_chest"; - start_chest.zombie_cost = 950; - collision = spawn("script_model", start_chest_zbarrier.origin + (0, 0, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - collision = spawn("script_model", start_chest_zbarrier.origin + (0, -32, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - collision = spawn("script_model", start_chest_zbarrier.origin + (0, 32, 64), 1); - collision.angles = start_chest_zbarrier.angles; - collision setmodel("collision_clip_32x32x128"); - collision disconnectpaths(); - level.chests = []; - level.chests[0] = start_chest; } main() { + treasure_chest_init(); init_barriers(); disable_zombie_spawn_locations(); - maps\mp\zombies\_zm_magicbox::treasure_chest_init(random(array("start_chest"))); scripts\zm\locs\loc_common::init(); } +treasure_chest_init() +{ + chest = getstruct("tunnel_chest", "script_noteworthy"); + level.chests = []; + level.chests[0] = chest; + maps\mp\zombies\_zm_magicbox::treasure_chest_init("tunnel_chest"); +} + init_barriers() { origin = (-11270, -500, 255);