What should I NOT do to avoid breaking saves?
Wondering if there's a common save game pitfall listing of things to avoid bugs due to changes in future versions of a mod? Things like renaming types or their fields.
3 Replies
Or is there a readup of exactly how the serialization system works? Does it work similar to JSON serialization?
Avoid renaming stuff
Unless you want to be using Core Redirects to deal with that
Renaming also includes changing the path the asset is in
It is totally safe to rename and move as long as you write a core redirect and thoroughly test it
If you need to significantly change the data structure of something saved and keep part of it, you can use the preload (don't remember the exact name) method of the save API to turn the old data into the new data