From c73e605b4bef6db6cdf09dcf2cc3ab153d6ecc01 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Thu, 22 Jan 2026 13:17:56 -0600 Subject: [PATCH] Pressure damage starts lower, increases over exposed time (#94710) ## About The Pull Request https://github.com/tgstation/tgstation/pull/93647#issuecomment-3449350868 Pressure damage starts at 2(*2) per life tick and increases by 0.5 every 1.2 minutes you are exposed to low pressure It's capped at 5(*2) damage per tick which takes 7.2 minutes of exposure to get to (or 216 life ticks) Here is the maths image `l` is 0 (don't worry about it) `u` is seconds exposed `n(x)` is new formula. Crit in 40 seconds (20 life ticks) `o(x)` is old (flat 2). Crit in 50 seconds (25 life ticks) `b(x)` is buffed (flat 4) Crit in 26 seconds (12.5 life ticks... it rounds up) ## Why It's Good For The Game I think the higher pressure damage is a bit harsh for people exposed for a short period of time, the damage slow down stacks up fast. By scaling it up over time, pressure damage becomes a lot harder to shrug off with chems, though doesn't overly punish people who are just caught unawares. This should assuage some of the pressure related concerns. ## Changelog :cl: Melbert balance: Pressure damage scales over time. It starts at 2 per second (pre-buff value) but increases by 0.5 damage every 1.2 minutes you are exposed, up to 5 per second (requiring 7.2 full minutes of exposure). /:cl: --- code/__DEFINES/atmospherics/atmos_mob_interaction.dm | 7 ++++--- code/modules/mob/living/carbon/human/_species.dm | 5 ++++- code/modules/mob/living/carbon/human/human.dm | 1 + code/modules/mob/living/carbon/human/human_defines.dm | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/atmospherics/atmos_mob_interaction.dm b/code/__DEFINES/atmospherics/atmos_mob_interaction.dm index 0d175710116..b050c221c58 100644 --- a/code/__DEFINES/atmospherics/atmos_mob_interaction.dm +++ b/code/__DEFINES/atmospherics/atmos_mob_interaction.dm @@ -99,11 +99,12 @@ /// Beyond this temperature, being on fire will increase body temperature by less and less #define BODYTEMP_FIRE_TEMP_SOFTCAP 1200 -/// The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE +/// The amount of pressure damage someone takes in a high pressure damage is equal to (pressure / HAZARD_HIGH_PRESSURE) * PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE #define PRESSURE_DAMAGE_COEFFICIENT 2 #define MAX_HIGH_PRESSURE_DAMAGE 2 -/// The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). -#define LOW_PRESSURE_DAMAGE 4 +/// The amount of damage someone takes when in a low pressure area scales up over time, starting at BASE_LOW_PRESSURE_DAMAGE, up to MAX_LOW_PRESSURE_DAMAGE. +#define BASE_LOW_PRESSURE_DAMAGE 2 +#define MAX_LOW_PRESSURE_DAMAGE (BASE_LOW_PRESSURE_DAMAGE * 2.5) /// Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this #define COLD_SLOWDOWN_FACTOR 20 diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index d15215a79c5..406b3eb8e26 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -1324,6 +1324,7 @@ GLOBAL_LIST_EMPTY(features_by_species) // No pressure issues here clear pressure alerts if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE) H.clear_alert(ALERT_PRESSURE) + H.seconds_in_low_pressure = 0 // Low pressure here, show an alert if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE) @@ -1332,6 +1333,7 @@ GLOBAL_LIST_EMPTY(features_by_species) H.clear_alert(ALERT_PRESSURE) else H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 1) + H.seconds_in_low_pressure = 0 // Very low pressure, show an alert and take damage else @@ -1339,9 +1341,10 @@ GLOBAL_LIST_EMPTY(features_by_species) if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE)) H.clear_alert(ALERT_PRESSURE) else - var/pressure_damage = LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick + var/pressure_damage = min(round(1 + (H.seconds_in_low_pressure / 80 SECONDS), 0.05) * BASE_LOW_PRESSURE_DAMAGE, MAX_LOW_PRESSURE_DAMAGE) * H.physiology.pressure_mod * H.physiology.brute_mod * seconds_per_tick H.adjust_brute_loss(pressure_damage, required_bodytype = BODYTYPE_ORGANIC) H.throw_alert(ALERT_PRESSURE, /atom/movable/screen/alert/lowpressure, 2) + H.seconds_in_low_pressure += seconds_per_tick /** * Handles exposure to the skin of various gases. diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5c6445fbf27..b62b0f347aa 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -703,6 +703,7 @@ if(heal_flags & HEAL_TEMP) set_coretemperature(get_body_temp_normal(apply_change = FALSE)) heat_exposure_stacks = 0 + seconds_in_low_pressure = 0 return ..() diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index c377632f2f4..67e6185d28e 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -90,3 +90,6 @@ VAR_PRIVATE/base_mob_height = HUMAN_HEIGHT_MEDIUM /// Actual height of the mob. Don't touch this one, it is set via update_mob_height() VAR_FINAL/mob_height = HUMAN_HEIGHT_MEDIUM + + /// Tracks how long in seconds we've been in a low pressure environment + VAR_FINAL/seconds_in_low_pressure = 0