-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
New Characters Begin Starving #46995
Comments
Cannot reproduce on |
Which starting scenario, profession and traits did you choose? |
It appears to be the "Overrun" scenario using the "Combat Medic" profession, with the "No NPC Needs" and "Bionic Professions" mods disabled. Starting traits are indicated in the OP screenshot. I tried several times in 0.E-9181-g308bec1612 to reproduce the issue with the same parameters, but always began in "Overweight" rather than "Skeletal" status. |
Reported by user Kasper on dev Discord as well:
I still cannot reproduce it myself. |
Does it happen in builds prior to 11400-11398? |
I tested it trough the CDDA Game Launcher, any build above and including 11397 it happens to any character- |
What is the value of stored calories in debug menu -> player -> edit player -> you -> set needs? |
|
Template_And_WorldGenFiles_OHGODZIPPLZ.zip [ Sorry for nested Zip ] |
Huh. The first thing I thought of was a metabolism refinement @anothersimulacrum and I (or, if it is indeed the culprit, I rephrase that to myself and anothersimulacrum) did... but it didn't go in until 11398.
What OS are you using? (And wapcaplet - what OS are you using?) |
Are you using preset characters? Someone on Reddit said once they deleted their presets and remade them the problem ceased. |
Well, I suppose Yes. Mine are made prior 11397. |
Actually, it does. It multiples the old kcal by 1000. Savegame_version went from 31 to 32. Perhaps something went wrong with the versioning? |
Not sure of the why but I was having this problem a few minutes ago and I can confirm that deleting your presets and remaking them fixed the issue, just did it now. Kind of annoying to have to do that but at least there's an interim fix. |
What does it say at the start of the file - the number after '# Version"? |
You are right. Multiplying stored calories in your character template by 1000 solves the issue. |
src/savegame_json.cpp - line 565-566 should be multiplying anything with a version of 31 or before by a 1000. So what's going wrong with that? |
Migration fails because there is no version information in character templates. |
Umm... possibly version information should be put into them, and no version treated as 31? |
And why is it happening with 11396? |
Linux (PopOS! / Ubuntu) |
The only problem with that is that a select few preset character templates will be so fat they explode. Those that were created after the x1000 change but before the version number was added. That's a pretty unlikely scenario, though. |
Holy shit! My bad. I typed it >11396. But wanted to be more specific in text and FORGOT to change to 11397 when typing Just wanted to clarify this, incase of confusion. |
If the stored calories are already greater than sqrt(1000)*55,000, then don't multiply them by 1000. |
Regarding putting version information into character template files, and treating properly the absence of such: I am not up to the needed C++ coding, at least not without considerable trial and error (and thus time). |
Templates appear to be saving an entire character, I am not sure they need to be doing that at all, there's all sort of data that is really not needed there, and it would avoid bugs like this. This doesn't fix the current issue, but would prevent it from occurring in large part in the future. |
There is information that can be reconstructed instead (given that they are otherwise a default starting character)? |
The only data that needs to be saved is that which can be selected through character creation: scenario, profession, stats, skills, traits, gender, name, height, age, blood type, and starting location selection. Start with a default character, then apply all those, and we're back to the character we made. |
This fixes the issue for me. |
I have added and self-assigned a new feature request to implement the solution @anothersimulacrum described above. That won't really fix this bug - nothing can truly fix it now, since we don't have game version in the template - but it will prevent similar issues in the future. Since it took so long for the above discussion to even arrive at what the problem was, and is not even particularly interesting to read, I am closing this dark rabbit hole in lieu of #47462. Thanks everyone for participating! |
How about adding a band-aid hack for 0.F migration? Say automagically multiply by 1000 if the value read from JSON is below some threshold. |
Suggested threshold: 55,000/sqrt(1,000) kcal. |
Before CleverRaven#46906, character templates were saved with stored_calories equal to total kilocalories (55,000 being the "healthy" baseline). Now, stored_calories is in units of small-c calories, being 55,000,000 for the healthy baseline. This led to a bug CleverRaven#46995 where new characters created from older-version templates would spawn with too few calories, by a factor of 1,000. Detect this when templates are loaded, and multiply stored_calories if its value appears to be way too small.
Before CleverRaven#46906, character templates were saved with stored_calories equal to total kilocalories (55,000 being the "healthy" baseline). Now, stored_calories is in units of small-c calories, being 55,000,000 for the healthy baseline. This led to a bug CleverRaven#46995 where new characters created from older-version templates would spawn with too few calories, by a factor of 1,000. Detect this when templates are loaded, and multiply stored_calories if its value appears to be way too small.
Before CleverRaven#46906, character templates were saved with stored_calories equal to total kilocalories (55,000 being the "healthy" baseline). Now, stored_calories is in units of small-c calories, being 55,000,000 for the healthy baseline. This led to a bug CleverRaven#46995 where new characters created from older-version templates would spawn with too few calories, by a factor of 1,000. Detect this when templates are loaded, and multiply stored_calories if its value appears to be way too small.
Before CleverRaven#46906, character templates were saved with stored_calories equal to total kilocalories (55,000 being the "healthy" baseline). Now, stored_calories is in units of small-c calories, being 55,000,000 for the healthy baseline. This led to a bug CleverRaven#46995 where new characters created from older-version templates would spawn with too few calories, by a factor of 1,000. Detect this when templates are loaded, and multiply stored_calories if its value appears to be way too small.
Describe the bug
New player characters spawn as starving, dehydrated and skeletal when beginning a new game
Steps To Reproduce
Expected behavior
Screenshots
Versions and configuration
Dark Days Ahead [dda]
]
The text was updated successfully, but these errors were encountered: