View Single Post
08/30/20, 02:19 PM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 409
Originally Posted by Tazmyr View Post
Trying to understand the behavior and interaction between ZO_SavedVars:NewCharacterId() and ZO_SavedVars:NewAccountWide() ...

If I want to offer character-specific saved variables, would I call BOTH functions and then decide which set of variables to actually use?

If I do call BOTH, at save time, does the game save BOTH sets of variables?

Thanks!

Tazmyr
You'll actually want to call them on add-on loaded. It'll then save automatically when the user logs out or reloadui. If you call both, then both will be saved - they're different tables and don't affect each other

If you just want to offer character specific variables, then you only need the characterID variables. If you plan to do different svaed variable profiles (e.g. writ crafter, you can choose between account wide and character specific) then you'd use both.
  Reply With Quote