Thread Tools Display Modes
10/01/23, 10:51 PM   #1
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Question looking for a way to detect if ingame setting enabled

hey guys..

im looking for a way to boolean if social setting "PvP Kill Feed" is enabled or disabled, preferably a ZO_something if it exists similar to "ZO_ShouldPreferUserId()" but for the kill feed.

Ive been going through /zgoo but cant find either in there when mousing over the control.
  Reply With Quote
10/02/23, 01:32 AM   #2
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by sinnereso View Post
hey guys..

im looking for a way to boolean if social setting "PvP Kill Feed" is enabled or disabled, preferably a ZO_something if it exists similar to "ZO_ShouldPreferUserId()" but for the kill feed.

Ive been going through /zgoo but cant find either in there when mousing over the control.
Just find the setting with
GetSetting_Bool(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
** _Returns:_ *bool* _value_
?

SETTING_TYPE_UI
UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS

local ShowPvpKillFeedEnabled = GetSetting_Bool(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS)

Last edited by Masteroshi430 : 10/02/23 at 01:36 AM.
  Reply With Quote
10/02/23, 09:13 AM   #3
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Originally Posted by Masteroshi430 View Post
Just find the setting with
GetSetting_Bool(*[SettingSystemType|#SettingSystemType]* _system_, *integer* _settingId_)
** _Returns:_ *bool* _value_
?

SETTING_TYPE_UI
UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS

local ShowPvpKillFeedEnabled = GetSetting_Bool(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS)
Thank you bro thats perfect. I was digging around in zgoo for hours and couldn't find how to find that.
  Reply With Quote
10/02/23, 12:54 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Originally Posted by sinnereso View Post
Thank you bro thats perfect. I was digging around in zgoo for hours and couldn't find how to find that.
Check the ESOUI source code for that. How does ZOs do it.
e.g. move mouse above the settings entry and find out what the name of the control is.

Then find that control name, or ends of it, in the esoui sources.
And get to the code and aPi functions uses that way.
  Reply With Quote
10/03/23, 09:45 AM   #5
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Originally Posted by Baertram View Post
Check the ESOUI source code for that. How does ZOs do it.
e.g. move mouse above the settings entry and find out what the name of the control is.

Then find that control name, or ends of it, in the esoui sources.
And get to the code and aPi functions uses that way.
kk ill check it.

Im considering something else maybe as well... Is there is SetSetting to change the ingame setting or just GetSetting? Ill poke around in a bit and see maybe.

Last edited by sinnereso : 10/03/23 at 09:49 AM.
  Reply With Quote
10/03/23, 12:42 PM   #6
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by sinnereso View Post
kk ill check it.

Im considering something else maybe as well... Is there is SetSetting to change the ingame setting or just GetSetting? Ill poke around in a bit and see maybe.
Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code.
  Reply With Quote
10/03/23, 12:55 PM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Originally Posted by Masteroshi430 View Post
Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code.
If you know already what addon does what I need: It's faster to spy that addon, yes.
But if you want to learn how to get to the thing, you should check "how does ZOs do it". And in general it's ncie to compare addon code to "how does ZOs do it", as ZOs sources could have improved/made it easier than addons that were coded years ago (not talking about your addon here, just in general!).

Hint to sinnereso:
I don't know if ZGOO provides that too, maybe it does:
If you use "merTorchbug updated" you will have the /tbug or /tb command to open the UI, and on the tab "functions" you will find all the global API (and addon, if any other addon is enabled) functions.
You can search that for "setting" (top left) and it will filter to only matching function names with setting then.
  Reply With Quote
10/03/23, 05:22 PM   #8
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Originally Posted by Baertram View Post
If you know already what addon does what I need: It's faster to spy that addon, yes.
But if you want to learn how to get to the thing, you should check "how does ZOs do it". And in general it's ncie to compare addon code to "how does ZOs do it", as ZOs sources could have improved/made it easier than addons that were coded years ago (not talking about your addon here, just in general!).

Hint to sinnereso:
I don't know if ZGOO provides that too, maybe it does:
If you use "merTorchbug updated" you will have the /tbug or /tb command to open the UI, and on the tab "functions" you will find all the global API (and addon, if any other addon is enabled) functions.
You can search that for "setting" (top left) and it will filter to only matching function names with setting then.
I went with zgoo because some REALLY old 2014/15 posts described exactly how to look for what I needed with /zgoo mouse with cursor over control but... I could not find anything related in it that way. Im new with those though.
  Reply With Quote
10/03/23, 05:23 PM   #9
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
Originally Posted by Masteroshi430 View Post
Check in the code of my https://www.esoui.com/downloads/info...30sbranch.html it is indeed faster than looking in the ESOUI source code.
will the new kill feed setting be in there? its a new feature and that addon was last updated in june. What you originally gave me works perfectly thought with some tweaks.. I was merely looking for the ZO_something version of it for simplicity if it even exists yet. And im considering the possibility of turing it off if when my feature is enabled for pure personal kill feed awesomeness.

Last edited by sinnereso : 10/03/23 at 05:26 PM.
  Reply With Quote
10/03/23, 10:02 PM   #10
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 245
ok found what I was looking for sorta using masteroshi's addon and a little trial and error...

Code:
SetSetting(SETTING_TYPE_UI, UI_SETTING_SHOW_PVP_KILL_FEED_NOTIFICATIONS, PVP_KILL_FEED_NOTIFICATIONS_OFF)
it does the job if i decide to go with it ty
  Reply With Quote
10/04/23, 07:14 AM   #11
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Originally Posted by sinnereso View Post
I went with zgoo because some REALLY old 2014/15 posts described exactly how to look for what I needed with /zgoo mouse with cursor over control but... I could not find anything related in it that way. Im new with those though.
merTorchbug updated does about the same, only with a more comfortable UI, and search functionalities, saved scripts (if you ran /script <code>..... or /tb <code>... it will save that at the "Scripts" tab so you can double click to run again, or change and run again), String constants, constants, loaded addons and libraries, etc.
The event inspector provides more features to include/exclude/filter events than zgoo afaik.
And you got preview of textures, strings with colors, and helpers on right click at the UI to copy the raw text/text to the chat, or run some GetItem* functions on inventory item data (having bagid and slotindx) etc.

+ many other features and slash commands -> See description of the addon


It even supports /zgoo and /zgoo mouse, even if you do not have zgoo activated -> Just opens merTorchbug UI then

Commands similar to zgoo ones:
/tb or /tbug <some code here or control to run/inspect>
-> Similar to /zgoo <some code here or control to run/inspect>

/tbm or /tbug mouse
-> Similar to /zgoo mouse
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » looking for a way to detect if ingame setting enabled


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