Welcome to the AFK Mods bug tracker. In order to report an issue, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

An account will be required to submit an issue, so if you need one and are unable to register, please contact us via the forums at https://www.afkmods.com/

Issue Data
Status: New
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Fallout 4: Vanilla
Category: Perks & Stats
Assigned To: Nobody
Platform: All
Severity: Medium
Votes: 1
Watching: N/A
Opened By Ceveth on Aug 8, 2019 8:17 pm
Last Edited By BlackPete on Aug 9, 2019 1:44 am

Issue #27210: Survival Food Buffs lasting forever

 
Explanation & reproduction steps here:
https://www.reddit.com/r/fo4/comments/5lncf7/fyi_fixing_survival_character_stats_food_buffs/
https://www.reddit.com/r/fo4/comments/92j60u/a_fix_for_permanent_food_buff_in_survival/

Semi(ish) fix here:
https://www.nexusmods.com/fallout4/mods/32393

I guess Survival isn't very popular? Google Search says this issue has been around since the game was created.

Comments

2 comment(s)
Ceveth said:
 
The survival food bug occurs at least in part because of a perk (HC_SustenanceEffectsTurnOffFood) that sets food magnitude and duration to 0 while a player is hungry. Maybe. When food expires, a value of 0 is subtracted from stat modifiers, leaving the buffed value stuck

Ceveth said:
 
I read the sections handling needs and hunger in the HC_ManagerScript, the master script for Survival mode. Lots of interesting stuff in there about how survival features work. At first I thought the error might be somewhere in the script, but it turns out many of the survival mode features are added as invisible perks to the player that are enabled and disabled by the script or by conditions on the perks themselves, so I figured they were worth looking at.

Around the same time I read about the GetValueInfo console function and started playing with it under various circumstances, including with the food bug. Food buffs (except for SPECIAL buffs for whatever reason, they're in Perm) are tracked as Temp modifiers, and I noticed that stuck food buffs were left behind in that field when the bug occurred.

Eventually I managed to isolate when the food bug occurs - it's when the player is hungry and a food buff gained before the onset of hunger expires. It can be reproduced most easily by eating something (Grilled Radstag was the one I used most for testing it), then making yourself hungry with Rad-X, then sleeping for longer than the food will last. The fact that it's an expiring buff indicated that it had to do with the removal of the effect.

While I was looking at the perks that govern survival mode, I found that HC_SustenanceEffectsTurnFoodOff directly set the magnitude of foods to 0. All these things percolated for a while and at some point I reasoned the stat buff was left behind was because (apparently) the game uses the current value of an effect to remove a buff rather than its real value, or that the SetValue function available to perks will globally alter the real value until its conditions (a global for hunger level) are no longer satisfied. Or at least, something along those lines was happening. Sure seemed that way, and altering the perk to not affect magnitude at all prevents the bug from happening, at least as far as I've tested and played, and let me tell you my character in my last playthrough was a total glutton and I deliberately tried to make it happen.

Showing Comments 1 - 2 of 2