Garry's Mod

Garry's Mod

79 ratings
Hazardous Temperature Survival
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Roleplay, Realism
File Size
Posted
3.632 KB
2 Jan, 2017 @ 5:41am
1 Change Note ( view )

Subscribe to download
Hazardous Temperature Survival

Description
Description

Addon makes survival harder by adding the temperature factor. You can freeze to death or burn to ashes now. How lovely. So the addon works by adding 2 new global params - Air Temperature and Water Temperature.


How it works and what it adds

Every player has it's own 2 variables: External temperature(ET) and Internal temperature(IT). I tried to simulate real human body, so that's how it works in addon: ET is influenced by external params like Air, Water temperatures, whether the player is covered or running or inside a vehicle. IT variable is influenced only by ET. If a player is under a roof or inside a vehicle - his temperature will slowly be coming to normal. If player's IT bypasses certain point - either cools or heates too much - player will loose health, his screen will be bluried and his aim will be shaking, depending on how far he is from normal temperature.


Console

Clientside commands:
clim_debug - switches on/off the debug info which shows world and own temperature.

Serverside variables:
clim_hud_x - sets hud's top left corner X position on screen (values form 0 to 100)
clim_hud_y - sets hud's top left corner X position on screen (values form 0 to 100), values more than 100 will move HUD outside the screen
clim_hud_draw - sets whether client should draw hud or not (0/1)
clim_temp_min - sets minimal air temperature
clim_temp_max - sets maximal air temperature
clim_temp_rand - sets maximal dispersion of temperature value in degrees
clim_cycle_time - sets time over which the air temperature comes from max, to min and back up in seconds


Temperature cycle

Temperature passes from max to min and back up to max within the cycle and updates 100 times per cycle (for ex. cycle time = 1200 (default), temp updated every 12 seconds)
At the start of the cycle temp is equal to max value
This is done to simulate time of a day/season of a year
While doing tests I synched the temperature to atmos day/night addon and it looked pretty cool
You can set min and max values to the same number to keep the temperature roughly the same (or constant if you write "clim_temp_rand 0")


Ideas how to improve

- Convertion to Farenheit
- Temperature sources etc. firepits, heaters, coolers
- Wall detection, not only roof
- Clothing (very unprobable, cause this may interupt other addons)

Comment if you have any ideas on how to improve it or noticed any bugs (cause they are definetly there) and i'll try to fix them quickly
Popular Discussions View All (1)
4
28 Dec, 2018 @ 4:15am
Will there be an update?! / Будет ли обнова?
Zirata
34 Comments
Second Chance Junkyard 29 Oct, 2023 @ 2:31pm 
[Hazardous Temperature Survival] bad argument #3 to 'Add' (function expected, got nil)
1. Add - lua/includes/modules/hook.lua:31
2. unknown - lua/autorun/temperature.lua:85
Eclipse 27 May, 2023 @ 12:28am 
Does this have stormfox support?
Aki 27 Jan, 2023 @ 4:30pm 
There was another version of this but for vehicles, but i dont remember what it was called... All I know that your vehicle in Gmod can overheat, and or breakdown with certain weather environment's and you have to fix it with it's tools... It was really neat. :cozyroe3:
Rabbit 30 Nov, 2021 @ 11:45am 
Renea Hortha 20 Jul, 2021 @ 9:36am 
I think when player dies from freezing body must be turn into ice statue.
BrainyPepper 13 Apr, 2021 @ 9:12am 
It would be nice if the body temperature would reset when my character dies.
kiwi 6 May, 2020 @ 10:46am 
Still waiting for an update with coolers.
K 14 Jul, 2019 @ 1:24pm 
Too sad it's abandoned...
Delycan 10 Nov, 2018 @ 11:11am 
Too complex
Elvisnator 10 Nov, 2018 @ 9:34am 
i know how it will work with Stormfox
1. step: check Stormfox temperature
2. step: now, after you checked Sf temperature, you need to put in clim_hud_min (sf temp) and clim_hud_max (sf temp) and clim_hud_rand 0.
3. step: sadly, you or someone has to change temperature after 3-5 minutes.
4. step: enjoy!