Quantcast Saved Variabels data is written on loading screens - ESOUI
Thread Tools Display Modes
08/26/19, 03:59 AM   #1
Keldor
 
Keldor's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 68
Question Saved Variabels data is written on loading screens

Hello everybody,

I have just noticed a problem with the SavedVariables in my ESODB addon that has been reported to me by many users, but that I was never able to reproduce the problem until now.

It doesn't always happen. Now it happened quite often that the SavedVariables data were written in a loading screen. E.g. from the teleport from Daggerfall to Wayrest. What's interesting about this is that I was playing ESO with my girlfriend and the problem happened to both of us at the same time.

In my Addon Manifest I set DisableSavedVariablesAutoSaving 1.

The problem is that the ESODB export is working with the timestamps of the session. If a game session starts the timestamp are written to the SavedVariables and all stats of the session are assigned to this timestamp. If the data with this timestamp has processed by the ESODB API only data with newer timestamps are allowed for uploading to prevent the upload of old data. But when the SavedVariables data are written to the file without logging out or do a /reloadui all data collected form this point is lost.

Is this a bug or is this a deliberate behaviour? When it is not a bug, is there any way to notice the write out of the data to create a new timestamp?

Regards
Keldor
__________________
ESO-Database.com | Character- and Guild Database [EN/DE] (System Status)
ESO-Skillfactory.com | ESO Build planer [EN/DE/FR]
ESO-LFG.com | The ESO Looking for Group Tool [EN/DE/FR]
ESO-Database Game Data API | API for AddOn developers to fetch game related data like Chest positions etc.
  Reply With Quote
08/26/19, 04:40 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,397
You forgot to put a colon (: ) after the name of the directive. It should look like this:
Code:
## DisableSavedVariablesAutoSaving: 1
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
08/26/19, 05:07 AM   #3
Keldor
 
Keldor's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 68
Originally Posted by sirinsidiator View Post
You forgot to put a colon (: ) after the name of the directive. It should look like this:
Code:
## DisableSavedVariablesAutoSaving: 1
Oh
I have checked everything several times and missed such a small thing, thank you very much!
But this means auto saving is enabled by default?

Keldor
__________________
ESO-Database.com | Character- and Guild Database [EN/DE] (System Status)
ESO-Skillfactory.com | ESO Build planer [EN/DE/FR]
ESO-LFG.com | The ESO Looking for Group Tool [EN/DE/FR]
ESO-Database Game Data API | API for AddOn developers to fetch game related data like Chest positions etc.
  Reply With Quote
08/26/19, 05:28 AM   #4
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,950
Yes, it is.

But afaik the directive ## DisableSavedVariablesAutoSaving: in the manifest of your addon only applies to the "small data written without a reloadui/loading screen due to zone change/logout".
With small data I mean the "important SavedVariable" changes which were introduced later on (with Murkmire I think) so that very important data can be written directly to the SV without having to wait for the logout or reloadui or zone change.

Normal SV will always update on logout and reloadui. I'm not quire sure if the zone change is the same as reloadui in this case but I think the SV are always written at this time as well.

From the wiki (https://wiki.esoui.com/Addon_manifes...esAutoSaving):
Code:
DisableSavedVariablesAutoSaving
Starting with the Murkmire Update (100025) the game periodically writes the saved variables for each loaded add-on to disk. It will attempt to write data during regular gameplay, as long as the resulting file is not bigger than 50kB and the write can be done within 4ms. Otherwise it will wait for the next loading screen. It will always wait at least two seconds between writing data to disk and 15 minutes before saving the same file again. When the DisableSavedVariablesAutoSaving is set to "1", it won't consider the saved variables of this add-on for autosaving.
To make data save with this auto save function of ZOs I think you also need to use the function "RequestAddOnSavedVariablesPrioritySave" in your addon so it will "register for data to save" (restrictions: <=50kb and saved within 4ms, like changing a very important setting from 0 to 1 or similar).

Last edited by Baertram : 08/26/19 at 05:35 AM.
  Reply With Quote
08/26/19, 05:49 AM   #5
Keldor
 
Keldor's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2015
Posts: 68
Thanks for the clarification! I have deactivated the Auto Saving now correctly deactivated. Since the addon usually writes much larger amounts of data. There were probably cases in which only few data were available to write. The most of the time the addon collecting much more data than the 50kb.

Keldor
__________________
ESO-Database.com | Character- and Guild Database [EN/DE] (System Status)
ESO-Skillfactory.com | ESO Build planer [EN/DE/FR]
ESO-LFG.com | The ESO Looking for Group Tool [EN/DE/FR]
ESO-Database Game Data API | API for AddOn developers to fetch game related data like Chest positions etc.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Saved Variabels data is written on loading screens

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off