-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
LibSavedVars can be installed manually or through your preferred ESO addon manager. Once installed, your addon can declare LibSavedVars as an optional dependency and use it like any other shared library.
Install LibSavedVars using your preferred ESO addon manager. The library will be placed in your AddOns folder and loaded automatically by the game.
- Download the latest release of LibSavedVars.
- Extract the archive.
- Copy the
LibSavedVarsfolder into your ESOAddOnsdirectory.
The default location is:
Documents/
└── Elder Scrolls Online/
└── live/
└── AddOns/
└── LibSavedVars/
To ensure LibSavedVars is loaded before your addon, add it to your addon's manifest (.txt) file.
## OptionalDependsOn: LibSavedVars
If your addon requires LibSavedVars to function, you may instead declare it as a required dependency:
## DependsOn: LibSavedVars
Using OptionalDependsOn is generally recommended when your addon can continue to function without the library or when packaging tools automatically include required libraries.
Once the game has loaded, access the library through the global LibSavedVars object.
local LSV = LibSavedVarsYou can then create your saved variables:
local settings = LSV:NewAccountWide(
"MyAddonSavedVariables",
1,
nil,
defaults
)If LibSavedVars is installed correctly, your addon can immediately begin creating saved variables using any of the New... functions provided by the library.
If the library is missing and your addon declares it with DependsOn, ESO will prevent the addon from loading. If you use OptionalDependsOn, be sure to verify that LibSavedVars exists before attempting to use it.
if not LibSavedVars then
return
endAfter installation, continue to the Basic Usage section to learn how to create, read, and modify saved variables.