Devlogs
squashing some more bugs
Posted January 02, 2021 by riv
#bugs #feed me your LEs
I've managed to find a couple more issues, and I'm currently trying to fix them up:
- Creating new .json files with gen 4 is an issue, since I missed one point where it attempted to read the old .json files and then update those - a hotfix for this is doing the following (after which you can run riv_auto xyz to set up automatic updates):
- run riv_save xyz
- go into the riv_rel subfolder in your Mods folder
- rename riv_currentsession_tmp_xyz.json to riv_rel_xyz.json
- rename riv_currentsession_tmpparents_xyz.json to riv_relparents_xyz.json
- Since my mod uses the save slot ID to identify the save, it'll stop auto-updating .json files if MCCC autosaves (as this changes the save slot ID) until after you save manually. I believe I've managed to code in a workaround, though it still needs proper testing:
- when the game loads up, my mod will try to find a file called 'mc_settings.cfg' somewhere in the Mods folder and its subfolders
- it takes your autosave settings from there: the first autosave slot ID, the number of slots, and whether you actually have autosave on
- it then uses these to get a list of all autosave slot IDs
- whenever my mod notices a change in the slot ID, it will ignore 00000000 as before (sometimes happens if you switch modes/lots without saving in-between) or any slot that is an autosave slot
You can run the command riv_save_slot_ID (i used it for testing and left it in the code) to see what the game currently considers to be the save slot, and when I update to include the above it'll also show what my mod is using as the save slot ID - for example, my main slot is 0000000e and my MCCC autosave slot is 00001111, so if it autosaved then my mod would still use the settings for 0000000e.
I want to stress that I really tested this a lot, but there are always going to be some cases I missed! I know I've already put three versions of gen 4 out (well technically two, one just had an additional empty file with the right name) and updating so many times is not ideal, so I just wanted to check if anyone's noticed any other issues? If not, I'll update once I'm sure that making new files / using MCCC autosave works properly.