Hey there!
I've been getting strange reports from my Switch and Steam Deck players. For some reason, on very rare occasions, it seems like certain values aren't being saved properly. These can be as simple as a vector3, or a dictionary of strings.
I've done a lot of digging in my own code but can't figure out what could cause this. At first I thought maybe certain values aren't being loaded in properly, but I don't see any errors in player logs. When I go to check an affected player's save file, they don't have certain values that should've been saved based on their progress.
Example: They'll solve a door puzzle, that door puzzle gets set as "solved" in the dictionary, they save and quit the game. But when they load back in, the door isn't solved anymore and now they're stuck behind it. Some of their other puzzles are still set as "solved" in that same puzzles dictionary, but this one isn't, despite setting the value as solved and saving the dictionary before closing the game.
I'm using the basic ES3.Save() and ES3.Load() functions to save and load these values. I've been stumped on this issue for quite a while now and finally decided to reach out here as a last ditch effort.
I apologize if there aren't enough details here, but I was wondering if this issue sounds familiar and there's something you'd suggest trying as a fix? Thank you!
Certain Values Randomly Aren't Saving
Re: Certain Values Randomly Aren't Saving
Hi there,
I'm afraid I can't help with the Switch specifically because it's not a platform we can legally support due to their middleware license restrictions.
However, if Easy Save encounters an issue then it will throw an exception, so if you're not getting any errors in the log then it would either indicate an issue with your logic or something happening on the OS (for example, antivirus quarantining the file). If the entire save file isn't going missing it's likely to be an issue with your logic, and from what you describe I would be very surprised if this wasn't the case.
I wouldn't be able to assist with the logic side of things, but if you're using caching then it's most commonly because there's an edge case in your logic where ES3.StoreCachedFile() isn't being called. However, it sounds like you're just using the ES3.Save and ES3.Load methods without caching so this wouldn't be the case for you.
All the best,
Joel
I'm afraid I can't help with the Switch specifically because it's not a platform we can legally support due to their middleware license restrictions.
However, if Easy Save encounters an issue then it will throw an exception, so if you're not getting any errors in the log then it would either indicate an issue with your logic or something happening on the OS (for example, antivirus quarantining the file). If the entire save file isn't going missing it's likely to be an issue with your logic, and from what you describe I would be very surprised if this wasn't the case.
I wouldn't be able to assist with the logic side of things, but if you're using caching then it's most commonly because there's an edge case in your logic where ES3.StoreCachedFile() isn't being called. However, it sounds like you're just using the ES3.Save and ES3.Load methods without caching so this wouldn't be the case for you.
All the best,
Joel
-
- Posts: 8
- Joined: Sat Mar 05, 2022 8:34 pm
Re: Certain Values Randomly Aren't Saving
Hey again,
No worries about the Switch port restrictions! It happens on Steam Deck as well so it doesn't seem to be OS specific. I guess it's just more common on Steam Deck and Switch for some reason.
I appreciate the help though! I do use caching but haven't used the storecachedfile() method, is that something I need to call every time I sync the cache? I run the Sync() function each time the game is saved.
Thanks!
No worries about the Switch port restrictions! It happens on Steam Deck as well so it doesn't seem to be OS specific. I guess it's just more common on Steam Deck and Switch for some reason.
I appreciate the help though! I do use caching but haven't used the storecachedfile() method, is that something I need to call every time I sync the cache? I run the Sync() function each time the game is saved.
Thanks!
Re: Certain Values Randomly Aren't Saving
Hi there,
You need to call ES3.StoreCachedFile, otherwise none of the data will get stored to file. See the Caching guide for more info:
https://docs.moodkie.com/easy-save-3/es ... ng-caching
All the best,
Joel
You need to call ES3.StoreCachedFile, otherwise none of the data will get stored to file. See the Caching guide for more info:
https://docs.moodkie.com/easy-save-3/es ... ng-caching
All the best,
Joel
-
- Posts: 8
- Joined: Sat Mar 05, 2022 8:34 pm
Re: Certain Values Randomly Aren't Saving
Thanks a bunch for the reply! I'll add the this call after I run the Sync() function and see if that resolves the issue.