Cataclysm-dda: Calorie Bug

Created on 21 May 2019  路  11Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Calories shown on the food do not match the calories that you get when you eat them.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install an expanded digestive tract CBM (works with out too)
  2. Make a meat jerky (using salt, chunk of meat)
  3. The calories listed on the jerky while using the CBM are 904, without it 402
  4. When you eat it on an empty stomach with or without CBM you will get 348 calories

Expected behavior

When eating a meal that stats it has 904/402 calories I expect to get that amount of calories

Screenshots

alt text
alt text
Before eating the jerky I drank 1 unit of water to reduce my hunger from famished(300) to hungry (0).
alt text
After eating the second piece of jerky.
alt text

Versions and configuration

  • OS: Windows [64-bit]
  • Game Version: 0.D-3197-gda3edc5
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Craftable Gun Pack [craftgp],
    Bright Nights [brightnights],
    Bens GF recipes [Tolerate_This],
    DeadLeaves' Fictional Guns [FIC_Weapons],
    Extended Realistic Guns [realguns],
    Garden Pots [growable-pots],
    Icecoon's Arsenal [ew_pack],
    Makeshift Items Mod [makeshift],
    Medieval and Historic Content [Medieval_Stuff],
    More Survival Tools [More_Survival_Tools],
    Mythological Replicas [nw_pack],
    Modular Turrets [modular_turrets],
    Salvaged Robots [Salvaged_Robots],
    Cataclysm++ [Cata++],
    Hydroponics [hydroponics],
    Mythical Martial Arts [MMA],
    Beta National Guard Camp [national_guard_camp],
    More Locations [more_locations],
    Fuji's More Buildings [FujiStruct],
    Urban Development [Urban_Development],
    Boats [boats],
    Folding Parts pack [deoxymod],
    Vehicle Additions Pack [blazemod],
    Tanks and Other Vehicles [Tanks],
    Artyoms' Gun Emporium - Reloaded [Arts' Guns],
    Classes and Scenarios Mod [more_classes_scenarios],
    Classic Roguelike Classes [RL_Classes],
    Manual Bionic Installation [manualbionicinstall],
    Safe Autodoc [safeautodoc],
    No Filthy Clothing [no_filthy_clothing],
    Simplified Nutrition [novitamins],
    StatsThroughSkills [StatsThroughSkills],
    Prevent Zombie Revivication [no_reviving_zombies],
    Alternative Map Key [alt_map_key]
<Bug> Bionics Food / Vitamins

Most helpful comment

Is it possible there's just a delay in calorie accounting with the new hunger system? What happens if your character then waits 5, 10, or 15 minutes?

I don't think that's what's happening here, because the calorie value for jerky defined in the JSON is 348, which is what the stomach calorie contents are being increased by.

All 11 comments

Is it possible there's just a delay in calorie accounting with the new hunger system? What happens if your character then waits 5, 10, or 15 minutes?

I'm curious whether that would reveal the expected number of additional calories (904 or 402), maybe spread out between stomach and gut contents.

After waiting 15 minutes you start losing calories, which is normal

Is it possible there's just a delay in calorie accounting with the new hunger system? What happens if your character then waits 5, 10, or 15 minutes?

I don't think that's what's happening here, because the calorie value for jerky defined in the JSON is 348, which is what the stomach calorie contents are being increased by.

initial guess: display bug, or bug with the bionic not altering the calorie intake.

Just did some testing. tl,dr: You're all right, the calorie accounting is actually instantaneous and correct. It does seem to be a display bug, which I can't replicate in my build (9002).

Spawned meat jerky correctly shows as 348 calories in my inventory. After eating, 348 calories are instantly added to my stomach's total.

Ate several other foods - long island iced tea, nutriment, energy drink -- all instantly added the correct number of calories as displayed in inventory.

No bionics installed. No food-relevant traits.

Versions and configuration

  • OS: Windows 10 [64-bit]
  • Game Version: 0.D-3181-g339945f
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Aftershock [aftershock],
    DeadLeaves' Fictional Guns [FIC_Weapons],
    Makeshift Items Mod [makeshift],
    Medieval and Historic Content [Medieval_Stuff],
    Mythological Replicas [nw_pack],
    Modular Turrets [modular_turrets],
    Salvaged Robots [Salvaged_Robots],
    Alternative Map Key [alt_map_key],
    Hydroponics [hydroponics],
    Boats [boats],
    Vehicle Additions Pack [blazemod],
    Tanks and Other Vehicles [Tanks],
    sees-player icon, -attitude [sees_player_less_attitude],
    Disable Religious Texts [no_religious_Texts],
    Bionic Slots [cbm_slots],
    Classes and Scenarios Mod [more_classes_scenarios],
    Manual Bionic Installation [manualbionicinstall],
    Prevent Zombie Revivication [no_reviving_zombies]

Did you spawn them in or craft them? The issue here is that the crafted food has greater calories than are specified in the JSON, and the calories that are displayed as given from that food are the calories that are defined in the JSON, not specified in the food.

In my test above, the meat jerky was spawned, the other items were found (none were crafted).

@lmaolollmao , what about you?

You should craft the items, because that's where the bug is. Spawned in items and found items both take the values from the JSON files, only crafted items inherit calories.

I crafted the food @JeanLucVanDamme

Kind of a little out of the scope of this issue but why does the expanded digestive system CBM not increase stomach/guts volume?

I think "expanded" in that case refers to the expanded set of foods that become edible, not expansion of capacity.

"You have been outfitted with three synthetic stomachs and industrial-grade intestines. Not only can you extract much more nutrition from food, but you are highly resistant to foodborne illness, and can sometimes eat rotten food."

The description does tell you exactly what it does in the second sentence, and it doesn't promise greater physical capacity. Although I see why you'd assume that given the name and the mention of three stomachs. Potential explanation: the extra stomachs just allow pre-processing of different kinds of matter, then quickly empty their contents into your actual stomach. If so, it's reasonable that the latter remains the bottleneck and uses existing capacity/fullness logic.

(But since you brought it up - I think it'd be kinda cool to actually have three extra stomachs, each for different kinds of rotten/inedible matter and each with their own capacities. But who will code it??)

Was this page helpful?
0 / 5 - 0 ratings