View Single Post
06/29/18, 08:42 AM   #1
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 179
Lightbulb Auto Saving SavedVariables

Hi all,

We're looking to come up with a robust solution to the problem many of you have had when it comes to SavedVars not saving when the game closes unpredictably. We want to implement an auto saving system but also include options to opt out and request a save manually. By default, this system will automatically save SavedVar data for each addon, one at a time, with a large (minute(s)) time interval between addon saves. For addons that opt out, there will be a function to manually request that their saved vars be placed at the front of the list to be saved on the next opportunity. This manual request will have a larger cooldown (15min-ish).

We’ll disable auto saving by checking an addon config:
## DisabledSavedVariablesAutoSaving: 1

When a save occurs, we will attempt to do the work to save it out. If the save was not triggered manually and the work takes longer than some reasonable amount of time that we’ll determine, we will abort the save and increment numSaveAttempts. If numSaveAttempts goes higher than some reasonable number of attempts (maybe 3?), we’ll consider the addon to be too intensive to auto save and it won’t try again. Manual saves go through regardless of how long they take.

We would like to get your thoughts on this idea. Do you think this will be helpful to you? Does it give you enough control, and if not, what do you think is it missing? Can you see any serious issues this may cause for you?

Thanks!
  Reply With Quote