Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RDY] Enable frostbite, remove cold damage #18401

Closed
wants to merge 14 commits into from
Closed

[RDY] Enable frostbite, remove cold damage #18401

wants to merge 14 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 18, 2016

Whether due to glitch or because someone forgot, I realized just now that frostbite was actually disabled this entire time due to not having a "maximum intensity" value.

Using a completely average survivor as a baseline, these settings cause 20-30 damage to affected limbs if they are treated within half an hour or so of becoming frostbitten. Limb loss becomes more likely if frostbite is not taken care for an hour or longer.

On a slightly related note: Does losing the functionality of arms actually do anything? Losing legs I could see doubled movement costs, essentially forcing the survivor to crawl around, but I couldn't notice any changes when my survivor lost both his arms.

@pisskop
Copy link
Contributor

pisskop commented Sep 18, 2016

arm loss prevents the use of weapons the weigh more than 2kg(?) and of a certain volume. however if a 2h weapon is equipped before limb loss or wearing a limb restricting item it isnt applied to that.

this change sounds like it would make most nonshelter starts untenable, or needlessly complicated by adding exhorbrant pain on top of a flat speed penalty on top of actual damage. frostbite recovery doesnt, shouldnt causr damage

@ghost
Copy link
Author

ghost commented Sep 18, 2016

Really, I've always been annoyed by how non-punishing exposure to the cold is in Cataclysm. Surviving the elements is probably the biggest part of the game besides scavenging and killing zeds. The only thing that's prevented me from implementing a hypothermia mechanic is the fact that I don't know how to code in C++ (yet). As for non-shelter starts, its simply a matter of giving certain outdoor professions (like Lumberjacks) scarves to warm their hands - if it really does become a problem, that is.

That being said - Remember that frostbite IS very fatal in real life. It's not something to scoff at.

@@ -823,15 +823,8 @@
"speed_mod": [-2]
},
"scaling_mods": {
"speed_mod": [-7],
"int_mod": [-0.5],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cold was dangerous before because it sliwed you down, took away your ability to function. these supporting penalties added up per body part.

@@ -896,7 +895,9 @@
"desc": ["Your %s is starting to feel the damage cold has wrought."],
"part_descs": true,
"base_mods": {
"pain_max_val": [40],
"hurt_min": [1],
"hurt_chance": [12],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of the damage of frostbite has already been done. lingering damage might be possible, but in no way is the bulk of frostbite damage suddenly appearing once a person gets inside. pain yes. crippling damage no. this should be at least lower than the damage of being frostbitten.

@DangerNoodle
Copy link
Contributor

Agreeing with @pisskop here, the speed reduction from extreme cold is already a major killer for players.

Having massive limb damage will make things worse, and having it more intense when thawing out will make this both unrealistic and a detriment to gameplay.

@Coolthulhu
Copy link
Contributor

Now, frostbitten bodyparts will become damaged at a slow rate, and while they are thawing they will experience rapid damage (and immense pain).

I don't like that thawing part. It sounds counterintuitive and like a noob trap.
The pain part is fine, just not the damage during thawing part.

"dur_add_perc": 0,
"scaling_mods": {
"speed_mod": [-5]
"speed_mod": [-5],
"pkill_tick": [10],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs.
All tabs should be replaced with 4 spaces.

@DangerNoodle
Copy link
Contributor

Lingering blistering should possibly also starting to show up, somewhere in between frostnip and actual deep tissue damage. Ideally ensure the effects are spread out. A few hours in spring weather that is only chilly shouldn't penalize the player too severely, whereas an unprepared trip to an ice lab, or a winter start, should be where the major risks start showing up.

@ghost
Copy link
Author

ghost commented Sep 18, 2016

The reason I made damage primarily occur during the thawing process is because there's few other ways to make frostbite an "all or nothing" kind of deal. There shouldn't really be a 'gradient' of frostbite, you either have it or you don't, and if you have it it's going to be very dangerous. Ideally speaking, it should be a kind of 'point of no return', which can't really happen if the damage is instead migrated to frostbite itself rather than the thawing process.
Unless someone has a suggestion on how to change up the damage?

@pisskop
Copy link
Contributor

pisskop commented Sep 18, 2016

Frostbite isnt an all or nothing. Theres degrees of it, including that tingling in your body before it goes numb.

@ghost
Copy link
Author

ghost commented Sep 18, 2016

Yes, that would be frostnip, which serves as a warning. The point being that 'frostbite', as its currently coded in the game, is the point where all the water in an extremity or body-part is frozen entirely - meaning 4th degree frostbite.

@Coolthulhu
Copy link
Contributor

Could be applied as a hit to the part the moment it gets frozen.
Though I'm not sure if we need to simulate it like that at all. We don't have good warnings that frostbite is about to hit (those random "omg frostbite in 3 seconds!" often happen way too soon to count) and serious effects shouldn't happen out of the blue.

@pisskop
Copy link
Contributor

pisskop commented Sep 18, 2016

I wish you would add back in the debuffs on int, dex, etc. for being cold.

@ghost
Copy link
Author

ghost commented Sep 18, 2016

This is actually something I considered, until I realized that there are hard-coded stat penalties for frostbite. (-2 per for mouth, -6 dex for hands, etc) I'm unsure of how to balance it with that in mind.
Any suggestions?

@DangerNoodle
Copy link
Contributor

I agree with @Coolthulhu that it might be unnecessary, given the potential reactions to realistic features that might detract from gameplay.

Greatly expanding the possible effects so we have the full range of first degree (frostnip) to fourth degree (kiss your limbs goodbye) might have merit, if this ensures that you have to endure prolonged exposure to cold before the most severe penalties ensue.

Enough to give a player in an exposed starting condition (like wilderness, winter start) a reasonable amount of time to at least attempt to correct their clothing problems. Most likely this should not have a major effect on most players with respect to their early-game habits. I do not know how common this habit is, but personally I always make my first priority to shore up any clothing problems, even if a speed penalty from chilly is the only problem it solves.

@ghost
Copy link
Author

ghost commented Sep 18, 2016

Frostbite is currently handled, mostly, through a form of C++ voodoo that I'm unfamiliar with in which every limb keeps track of its own "frostbite timer" (you can see these numbers in every save file) and that number is what determines severity, as well as how long the affected limb needs to be defrosted. I'm afraid simply editing the effects.json won't be enough to add two more degrees of severity to it, even if it is a good idea.

Alas, I am but a humble JSON fiddler. Nothing more.

@DangerNoodle
Copy link
Contributor

It would be easier if the frostbite mechanism could be converted to a format editable in JSON.

@ghost
Copy link
Author

ghost commented Sep 19, 2016

Any additional comments? Should cold still give int/dex penalties along with the penalties of frostbite?

@DangerNoodle
Copy link
Contributor

Dexterity penalties seem reasonable for extremities, while intellect penalties might be more sensible for hypothermia and thus be linked to the head and torso.

@ghost
Copy link
Author

ghost commented Sep 19, 2016

This is what frostbite already does, however cold penalties can't be one thing or another (due to the nature of effects), either it always gives int/dex penalties (regardless of if the mouth or foot or torso is cold) or it doesn't at all.

@DangerNoodle
Copy link
Contributor

Ah, peculiar.

@schmithub
Copy link

Horrible idea that just ruins gameplay.

@DangerNoodle
Copy link
Contributor

As I have said, if the worst penalties are delayed sufficiently, to give players a fair amount of time to mitigate the threat, it can be a decent idea. But in its current form I suspect it is a detriment to gameplay, and we have had enough gameplay-harming elements of realism as it is.

@Mecares
Copy link
Contributor

Mecares commented Sep 19, 2016

It seems very counter intuitive to punish wrong behavior harder once you stopped it.

@ghost
Copy link
Author

ghost commented Sep 19, 2016

PR has already been changed so that majority of damage occurs in frostbite rather than thawing state.
Forgot to mention.

@DangerNoodle
Copy link
Contributor

I see. Not entirely sure what to make of it, but seems to confirm that wind plays some part.

@ghost
Copy link
Author

ghost commented Oct 10, 2016

What I also found surprising is that wetness plays a somewhat big part in calculating the temperature of bodyparts as well, and while water seems to always be in the "Comfortable" range of temperature (even in the middle of winter) once you actually get out of the water you will notice your limbs being colder than usual due to the wetness. Because this affects windchill resistance and ambient temperature resistance, this also worsens / potentially triggers the onset of frostbite. So, bring a towel!

        // Handle the frostbite timer
        // Need temps in F, windPower already in mph
        int wetness_percentage = 100 * body_wetness[i] / drench_capacity[i]; // 0 - 100
        // Warmth gives a slight buff to temperature resistance
        // Wetness gives a heavy nerf to temperature resistance
        int Ftemperature = int( g->get_temperature() +
                                warmth( ( body_part )i ) * 0.2 - 20 * wetness_percentage / 100 );
        // Windchill reduced by your armor
        int FBwindPower = int( total_windpower * ( 1 - get_wind_resistance( body_part( i ) ) / 100.0 ) );

        int intense = get_effect_int( effect_frostbite, ( body_part )i );

@DangerNoodle
Copy link
Contributor

I assume this is a model of evaporative cooling?

@ghost
Copy link
Author

ghost commented Oct 11, 2016

Possibly, that and the fact that being wet saps body-heat a huge degree more than when you're dry. Get your hands wet and go outside on a cold day you'll see what I mean.

@DangerNoodle
Copy link
Contributor

That too. Though I wonder how much heat loss one expriences in reality staying in water versus getting out of it. Bodies of water do additionally take time to heat up and cool down, though the exaggerated behavior here likely is not intended.

@ghost
Copy link
Author

ghost commented Oct 11, 2016

It's likely a result of below-freezing water being...well, frozen. There is no code in place on how to handle frozen bodies of water in the overworld. Hence why I think it's perpetually kept at a certain temperature. But at the same time this means that diving into water in the middle of the winter is an entirely viable strategy for preventing hypothermia and frostbite, which is of course absurd.

@DangerNoodle
Copy link
Contributor

True, actual freezing water likely is not implemented because it would be difficult. Then again, seasonal variants of terrain items do exist, so it would be possible to add winter variants that behave differently. It

That would still not have the desired effect though, as there would be no sane way to implement frozen surfaces (and liquid water underneath), might break swimming creatures/boats, etc.

@Coolthulhu
Copy link
Contributor

Not sure what to do with this, @Coolthulhu?

I'm not sure either.

It re-enables a bunch of dead code, which is a good thing because dead code should either stop being dead or get removed, but I'm not sure if frostbite is actually a good thing to have in the game.

If it was a new idea being added, I'd most likely shoot it down. Frostbite does sound like that needless realism we are trying to avoid recently.
Especially since we already have damage from cold.

I'd like someone to make a convincing case for why should frostbite be in the game using no arguments like "because this is what happens in real life".

@BorkBorkGoesTheCode
Copy link
Contributor

I'd like someone to make a convincing case for why should frostbite be in the game using no arguments like "because this is what happens in real life".

What does the playerbase want out of a session of Cataclysm DDA?

@ghost
Copy link
Author

ghost commented Oct 11, 2016

Especially since we already have damage from cold.

Note that this disables damage from cold itself, now only frostbite causes direct damage

@DangerNoodle
Copy link
Contributor

I'd like someone to make a convincing case for why should frostbite be in the game using no arguments like "because this is what happens in real life".

As far as I can tell, it depends on how this rework affects the penalties for minor chills. While the frostbite really only punishes players, ideally it should only punish players who deliberately do absurd things like run around naked in winter (and running around naked in a zombie game is a bad idea). I suspect in that instance, the result is simply further discouraging players not to do something that they have ample reason to avoid in the first place (the same reason why filthy clothing was not an ideal addition).

If there is any potential player benefit to be gained here, it depends on how this pull request affects the lower levels of cold, in particular chilly. I do not know whether the speed penalties are affected, but if a single body part being chilly becomes tolerable, that on its own is a massive positive.

The majority of players are not going to encounter freezing conditions. Generally they will end up with isolated instances of chilly, cold, or rarely very cold body parts.

@DangerNoodle
Copy link
Contributor

Or to summarize, it runs the risk of penalizing actions that are already balanced against, but unlike other examples of this, this situation is rare to begin with and has less potential for backlash.

Additionally, a general rework of penalties for cold is potentially desirable and can benefit the player, and would logically be related to this pull request.

@Oskar636
Copy link

Even if you don't add it to the core game, I still think it should be a mod so the player can decide to turn it on. That's if you don't want to add it to the core.

@DangerNoodle
Copy link
Contributor

Mods for content that require source changes to work are generally awkward though.

@ghost
Copy link
Author

ghost commented Oct 11, 2016

If there is any potential player benefit to be gained here, it depends on how this pull request affects the lower levels of cold, in particular chilly.

As stated above, Frostbite cannot occur unless the ambient temperature is below 32F or very close to it w/ windchill. Thus "chilly" levels of cold are not prone to contracting anything except Frostnip.

I do not know whether the speed penalties are affected, but if a single body part being chilly becomes tolerable, that on its own is a massive positive.

Speed penalties for coldness are nerfed from -7 to -4 per intensity, as well as removing the damage and INT/DEX penalties (these occur at Frostbite now)

@DangerNoodle
Copy link
Contributor

That sounds like pre-pull-request behavior though. It has spammed messages and caused frostnip for being chilly, but I do not recall frostnip doing much at all.

@ghost
Copy link
Author

ghost commented Oct 11, 2016

Frostnip now causes a bit of pain (up to 20, gradually) and is meant to act as a warning for the player to warm up.

@ghost
Copy link
Author

ghost commented Oct 11, 2016

Beyond all of this, I'd like to note that this PR would actually reduce the amount of player-hassle. Along with cold speed penalties being reduced, now damage and DEX/INT penalties only occur at Very Cold temperatures with windchill (in the form of Frostbite itself), whereas before it would occur at Cold/Very Cold temperatures alone. Besides Chilly levels of cold causing Frostnip at its lower levels, this PR decreases the potential for the player to take damage / stat penalties from being exposed to the cold compared to before.

@DangerNoodle
Copy link
Contributor

That does seem like a reasonable argument in favor of it. Making the penalties for less severe cold less, well, severe, while making the other extreme more severe.

@ghost
Copy link
Author

ghost commented Oct 11, 2016

That is essentially what I'm going for, yes. Hence why at the beginning of the PR frostbite caused 80-90 damage within 1 hour instead of 20-30 now. I preferred the slope of severity between "Chilly" and "Very Cold" to be steeper than it was. Though perhaps too steep, according to feedback.

@Oskar636
Copy link

Mods for content that require source changes to work are generally awkward

How about making it an option in the settings menu? Would that make it better?

@ghost ghost changed the title [RDY] Enable frostbite, change cold damage [RDY] Enable frostbite, remove cold damage Oct 15, 2016
@ghost
Copy link
Author

ghost commented Oct 15, 2016

So, this PR's been up for about a month now. Is there any particular reason it hasn't been committed yet? Any problem that I've overlooked?

@Coolthulhu
Copy link
Contributor

The problem is that the frostbite that is being re-enabled is pretty badly designed.
It isn't communicated well to the player - random messages are horrible.
Mechanically, the only real change is that cold damage moves from freezing temperature to cold+extra time, so I guess it's fine.

I'd accept it if the messages were changed to appear when frostbite timer crosses half the necessary value.
That is, save frostbite timer for part, check for increase, possibly increase, check if it went above 1.5 of the per-stage value, display warning if it did, if it didn't check if it went above 0.5 and display warning if it did.
By "went above" I meant "pre-increase value was below it, post-increase was above".

The timer has breakpoints at 1800 and 3600, so you should warn on 900 and 2700.

@ghost
Copy link
Author

ghost commented Oct 16, 2016

Sadly, I'm not yet confident enough in my C++ skills to do that without fear of breaking something somewhere, since currently frostbite warning is tied to per-tick exposure (Medium or high risk zones) rather than cumulative total frostbite-timer.

Beyond that, I'd say its communicated rather well to the player - in the form of bombarding the player log with messages of "Your [x] will be frostbitten within a few hours!" if they are exposed enough to the cold for the frostbite timer to start ticking upwards. Random and spammy as it may be, it still gets the point across - even up to the point where it can become an annoyance.

@mugling
Copy link
Contributor

mugling commented Oct 30, 2016

Stalled?

@ghost
Copy link
Author

ghost commented Oct 30, 2016

Not sure. Should I just close the PR?

@ghost
Copy link
Author

ghost commented Nov 6, 2016

Paging Dr. @Coolthulhu , do I close this PR?

@Coolthulhu
Copy link
Contributor

If you can't fix the message, then it's better off closed.
We can't have random 20 or so damage without a proper warning and spamming the log is not proper.

@ghost ghost closed this Nov 7, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants