Thread Tools Display Modes
04/09/14, 06:11 PM   #1
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
GetSetting_bool

Hey folks,

Please forgive if this is a FAQ or otherwise noobish question. I'm working on my first ESO addon and am having a difficult time figuring out how to set a Boolean setting. I'm able to do this to read the setting:

GetSetting_Bool(0, NAMEPLATE_TYPE_ALL_HEALTHBARS)

but can't find the equivalent to write to this thing and change its value.

BTW I was guessing at the value of the first argument, but it seemed to work. Is this documented somewhere?
  Reply With Quote
04/09/14, 07:33 PM   #2
Brainling
Join Date: Apr 2014
Posts: 18
The first parameter is the setting type, such as SETTING_TYPE_ACTION_BARS or SETTING_TYPE_UI. I'm not sure exactly what those mean, but those are the constants.

The opposing function is 'SetSetting' (no type specifier), of the form:
SetSetting(type, id, value)

I'm not sure if SetSetting is marked private or protected, but it may be.
  Reply With Quote
04/09/14, 08:42 PM   #3
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
Thanks. Where can I find this information? The API reference on this site didn't include that information as far as I can tell.
  Reply With Quote
04/09/14, 08:49 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
SetSetting is the next function down from GetSetting_Bool
http://wiki.esoui.com/API
  Reply With Quote
04/09/14, 09:00 PM   #5
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
Ya, but it says only:

SetSetting(integer system, integer settingId, string value, integer setOptions)

Nothing about what these things are or how to find more information about them.
  Reply With Quote
04/09/14, 09:04 PM   #6
Brainling
Join Date: Apr 2014
Posts: 18
Because that's all we (or anyone else) know until it's experimented with more. ZO hasn't given detailed documentation for anything. Everything that's documented has been documented through trial and error. Play with the function and fill in the Wiki once you figure it out. You'll be helping the next guy that needs to use SetSetting.
  Reply With Quote
04/09/14, 09:07 PM   #7
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
Perfect. Thanks.

So are "SETTING_TYPE_ACTION_BARS or SETTING_TYPE_UI" in your head, or are they documented somewhere? It's cool if it's just in your head, but if there's a resource I'm not utilizing, I'd like to know where it is.

Thanks again.
  Reply With Quote
04/09/14, 09:09 PM   #8
Brainling
Join Date: Apr 2014
Posts: 18
http://wiki.esoui.com/Globals

Scroll down to SystemSettingType. No I don't know what they all mean, but those are the available constants.
  Reply With Quote
04/09/14, 10:38 PM   #9
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
How did you know that the first parameter of:

SetSetting(integer system, integer settingId, string value, integer setOptions)

Was a SettingSystemType? (not SystemSettingType btw)

Taking this a step futher, how do I know what types function parameters map to in general (setOptions, for example)?

Thanks again!

Last edited by Cranius : 04/09/14 at 10:41 PM.
  Reply With Quote
04/10/14, 03:16 PM   #10
Cranius
 
Cranius's Avatar
Join Date: Apr 2014
Posts: 6
Hey guys,

I just wanted you to know that I figured out what I wanted to do with my first addon. I still don't really understand how to connect the dots as I'd like to, but via trial and error I was able to get it working. I'm still quite confused about what setOptions are, though I was able to just use "1" and it worked. For example, this works:

Code:
SetSetting(SETTING_TYPE_NAMEPLATES, NAMEPLATE_TYPE_ALL_HEALTHBARS, tostring(false), 1)
I was able to make the following associations:

NAMEPLATE_TYPE_* are of type SETTING_TYPE_NAMEPLATES
UI_SETTING_* are of type SETTING_TYPE_UI
IN_WORLD_UI_SETTING_* are of type SETTING_TYPE_IN_WORLD
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » GetSetting_bool


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