Giter VIP home page Giter VIP logo

Comments (4)

RenechCDDA avatar RenechCDDA commented on June 17, 2024 2

OK there is some interesting things going on here, all resolving around Character::update_bodytemp()

First up, your light eater trait is causing you to lose temperature.

// Hunger / Starvation
// -2C when about to starve to death
// -2.6666C when starving with light eater
// -4C if you managed to get 0 metabolism rate somehow
const float met_rate = metabolic_rate();

Removing that alone takes you from -39 displayed mouth warmth to -25. Lower metabolism resulting in lower overall body temperature makes sense in a biology/mutation context, but not "I picked light eater in chargen" sort of way.

But the big killer is that it depends on how tired you were.

// -1.725C when exhausted, scaled up and capped at 900 sleepiness.
const float scaled_sleepiness = clamp( get_sleepiness(), 0,
900 ) / static_cast<float>( sleepiness_levels::EXHAUSTED );
const units::temperature_delta sleepiness_warmth = has_sleep ? 0_C_delta : -1.725_C_delta *
scaled_sleepiness;

0 sleepiness, no light eater:

image

900 sleepiness (exhausted), light eater:

image

And you won't wake up unless your torso is in the danger zone:

if( temp_after <= BODYTEMP_VERY_COLD &&
get_sleepiness() <= sleepiness_levels::DEAD_TIRED && !has_bionic( bio_sleep_shutdown ) ) {
if( bp == body_part_torso ) {
add_msg( m_warning, _( "Your shivering prevents you from sleeping." ) );
wake_up();

from cataclysm-dda.

fairyarmadillo avatar fairyarmadillo commented on June 17, 2024 2

I'm pretty sure this is a very old bug and has gotten me a couple of times. I've noticed it particularly hitting when I was sick with a cold, though that may just be a coincidence. There's a lot of weird hardcoded stuff with cold/flu though, so it's possible something strange is happening there.

A couple of years ago, shivering was added which was supposed to prevent you from falling asleep while cold. This never worked right, and just made it impossible to sleep at all even in safe (but chilly) temperatures for a long time. Eventually this got "fixed" such that it was once again possible to freeze to death in your sleep. Better, I guess, but only because it's the sort of thing you can usually savescum around.

There's also some code involving limb HP and cold which should probably be removed. Limb damage reduces effective temperature on that limb which used to be a stand-in for things like blood loss, but now that we actually have hypovolemia, it no longer makes sense. That code should also be excised as it can cause bizarre things like having your legs break while you're asleep because it was 40 degrees and they were at half HP when you nodded off.

Mouth coldness is a weird idea and probably shouldn't be able to cause actual HP damage to the player. Yes frostbite exists and the nose is one of the places it can happen, but a fully bundled up guy is not going to die of hypothermia because his nose got frostbitten. Maybe mouth coldness should stop dealing HP damage until a wound system is added, at which point a frostbitten nose/mouth would be more dangerous due to the infection it would lead to.

At the very least, for hypothermia (which I assume is what head/torso damage from cold is trying to model), the mouth and head could be averaged rather than tracked separately.

from cataclysm-dda.

Vaskritaya avatar Vaskritaya commented on June 17, 2024 1

this bug report seems relevant. might not be a direct duplicate, but it definitely has some overlap (freezing head damage to sleep death) #72798

from cataclysm-dda.

Necrophobia avatar Necrophobia commented on June 17, 2024

After some digging, I found this post. So having both light eater and recycler unit is why I'm freezing to death in a 6C basement. A few thoughts:

  1. Some extra tooltip? Might well write it myself, but I'm not that fluent in english.
  2. Should recycler unit affect metabolism (by extension, lower body temperature) at all? Doesn't fit the description, what with "reclaiming waste liquid and nutrients" and such.

In the meantime, I'm going to try my luck with a JSON-based dirty "fix".

from cataclysm-dda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.