View Single Post
08/30/20, 03:30 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
If you want to use both you could e.g. use the account wide SavedVariables with the 3rd parameter (if left nil it will use the value "Default" in the SV table) as a speficif table name like "AccountBaseSettings" where you store the SavedVariables save mode (character or account wide) and other base addon settings like the language etc. which should be the same for the account.

And then you'd load the CharacterId or other account wide settings from another table like "Settings", or the "Default" table.


Keep in mind there exist different servers like EU megaserver and NA megaserver, and the public test server PTS.
You can use GetWorldName() to get the name of the actual server and could use this as well in the ZO_SavedVars: ... (AccountWide or CharacterId) function parameter for profile e.g. to save the different server's savedvars below a subtable of the server's name.

The last parameter of ZO_SavedVars:NewAccountWide will be the name of the account the data will be saved to.
If you leave it empty the game will use the function GetDisplayName() which returns your current @AccountName.
But you could also just specify a string like "AllAccounts" or "All" or "Master" or whatever so all the accounts of the player (at a server) will be saved the same way.

Last edited by Baertram : 08/31/20 at 08:35 AM.
  Reply With Quote