Add API for per-save JSON data
Pathoschild opened this issue ยท 4 comments
Extend the JSON API (#292) to support per-save JSON files, which will be stored automatically in the save folder to allow GOG/Steam cloud sync.
Possible usage:
// save to <app data>/Saves/mod data/<mod id>/data.json
helper.Data.Write("data.json", data);
// save to <app data>/Saves/mod data/<mod id>/Name_0123456789_data.json
helper.Data.Write("data.json", data, perSave: true);
Possibly combine with config.json
:
// read config.json
TModel config = helper.Data.ReadConfig<TModel>();
// write config.json
helper.Data.WriteConfig(config);
I thought this was going to go into individual save folder so that it would cloud sync?
If I recall correctly, we tested it and cloud sync saves everything under <app data>/Saves
?
Closing in favor of #468.