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

Transformation Causing Excessive Calorie Consumption Readings #79574

Open
SleepsAlot8143 opened this issue Feb 7, 2025 · 3 comments
Open

Transformation Causing Excessive Calorie Consumption Readings #79574

SleepsAlot8143 opened this issue Feb 7, 2025 · 3 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@SleepsAlot8143
Copy link

Describe the bug

When transforming to and from human/war form/lupine form, the fitness band registers an excessive amount of calories consumed.

Attach save file

Haycock_copy-trimmed.tar.gz

Steps to reproduce

  1. Make a player with the background Werewolf, Natural-born (Species), and wearing a fitness band.
  2. Transform into War Form and transform back.
  3. Activate fitness band.

Expected behavior

I expect calories to remain even because no/little calories should be consumed when transforming.

Screenshots

Image
Image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.22631.4751 (23H2)
  • Game Version: cdda-experimental-2025-01-28-1359 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Sky Island [skyisland],
    Aftershock [aftershock],
    Bionic Professions [package_bionic_professions],
    Magiclysm [magiclysm],
    Mind Over Matter [mindovermatter],
    Xedra Evolved [xedra_evolved],
    Bombastic Perks [bombastic_perks],
    Extra Mutated Scenarios [extra_mut_scens],
    Martial Mastery [perk_melee_system],
    Mythical Martial Arts [MMA],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    Tamable Wildlife [Tamable_Wildlife],
    sees-player, run, crouch, bleed icons, retrodays [sees_player_retro]
    ]

Additional context

No response

@SleepsAlot8143 SleepsAlot8143 added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Feb 7, 2025
@Standing-Storm
Copy link
Contributor

Standing-Storm commented Feb 7, 2025

The werewolf transformation has u_calories('dont_affect_weariness': true), so the fitness band shouldn't be picking this up.

{ "math": [ "u_calories('dont_affect_weariness': true)", "*=", "3" ] },

{ "math": [ "u_calories('dont_affect_weariness': true)", "/=", "3" ] }

@osuphobia
Copy link
Contributor

osuphobia commented Feb 7, 2025

The werewolf transformation has u_calories('dont_affect_weariness': true), so the fitness band shouldn't be picking this up.

Cataclysm-DDA/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json

Line 194 in baa0ca2

{ "math": [ "u_calories('dont_affect_weariness': true)", "*=", "3" ] },
Cataclysm-DDA/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json

Line 226 in baa0ca2

{ "math": [ "u_calories('dont_affect_weariness': true)", "/=", "3" ] }

void Character::mod_stored_calories( int ncal, const bool ignore_weariness )
{
int nkcal = ncal / 1000;
if( nkcal > 0 ) {
add_gained_calories( nkcal );
} else {
add_spent_calories( -nkcal );
}
if( !ignore_weariness ) {
activity_history.calorie_adjust( ncal );
}
if( ncal < 0 || std::numeric_limits<int>::max() - ncal > stored_calories ) {
set_stored_calories( stored_calories + ncal );
}
}

I think these are two different things? With ignore_weariness == true, game will not track it in avatar's activity level for metabolism calculations, but add_spent_calories is not affected and will add such amount to calorie diary.

@Standing-Storm
Copy link
Contributor

Oh, right--the discussion on Discord indicated that weariness was also being affected (at least in the Needs panel of debug, though it wasn't affecting the character's weariness, so maybe that's fine). Having calories tracked in the wristband is necessary elsewhere (for tracking how many calories using psionics in MoM expends), even if it turns out to be weird here--if you're a werewolf transforming often, your calories are constantly being multiplied and divided by 3 to prevent them from going out of range for your size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

3 participants