ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   How to read out the TESO-Settings ? (https://www.esoui.com/forums/showthread.php?t=4566)

Adalan 04/10/15 01:27 PM

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

Baertram 04/10/15 01:43 PM

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)

Adalan 04/10/15 02:25 PM

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

Ayantir 04/10/15 03:45 PM

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

Adalan 04/12/15 05:43 AM

Quote:

Originally Posted by Ayantir (Post 20378)
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

Quote:


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

Baertram 04/12/15 08:00 AM

Instead of using 1 and 0 it might work with the function tostring(booleanValue) to compare/set them.

Minceraft 04/12/15 09:32 AM

Quote:

Originally Posted by Baertram (Post 20435)
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! ;)


All times are GMT -6. The time now is 11:29 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI