HowTo: SavedVariables - Find the folder, backup, copy - ESOUI
Thread Tools Display Modes
06/25/20, 10:12 AM   #1
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,546
HowTo: SavedVariables - Find the folder, backup, copy

What are SavedVariables?
The SavedVariables are files, stored in the "SavedVariables" folder on your disk, where the AaddOns save data to.
Even some base game settings by the provider Zenimax Online will be stored in SavedVariable files.

In this folder there will be created .lua files for the addon names, like
e.g. AdvancedFilters.lua (AddOn folder/txt file in folder live/AddOns is "AdvancedFilters"), or pChat.lua (AddOn folder/txt file in folder live/AddOns is "pChat").

These files will be constantly updated as you are logged in to the game! Manipulating them while you are logged in will not affect the ingame data as it will be kept in internal data tables of the game untio you logout!
The updates will happen as you reload the User Interface (/reloadui chat command, or via the "Addon Manager") ingame, change zones
so that a loading screen appears, at logout and even sometimes in between, if there are only really small amounts of data changes done.
If your client crashes without a proper logout/close of the game the SV files might get corrupted or at least contain data of an older time.

This makes backup of your SV files important, especially before bigger patches like new DLCs! You are able to go back to the last working version quite easily, and the files are not that big in terms of filespace used. So you are able to keep multiple versions e.g.

How do you find the SavedVariables folder?
Open your ESO folder.
If using a PC, the typical default install path is: C:\Users\< username >\Documents\Elder Scrolls Online\live\
Or you can use the windows variable by pasting it into windows explorer: %userprofile%\documents
If using a Macintosh, the typical default install path is: ~/Documents/Elder Scrolls Online/live/
In the 'live' folder there will be a subfolder "SavedVariables".
This folder will be created after your first login to the ESO game!

Show the path if you are ingame
Press the "Take screenshot" keybind and you'll see the complete path of the screenshot taken at the top right corner of your screen.
The path shown ends on "Screenshots".
Just open this path outside of the game in the file explorer and navigate 1 folder up to the "live" folder.
In the live folder there will be located the "SavedVariables" folder.

Backup of SavedVariables
You are able to backup the whole folder "SavedVariables", or single addon files in this folder, if you are logged out of the game!
Do not copy or manipulate them as you are logegd in! You will copy old data/change the files but the ingaem data will overwrite them again!

Simply copy the whole folder, or selected files, and paste them somewhere else, e.g. create a folder "C:\ESO_SV_BACKUP" and for each backup create a new subfolder with the date e.g. ("2021-06-06") and copy them there.
This should be done e.g. before a new chapter or DLC arrives with a patch, in order to be sure you got working settings of your addons,
and are able to restore the settings from these old files.
I even recommand taking at least a weekly backup of the files.

Restore of SavedVariables
You need to be logged out before you restore the SV files!
Just copy the backuped SV lua files back into the folder live/SavedVariables.
Rename your existing files or backup them before if you want to keep them!
After login the data will be read from these files again.

Manual changes to SavedVariables
You are able to manually change your SavedVariable files, e.g. change a setting of an addon.
But this will only take effect if you are logged out of the game as you change the files!
If you are logged in, the next user interface reload will overwrite the file on your disk from internal game memory again.
So you changes done will be overwritten with old data again!

Here is an example how a SV file could look like, for the addon "Harvens Custom Map Pins"
Lua Code:
  1. HarvensCustomMapPins_SavedVariables =
  2. {
  3.     ["Default"] =
  4.     {
  5.         ["@AccountName"] =
  6.         {
  7.             ["My Character Name 1"] =
  8.             {
  9.                 ["version"] = 1,
  10.                 ["exported"] = true,
  11.                 ["pinLevel"] = 30,
  12.                 ["predefined"] =
  13.                 {
  14.                 },
  15.                 ["showAdvanced"] = false,
  16.                 ["x"] = 0,
  17.                 ["pins"] =
  18.                 {
  19.                 },
  20.                 ["relPoint"] = 128,
  21.                 ["pins_backup_1"] =
  22.                 {
  23.                 },
  24.                 ["legendPos"] =
  25.                 {
  26.                     ["x"] = -38,
  27.                     ["y"] = 20,
  28.                     ["relPoint"] = 3,
  29.                     ["point"] = 9,
  30.                 },
  31.                 ["y"] = 0,
  32.                 ["pinSize"] = 40,
  33.                 ["point"] = 128,
  34.             }, --closing character
  35.       } -- closing @account
  36.    } --closing Default
  37. } -- closing SV table HarvensCustomMapPins_SavedVariables

The first line without the "..." string qutoation marks is the name of SavedVariables table, defined in the txt file of the addon, behind the
## SavedVariables: HarvensCustomMapPins_SavedVariables
In this example it is: HarvensCustomMapPins_SavedVariables

lua tables always open with a { and close with a }. So there are always must be pairs of them for open and close.
Tables can contain tables in them (sub-tables) so { { } } is possible as you can see in the sample above.
The table got a key and a value, where the key normally is a string within quotation marks, and the value can be a number, a string, a boolean true/false value or even anotheer table:
Lua Code:
  1. ["key1"] = 1,
  2. ["key2"] = "hello world",
  3. ["key3"] = false,
  4. ["key4"] = {
  5.  ["subTableKey1"] = 99,
  6. },
Each line between the opening and closing { } of a table normally closes with a , so that the table knows there is the end and anoter entry is following.

The ["Default"] line in the example is created automatically if an addon uses the standard SavedVariables method that teh game developer ZOs provides (ZO_SavedVars:New*).
It could also be named differently, like e.g. "Settings" or even the server name "NA megaserver"/"EU megaserver") to distinguish the settings server dependently.

The ["My Character Name 1"] could also be a number like ["89012723464237432"] sometimes! Within the subtable of this tbale you'll find an entry ["$lastCharacterName"] = "My character Name 1" then to be able to find out which char name got wchih unique number. The unique number is the 89012723464237432 in that case and it is unique per megaserver! As the number will not change if you rename your character, the savedvariables will still work using the number instead of the name! In teh past the unqiue number did not exist so older addons do not support it (yet).

All other ["text here"] entries is data of the addon itsself and should not be touched or altered, except you know what you do and what it will do to the addon!

Copy SV from 1 PC to another, or from 1 @account to another
So if you want to copy the contents of this SV file to another computer and make it work with your own @accountName and characterName you just need to
I recommand using the Notepad++ editor to edit the lua file. It helps with the opening and closing { }.
You are bale to download it here: https://notepad-plus-plus.org/downloads/
After installation/or after download and extraction of the "standalone non-install version": You need to open Notepad++ and click on the menu strip on "Plugins" -> "Plugin management". In the now shown plugin manager popup search for "lua" and install the "LuaScript" plugin so that .lua files and their scripts are properly supported!

1) Logout, as described above!
2) Find the SV file you want to copy
3) Make sure you are logged out at the destionation pc!
4) Copy the SV lua file from the source to the destination pc's SavedVariables folder (backup same filenames there before!)
5) Edit the dstination SV lua file and if a servername is given in the SV files change the ["EU Megeserver"] to the server you'd like to use the data on. Possible values are: "NA Megaserver", "EU Megaserver" or "PTS" for the Public Test Server.
6) Change the ["@AccountName"] to ["@YourAccountName"] (the one you login and play with, and where these settings should work
7) Change the ["My Character Name 1"] to the character name of the char you'd like to use the settings on.
8) If no ["My Character Name 1"] is given but a unique number ["832423420474723"] or similar is given, you need to find out which unique number your desired character got. You can spy in other addon's SV files if you find it, or you can use the following script ingame in the chat editbox to print out the unique character ID of your currently logged in Character. Simply copy the text here and paste it into your chat editbox, then press the return key.

After login your currently edited file will be read and overwrtitten again if it was false somehow! So backup the chnaged file BEFORE starting the ESO client so you are able to copy it into the SV folder again AFTER logging out again, to return to the editing properly at your last state!!!

/script d("Char name/ID: "..tostring(GetUnitName("player")).."/"..tostring(GetCurrentCharacterId())
If you want to get a list of all character names of the currently logged in account, you can use this script:
/script for i=1,GetNumCharacters() do local n,_,_,_,_,_,c=GetCharacterInfo(i) d(string.format("Char name/ID: %s/%s",n,tostring(c))) end
After getting the unique character Id of your character name you can use this in the SV file. Remember to copy over your last changed state of the SV file into the SV folder again to go on editing the correct file.

If there are no ["My Character Name 1"] nor any ["82424234238428343"] unique character IDs the addon most probably ONLY saves it's settings account wide, and does not support the character depending settings.
9) In the end save the SV file, backup it so it won't get destroyed after 1st login if you did something wrong.

If you do not want to copy the files from 1 PC to another, but only want to copy the data of 1 @account to another, you do about the same. But you simply edit the SV lua file at the PC where you want to add the @account, search for the table structure shown above in the example, and you copy "all" lines starting at the ["@accountName"] = {
including it's closing }!
-> I've marked the closing } with the comment "-- closing @account" above in the example!

Paste it below the closing } of the source @account so that the whole entries are doubled.
Change the new pasted @accountName to your accountname, e.g. @AccountName2.

Be sure to check that the closing } of the old account (in the exampal above this is @AccountName) got a , behind its closing }!

It should look like this in the end
Lua Code:
  1. HarvensCustomMapPins_SavedVariables =
  2. {
  3.     ["Default"] =
  4.     {
  5.         ["@AccountName"] =
  6.         {
  7.         }, -- closing @account -> Check the , after }!!!
  9.         ["@AccountName2"] =
  10.         {
  11.         }, -- closing @account 2
  12.     } --closing Default
  13. } -- closing SV table HarvensCustomMapPins_SavedVariables
Maybe check the characternames below the table ["@AccountName2"] match to this account.
Save the file and it should work.

Last edited by Baertram : 06/06/21 at 01:15 PM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » HowTo: SavedVariables - Find the folder, backup, copy

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