From d7308e78a7b11db03d094ffb466db2eeaa5a0d30 Mon Sep 17 00:00:00 2001 From: MaximusRexCM <104735529+MaximusRexCM@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:19:12 -0500 Subject: [PATCH] Flare Rework: Dying Light (#7582) # About the pull request I've always imagined what it'd feel like to play CM with more dynamic flares, and this PR aims to accomplish that. Flares will now behave more like their real life counterparts, starting off strong and slowly fading to darkness. This gives flares around 20% more total staying power, and to compensate, I have increased xenomorph flare damage via acid by 20% across the board. Flare Burnout: ~45 second burst of 7 tile radius, ~45 seconds of 6 tile radius, ~8.5 minutes of 5 tile(current strength) radius, ~1.5 minutes of 4 tile radius, ~1.5 minutes of 3 tile radius, ~1.5 minutes 2 tile radius, Initially I forgot starshells even existed, due to how rare it is to see anyone using them! It's a shame, and I've given them some love too. They have a 30 second variance on their initial fuel timer, which simulates the randomness of burning phosphorus. Burns down in a similar fashion to flares. Starshell burnout: 6 to 6.5 minute initial fuel variance. ~30 seconds 6 tile radius, ~3.5 minutes 5 tile radius, ~30 second 4/3/2 tile radius, and ~1 minute 1 tile light. Flare mortar shells now have a static radius of 7 and last a tad bit longer. Call them in more often! Flare gun unique-action creating an indestructible light source for extended period of time isn't what I want in this rework. Instead, they now produce a 3-minute 7 tile radius burst of light at slightly lower luminosity than standard flares. # Explain why it's good for the game Flare support is a VITAL part of the game, but frankly feels unrewarding with its current state. Having to chuck 4-5 flares to cover an area that you're only passing through feels wrong. This PR makes active flare use in a combat situation MUCH more rewarding in both gamefeel and tactical value, while also enhancing the atmosphere of a slowly darkening marine line. Starshells and flare mortars got some much needed love as well. I've tweaked the timings to what I think both feels good and is balanced. Numbers and timings totally up for change. # Testing Photographs and Procedure I rigorously tested flare timings, flare gun usage, and xeno acid dousing on local and found no issues. EDIT: Corrected unintended behavior from CAS flares. Additionally tested and fixed/changed flare mortars and starshells. More testing never hurts! A showcase of what I want dying light to feel like.
![7](https://github.com/user-attachments/assets/6e576402-e3e5-4940-aac8-26899f94e80e) ![6](https://github.com/user-attachments/assets/67cee68a-758b-412c-a4f8-5d3165166e29) ![5](https://github.com/user-attachments/assets/380c9968-5f42-4d1d-9375-261668ed59e4) ![4](https://github.com/user-attachments/assets/9b85be27-016b-41ea-b8b6-b81cec653fc3) ![3](https://github.com/user-attachments/assets/b975623f-eec2-42fe-a778-88f50a5d14b6) ![2](https://github.com/user-attachments/assets/b7305f3b-fe53-41ce-b19e-24687bdd74cc) ![1](https://github.com/user-attachments/assets/65fda18a-265e-4ef6-b802-fbd06a5f2d02) Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: MaximusRex balance: Increased flare duration from a variable 9.5 --> 10.5 minute length to 16 minutes flat. balance: Flares start out strong (7 radius) and burn down to nothingness. balance: Increased flare_damage from acid by 20% across the board. balance: Weak Acid: 150-->180 balance: Medium Acid: 500-->600 balance: Strong Acid: 1875 -->2250 (RIP flare) balance: Starshell ash fuel variance changed from (4.5 to 6.0) minutes ----> (6.0 to 6.5) minute variance. balance: Starshell ash starts out semi-bright (6 radius) and burns down to nothingness. balance: Flare Mortars now have a static 7 tile radius , and variably last from 5 to 6 minutes. balance: Flare gun unique-action now produces a static 7 tile radius light for 3 minutes. Slightly lower luminosity than normal. code: Implemented a new proc, flare_burn_down, and incorporated it into process(delta_time). /:cl: --------- Co-authored-by: MaximusRex --- code/game/objects/effects/aliens.dm | 6 +-- code/game/objects/items/devices/flashlight.dm | 53 +++++++++++++++++-- code/modules/projectiles/guns/flare_gun.dm | 5 +- 3 files changed, 55 insertions(+), 9 deletions(-) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 45fbd5d4ba2b..1677676c8553 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -302,7 +302,7 @@ /// Factor of duration between acid progression var/acid_delay = 1 /// How much fuel the acid drains from the flare every acid tick - var/flare_damage = 500 + var/flare_damage = 600 var/barricade_damage = 40 var/in_weather = FALSE @@ -311,7 +311,7 @@ name = "weak acid" acid_delay = 2.5 //250% delay (40% speed) barricade_damage = 20 - flare_damage = 150 + flare_damage = 180 icon_state = "acid_weak" //Superacid @@ -319,7 +319,7 @@ name = "strong acid" acid_delay = 0.4 //40% delay (250% speed) barricade_damage = 100 - flare_damage = 1875 + flare_damage = 2250 icon_state = "acid_strong" /obj/effect/xenomorph/acid/Initialize(mapload, atom/target) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index c7d03afe9c33..96f53d2c47f4 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -302,14 +302,14 @@ desc = "A red USCM issued flare. There are instructions on the side, it reads 'pull cord, make light'." w_class = SIZE_SMALL light_power = 2 - light_range = 5 + light_range = 7 icon_state = "flare" item_state = "flare" actions = list() //just pull it manually, neckbeard. raillight_compatible = 0 can_be_broken = FALSE var/burnt_out = FALSE - var/fuel = 0 + var/fuel = 16 MINUTES var/fuel_rate = AMOUNT_PER_TIME(1 SECONDS, 1 SECONDS) var/on_damage = 7 var/ammo_datum = /datum/ammo/flare @@ -327,7 +327,6 @@ /obj/item/device/flashlight/flare/Initialize() . = ..() - fuel = rand(9.5 MINUTES, 10.5 MINUTES) set_light_color(flame_tint) /obj/item/device/flashlight/flare/update_icon() @@ -362,9 +361,28 @@ /obj/item/device/flashlight/flare/process(delta_time) fuel -= fuel_rate * delta_time + flare_burn_down() if(fuel <= 0 || !on) burn_out() +/obj/item/device/flashlight/flare/proc/flare_burn_down() //Controls the way in which flares slowly die out. Needs to be overriden by children, or they will be forced to use this light behavior. + switch(fuel) //The code belows controls the timing on a flares burn out, and the corresponding reduction in effective range. + if(15.25 MINUTES to 16 MINUTES) + set_light_range(7) + if(14.5 MINUTES to 15.24 MINUTES) + set_light_range(6) + if(6.5 MINUTES to 14.49 MINUTES) + set_light_range(5) + if(5.0 MINUTES to 6.49 MINUTES) + set_light_range(4) + if(3.5 MINUTES to 4.99 MINUTES) + set_light_range(3) + if(2.0 MINUTES to 3.49 MINUTES) + set_light_range(2) + if(0 MINUTES to 1.99 MINUTES) + set_light_range(1) + set_light_power(0.5) // A power of 2 results in no light at all, while .5 results in a small light. + // Causes flares to stop with a rotation offset for visual purposes /obj/item/device/flashlight/flare/animation_spin(speed = 5, loop_amount = -1, clockwise = TRUE, sections = 3, angular_offset = 0, pixel_fuzz = 0) pixel_fuzz = 16 @@ -450,10 +468,14 @@ icon_state = "" //No sprite mouse_opacity = MOUSE_OPACITY_TRANSPARENT show_flame = FALSE + light_range = 7 /obj/item/device/flashlight/flare/on/illumination/Initialize() . = ..() - fuel = rand(4.5 MINUTES, 5.5 MINUTES) // Half the duration of a flare, but justified since it's invincible + fuel = rand(5.0 MINUTES, 6.0 MINUTES) // Approximately half the effective duration of a flare, but justified since it's invincible + +/obj/item/device/flashlight/flare/on/illumination/flare_burn_down() // Empty proc to override parent. + return /obj/item/device/flashlight/flare/on/illumination/update_icon() return @@ -472,12 +494,29 @@ anchored = TRUE//can't be picked up ammo_datum = /datum/ammo/flare/starshell show_flame = FALSE + light_range = 6 /obj/item/device/flashlight/flare/on/starshell_ash/Initialize(mapload, ...) if(mapload) return INITIALIZE_HINT_QDEL . = ..() - fuel = rand(4.5 MINUTES, 5.5 MINUTES) + fuel = rand(6.0 MINUTES, 6.5 MINUTES) + +/obj/item/device/flashlight/flare/on/starshell_ash/flare_burn_down() // Starshell's own burn_down curve, overrides parent flare. + switch(fuel) + if(6.0 MINUTES to 6.5 MINUTES) + set_light_range(6) + if(2.5 MINUTES to 5.99 MINUTES) + set_light_range(5) + if(2.0 MINUTES to 2.49 MINUTES) + set_light_range(4) + if(1.5 MINUTES to 1.99 MINUTES) + set_light_range(3) + if(1.0 MINUTES to 1.49 MINUTES) + set_light_range(2) + if(0 MINUTES to 0.99 MINUTES) + set_light_range(1) + set_light_power(0.5) /obj/item/device/flashlight/flare/on/illumination/chemical name = "chemical light" @@ -529,6 +568,7 @@ item_state = "cas_flare" layer = ABOVE_FLY_LAYER ammo_datum = /datum/ammo/flare/signal + light_range = 5 var/faction = "" var/datum/cas_signal/signal var/activate_message = TRUE @@ -539,6 +579,9 @@ . = ..() fuel = rand(160 SECONDS, 200 SECONDS) +/obj/item/device/flashlight/flare/signal/flare_burn_down() // Empty proc to override parent. + return + /obj/item/device/flashlight/flare/signal/attack_self(mob/living/carbon/human/user) if(!istype(user)) return diff --git a/code/modules/projectiles/guns/flare_gun.dm b/code/modules/projectiles/guns/flare_gun.dm index 407ecdf00066..7a2d0f0ddfb7 100644 --- a/code/modules/projectiles/guns/flare_gun.dm +++ b/code/modules/projectiles/guns/flare_gun.dm @@ -126,6 +126,9 @@ fired_flare.visible_message(SPAN_WARNING("\A [fired_flare] bursts into brilliant light in the sky!")) fired_flare.invisibility = INVISIBILITY_MAXIMUM fired_flare.mouse_opacity = FALSE + fired_flare.fuel = 3 MINUTES + fired_flare.light_range = 6 + fired_flare.light_power = 3 playsound(user.loc, fire_sound, 50, 1) var/obj/effect/flare_light/light_effect = new (fired_flare, fired_flare.light_range, fired_flare.light_power, fired_flare.light_color) @@ -146,7 +149,7 @@ desc = "You are not supposed to see this. Please report it." icon_state = "" //No sprite invisibility = INVISIBILITY_MAXIMUM - light_system = STATIC_LIGHT + light_system = MOVABLE_LIGHT /obj/effect/flare_light/Initialize(mapload, light_range, light_power, light_color) . = ..()