Thread Tools Display Modes
04/10/15, 01:27 PM   #1
Adalan
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 20
How to read out the TESO-Settings ?

Hi there,

i would like to know, whether its possible by lua.codings thru API to read out parameters of what is set on the TESO-Settings (by default and user changed).
In example for my addon MasterThief i do need access to one setting (like "grab all stolen items automatically"), at least a read-access would be enough.
Is there a solution i could check out or no way to get infos about those registers or variables of the TESO-Settings ?

Greets,
Adalan
  Reply With Quote
04/10/15, 01:43 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Maybe this thread here helps:

http://www.esoui.com/forums/showthre...ad+eso+setting

Have a look at the WIKI here:
http://wiki.esoui.com/API

GetSetting(integer system, integer settingId)
Returns: string value
GetSettingBool(integer system, integer settingId)
Returns: boolean value
SetSetting(integer system, integer settingId, string value, integer setOptions)
ApplySettings()

The system variable should be something from this list:
http://wiki.esoui.com/Globals#SettingSystemType

SettingSystemType
SETTING_TYPE_ACTION_BARS
SETTING_TYPE_ACTIVE_COMBAT_TIP
SETTING_TYPE_AUDIO
SETTING_TYPE_CAMERA
SETTING_TYPE_CHAT_BUBBLE
SETTING_TYPE_COMBAT
SETTING_TYPE_DEVELOPER_DEBUG
SETTING_TYPE_GAMEPAD
SETTING_TYPE_GRAPHICS
SETTING_TYPE_IN_WORLD
SETTING_TYPE_LANGUAGE
SETTING_TYPE_LOOT
SETTING_TYPE_NAMEPLATES
SETTING_TYPE_TOOLTIPS
SETTING_TYPE_TUTORIAL
SETTING_TYPE_UI
SETTING_TYPE_VOICE

The settings name (settingId parameter) itsself, I don't know if there is a list somwhere :-(
Maybe it is the same name as in the UserSettings.txt file on your harddisc, one folder above the Addons folder -> "Elder Scrolls Online\live" (or liveeu)

Last edited by Baertram : 04/10/15 at 01:47 PM.
  Reply With Quote
04/10/15, 02:25 PM   #3
Adalan
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 20
Thanx Baertam.
This could bring the solution, but i am not really sure, whether it will give out as result what i need.

I will check it out.

Thanks again,
Adalan
  Reply With Quote
04/10/15, 03:45 PM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
What you serch is :

Lua Code:
  1. GetSettingBool(SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT_STOLEN)


To get list of settings, search "settings" in http://wiki.esoui.com/Globals
  Reply With Quote
04/12/15, 05:43 AM   #5
Adalan
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 20
Originally Posted by Ayantir View Post
What you serch is :

Lua Code:
  1. GetSettingBool(SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT_STOLEN)


To get list of settings, search "settings" in http://wiki.esoui.com/Globals
I will test it out.
On my tests, i used SETTING_TYPE_LOOT and got alot integer values when i used it by a loop to test out what happen, but i had no idea of from where to get the second value.
I thought it could go by such like "GetNumSettings(...)", but i couldnt find any of such command nor anything like that on Wiki.
Sometimes i am wondering from where you guys getting all those infos i cant find on WiKi :-)

Btw, i played sometimes a bit with commands or events seen on wiki, wich are not known in how to use.
But for my MasterThief i needed a solution and used at first "EVENT_CLOSE_FENCE", but it wasnt triggered by the system, so i used an other way to solve the problem.
Just want to let you know.

Thanks alot for your help.

Greets,
Adalan


EDIT:
GetSettingBool(...) gave an Error: "function expected instead of nil"
But to change settings i used the way below, which worked:

local sIsAutoLootEnabled = GetSetting(SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT_STOLEN)
if (sIsAutoLootEnabled == "1") then -- needs to set OFF
SetSetting(SETTING_TYPE_LOOT, LOOT_SETTING_AUTO_LOOT_STOLEN, "0")
end

Last edited by Adalan : 04/12/15 at 07:21 AM. Reason: GetSettingBool
  Reply With Quote
04/12/15, 08:00 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Instead of using 1 and 0 it might work with the function tostring(booleanValue) to compare/set them.
  Reply With Quote
04/12/15, 09:32 AM   #7
Minceraft
 
Minceraft's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 51
Originally Posted by Baertram View Post
Instead of using 1 and 0 it might work with the function tostring(booleanValue) to compare/set them.
aButton:toggleButton() was what I saw for this. I was lookin at making an equalizer settings saver, so I peeked at it, Zgoo style. I think If you were to use the control names, the data tables for them and the functions associated, it would work!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » How to read out the TESO-Settings ?

Thread Tools
Display Modes

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