FINDarkside / TLD-Save-Editor

Edit The Long Dark save files
http://www.moddb.com/mods/the-long-dark-save-editor-2/downloads
MIT License
77 stars 31 forks source link

Quick fix for profile loading bug (when m_StatsDictionary doesn`t fit JSON format) #26

Closed Pt-Djefferson closed 4 years ago

Pt-Djefferson commented 4 years ago

Changed commands order.

FINDarkside commented 4 years ago

Hmm, weird that no one has complained about this so far. It's been broken for over 6 months.

This doesn't fix it alone either though, it will crash trying to set value to StatContainer.m_StatsDictionary where the key is string when it's supposed to be int.

FINDarkside commented 4 years ago

Tried to fix by making DynamicSerializable convert string to int correctly but it seemed to corrupt profile. I don't have time to debug more right now, I'll get back to this later.

FINDarkside commented 4 years ago

Yeah seems like the DateTime was the problem. DateTime was especially bad choice because it serializes differently depending on the language of the computer the editor is run with.