Thread Tools Display Modes
03/02/14, 01:11 AM   #1
Myrroddin
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 28
Multiple saved variables

Based on the Wiki, most things that have multiple entries in the toc/txt file are space-delineated. If you have more than one SV file, does it follow this pattern, or do you need 2, 3, etc SavedVariables entries?
  Reply With Quote
03/02/14, 01:54 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
What do you mean by, "If you have more than one SV file" ?
  Reply With Quote
03/02/14, 05:37 PM   #3
Myrroddin
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 28
I mean if you want, say, MyAddOn_SV and MyAddOnDB. One would be general settings, the other could be character specific, with both in the same AddOn. You could do this in WoW, so I'm guessing you can do this in ESO. I just want to know the syntax in the .txt file, whether the two are separated by spaces or commas or listed on two lines.

The other option would be one SV file, where you would have MyAddOnDB.universal_setting.someSetting and MyAddOnDB.character_setting.someSetting.

Think of how AceDB allowed this. You could have MyAddOnDB.profile.someSetting and MyAddOn.Seerah.someSetting.

The second option would be better, but I could work with either. Just wondering how you would set it up.
  Reply With Quote
03/02/14, 05:41 PM   #4
Errc
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 30
Originally Posted by Myrroddin View Post
I mean if you want, say, MyAddOn_SV and MyAddOnDB. One would be general settings, the other could be character specific, with both in the same AddOn. You could do this in WoW, so I'm guessing you can do this in ESO. I just want to know the syntax in the .txt file, whether the two are separated by spaces or commas or listed on two lines.

The other option would be one SV file, where you would have MyAddOnDB.universal_setting.someSetting and MyAddOnDB.character_setting.someSetting.

Think of how AceDB allowed this. You could have MyAddOnDB.profile.someSetting and MyAddOn.Seerah.someSetting.

The second option would be better, but I could work with either. Just wondering how you would set it up.
No need to make multiple saved vars files. Can make separate SV for character specific or for the whole account.

Code:
sv.char = sv.char or ZO_SavedVars:New( SvName , version , "main" , defaultChar )
sv.profile = sv.profile or ZO_SavedVars:NewAccountWide( SvName , version , "main" , defaultAccount )
  Reply With Quote
03/02/14, 05:47 PM   #5
Myrroddin
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 28
Originally Posted by Errc View Post
No need to make multiple saved vars files. Can make separate SV for character specific or for the whole account.

Code:
sv.char = sv.char or ZO_SavedVars:New( SvName , version , "main" , defaultChar )
sv.profile = sv.profile or ZO_SavedVars:NewAccountWide( SvName , version , "main" , defaultAccount )
Ah, thank you. I've been pouring over the Wiki with no luck or love trying to find the following syntax:

* ZO_SavedVars
* EVENT_MANAGER
* CHAT_SYSTEM
* CALLBACK_MANAGER
* others?

If I had found ZO_SavedVars, I might have been able to answer this myself. Where are they documented, if they are?
  Reply With Quote
03/02/14, 06:29 PM   #6
Errc
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 30
Originally Posted by Myrroddin View Post
Ah, thank you. I've been pouring over the Wiki with no luck or love trying to find the following syntax:

* ZO_SavedVars
* EVENT_MANAGER
* CHAT_SYSTEM
* CALLBACK_MANAGER
* others?

If I had found ZO_SavedVars, I might have been able to answer this myself. Where are they documented, if they are?
http://wiki.esoui.com/AddOn_Quick_Questions
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Multiple saved variables


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