It appears that NaN values in a mod or scenario's global table are flagged as being corrupt when trying to load a savefile, but not when making it. This is problematic, because the player can easily overwrite all of their savefiles/autosaves without realizing they're all corrupt. It would be great if the same validation can be done while saving to limit the damage and alert the player to the problem. The other option would be to allow NaN to be loaded to global tables without flagging the data as corrupt.
To reproduce:
1. Start a new vanilla game.
2. Type `/c global.x = 0/0` in the console.
3. Save the game.
4. Attempt to load the savefile you created.
[boskid][1.1.57] NaN in global table silently corrupts savefiles
-
- Inserter
- Posts: 29
- Joined: Mon Sep 13, 2021 6:53 pm
- Contact:
[boskid][1.1.57] NaN in global table silently corrupts savefiles
Last edited by InappropriatePenguin on Thu Apr 21, 2022 3:36 am, edited 1 time in total.
Re: [boskid][1.1.57] NaN in global table silently corrupts savefiles
Ok i just give up with the NaN checks when loading. It was nice to have but i was not sure we got all of those covered. In the expansion branch this check was already removed basically the same day it was added in 1.1 so i am just removing it as well from 1.1.