Dear Sim Gurus,
mods have a lot of good and useful reasons why they would want to store additional save data per sim (speaking of sim_info here!) in a way that is possibly DIFFERENT to existing save fields:
* tracking of motivations/roles for a modded story progression
* tracking of advanced info for new extended social functions
* tracking of illnesses, ..
However, Sims 4 appears to use Google's Protobuf serialization for Python.
This means that there are .proto specifications which are
1.) possibly non-trivial to modify
2.) there will be a horrible mess of conflicts if multiple mods attempt to modify them (at least I would assume)
Therefore, a very simple additional way to store just a basic python-dictionary would be nice:
mymod_custom_save_data = some_sim_info.get_mod_savedata("my made up but hopefully unique mod id")
mymod_custom_save_data["keys can be strings"] = "values can be strings"
mymod_custom_save_data["list values would also be supported"] = [ 1, 2, 3, 4 ]
#mymod_custom_save_data["but no advanced data types that would be hard to serialize"] = sim_reference # NOPE
If you are lazy, dear Sim Devs, then just save this to disk as a string per mod and serialize/deserialize with JSON.dumps/JSON.loads as available in Python 3. This works fine for all the suggested trivial data types, and it should be easy enough to add to your Protobuf schemata, and to add to sim_info.py's respective load_sim_info / save_sim functions.
Does something like this already exist, OR would you mind to implement it in a future patch?
Regards,
A modder
0
Comments
Anyone else interested in this, feel free to reply with your support for this feature request