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

Can't eat or drink enough to hibernate. #30370

Open
Sooose opened this issue May 10, 2019 · 8 comments
Open

Can't eat or drink enough to hibernate. #30370

Sooose opened this issue May 10, 2019 · 8 comments
Labels
<Bug> This needs to be fixed Mechanics: Character / Player Character / Player mechanics Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Sooose
Copy link

Sooose commented May 10, 2019

Describe the bug
Can't eat or drink enough to do ursine hibernation. After eating 100 chunks of fat I verified via debug that my hunger never went lower than -15. I tried drinking as much water as I could in a similar manner and my thirst never went below -140. These numbers would quickly bounce back from their values after an hour or so making it impossible to reach the negative values of hunger and thirst required to hibernate.

To Reproduce
Steps to reproduce the behavior:

  1. Eat enough chunks of fat to directly substitute body fat.
  2. Drink enough water to get water intoxication.
  3. Wonder where it all goes.

Expected behavior
To be able to hibernate.

Versions and configuration(please complete the following information):

  • OS: [e.g. iOS 8 or Windows 10 or Ubuntu 18.04]
  • Game Version: 0.D-2582-g5bef056
  • Graphics version: MSX++LIVE_PEOPLE (tiles)
  • Mods loaded: Dark Days Ahead, Disable NPC Needs

Additional context
Add any other context about the problem here.
Save game: https://puu.sh/Dql6K.zip

Edit: Edited grammar.

@ifreund ifreund added <Bug> This needs to be fixed Mechanics: Character / Player Character / Player mechanics Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies labels May 11, 2019
@Saicchi
Copy link
Contributor

Saicchi commented May 10, 2021

Can't replicate on 0.E-10474-g1ae66c97a0 [64-bit].
The save file download returns a That puush could not be found. page.

@anothersimulacrum anothersimulacrum added (S1 - Need confirmation) Report waiting on confirmation of reproducibility and removed <Bug> This needs to be fixed labels Jun 5, 2021
@int-ua
Copy link
Contributor

int-ua commented Jun 24, 2021

So you can hibernate in a fresh version, right?

@stale
Copy link

stale bot commented Jul 30, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Jul 30, 2021
@hexagonrecursion
Copy link
Contributor

hexagonrecursion commented Aug 9, 2021

@Sooose I was unable to download the file. Could you please upload it somewhere more permanent like the Internet Archive?

@stale stale bot removed the stale Closed for lack of activity, but still valid. label Aug 9, 2021
@hexagonrecursion
Copy link
Contributor

Things are at least partially broken. No matter how much clean water I drink thirst never goes below -99, but this code expects it to go below -600

const bool hibernate = has_active_mutation( trait_HIBERNATE );
if( hibernate ) {
if( ( nutr > 0 && get_hunger() < -60 ) || ( comest.quench > 0 && get_thirst() < -60 ) ) {
// Tell the player what's going on
add_msg_if_player( _( "You gorge yourself, preparing to hibernate." ) );
if( one_in( 2 ) ) {
// 50% chance of the food tiring you
mod_fatigue( nutr );
}
}
if( ( nutr > 0 && get_hunger() < -200 ) || ( comest.quench > 0 && get_thirst() < -200 ) ) {
// Hibernation should cut burn to 60/day
add_msg_if_player( _( "You feel stocked for a day or two. Got your bed all ready and secured?" ) );
if( one_in( 2 ) ) {
// And another 50%, intended cumulative
mod_fatigue( nutr );
}
}
if( ( nutr > 0 && get_hunger() < -400 ) || ( comest.quench > 0 && get_thirst() < -400 ) ) {
add_msg_if_player(
_( "Mmm. You can still fit some more in… but maybe you should get comfortable and sleep." ) );
if( !one_in( 3 ) ) {
// Third check, this one at 66%
mod_fatigue( nutr );
}
}
if( ( nutr > 0 && get_hunger() < -600 ) || ( comest.quench > 0 && get_thirst() < -600 ) ) {
add_msg_if_player( _( "That filled a hole! Time for bed…" ) );
// At this point, you're done. Schlaf gut.
mod_fatigue( nutr );
}
}

@Saicchi
Copy link
Contributor

Saicchi commented Aug 9, 2021

It seems things weren't broken in 0.E but got broken in 0.F. The hibernation process can start but is cut short when the player reaches 0 fatigue.

if( u.get_fatigue() <= 0 && u.get_fatigue() > -20 && !u.has_effect( effect_narcosis ) ) {
u.mod_fatigue( -25 );
if( u.get_sleep_deprivation() < SLEEP_DEPRIVATION_HARMLESS ) {
u.add_msg_if_player( m_good, _( "You feel well rested." ) );
} else {
u.add_msg_if_player( m_warning,
_( "You feel physically rested, but you haven't been able to catch up on your missed sleep yet." ) );
}
it.set_duration( 1_turns * dice( 3, 100 ) );
}

@hexagonrecursion
Copy link
Contributor

Another issue: there should probably be some feedback in chat when hibernation starts otherwise it may look like regular sleep

Cataclysm-DDA/src/character.cpp

Lines 10954 to 10965 in 7f33807

if( has_active_mutation( trait_HIBERNATE ) &&
get_kcal_percent() > 0.8f ) {
if( is_avatar() ) {
get_memorial().add( pgettext( "memorial_male", "Entered hibernation." ),
pgettext( "memorial_female", "Entered hibernation." ) );
}
// some days worth of round-the-clock Snooze. Cata seasons default to 91 days.
fall_asleep( 10_days );
// If you're not fatigued enough for 10 days, you won't sleep the whole thing.
// In practice, the fatigue from filling the tank from (no msg) to Time For Bed
// will last about 8 days.
}

@hexagonrecursion
Copy link
Contributor

I used debug to set fatigue to 10000 and was able to hibernate for 8 days. After 8 days I died of dehydration. Probably should have filled up on water first.

@wapcaplet wapcaplet added (S2 - Confirmed) Bug that's been confirmed to exist <Bug> This needs to be fixed and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Mechanics: Character / Player Character / Player mechanics Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

No branches or pull requests

7 participants