v.350 Bonus calories tossed from leftovers


Bobfrid

Recommended Posts

Hi!

I had a calorie store of  about 1500 calories and had a piece of bear meat I'd cooked with my awesome level 5 cooking skill. The 1kg piece of bear meat was worth 1125 calories. I ate the meat and hit the 2499 calorie cap and auto stopped eating. The piece of meat I was eating disappeared from my inventory, rather than leaving a leftover of about 126 calories.

I then grabbed another 1kg piece of bear meat worth 1125 calories and began eating it when I had roughly 2490 calories. I ate that, hit the limit, and kept the piece of meat in inventory at a weight of .98kg. However, the calories assigned to the remainder meat was 886, rather than approximately the 1100 you'd expect.

It appears that in the first case, if you eat past the base 900 calories from cooked bear meat, but stop before consuming all the bonus calories, you lose the bonus calories.

In the second case, if you stop eating before exceeding the base 900 calories, you keep the leftovers, but lose the bonus calories from the cooking skill.

If I had to guess, the function(s) that govern calculating the weight and calories left in a piece of food are using the base caloric values for a cooked item rather than value after the bonus is applied.

I've not tested this extensively and these are just my quick observations. I don't know if this pattern holds for other types of cooked foods, if you cooked the food at lower skill levels, or other variables. Just wanted to mention it. I doubt it matters, but I was in TM at the mountaineer's hut, cooked the bear meat in the hut, stored the food in the hatch, and retrieved the food from the hatch in both of the above cases. I'll try to observe if this does or doesn't occur with different cooked foods.

In the meantime, I'll stop topping off the tank and wait til I'm half empty before refueling. :D

Link to comment
Share on other sites

Guest Alan Lawrance

Thank you for reporting this issue!  I just fixed it, and I wanted to provide some detail on what the problem was:

At first I was unable to reproduce the problem. I followed your repro steps, but the remaining calories on the bear meat always came out as expected. Then I saw your note about storing the meat, which made me think this could be save/restore related.

Indeed, if you save the game with calorie-boosted meat (which includes going through scene transitions) this bug will occur.  When the food item is boosted we increase two numbers related to the food item: CurrentCalories and TotalCalories.  Turns out we were only saving/restoring CurrentCalories (since we never had a reason to save/restore TotalCalories in the past, as it never changed on a food item). 

When we compute how much of a food item was eaten we are using the (incorrect) non-boosted TotalCalories, so the game computes that you ate more food than you really did.

So -- it's safe to "top off" if you are cooking items and eating them without a save/restore in-between... otherwise this fix will be coming in the next hotfix or update (whatever comes fist).

Thank you again... these are the kids of bugs that are tough to catch, and we really appreciate the community providing such excellent bug reports and feedback.

 

 

Link to comment
Share on other sites

Hi Alan,
 

Glad it helped and thanks for the detailed explanation on what you found and what was going on. I think it's really interesting to hear about the mechanics of TLD and it's great to get this level of feedback on bug reports and fixes.

Also, nice bit of sleuthing there! I hadn't considered that saving was a factor. Thanks for fixing it!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.