Thread Tools Display Modes
10/29/16, 04:00 AM   #1
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Collecting full data of skill sets without swapping action bars

Hey guys, I am looking for a way to gather data about all equipped abilities in BOTH action bars at once on addon startup. I browsed through the wiki and Circonian's SetSwap's code but I only found functions that can gather data of the currently active weapon pair.

My problem:
Once the user has logged in and starts with weapon pair 1 [GetActiveWeaponPairInfo() returning 1, true] I can only collect data from this active weapon pair and save it to a table:
Code:
local actionBar = {};
  for n = 3, 8 do -- browse through action bar slots, including ulti slot and gather some info
    actionBar[n] = {
      id	 = GetSlotBoundId(n),
      name 	 = GetSlotName(n),
      sType 	 = GetSlotType(n),
      texture = GetSlotTexture(n)
    }
  end
  d(actionBar);
This is working fine so far. Thing is, I need exatly the same data from the weapon pair that is currently NOT active. Waiting for the user to swap his active weapons won't work for what I have in mind, becuz I need the data of all equiped abilities at once.

Approaches that I tried:
1. Looking for a zenimax function/table that already contains the data I need (failed)
2. Looking for a (protected) function that makes the character swap his active weapons automatically after loading the addon/user interface (failed)

Ressources that I consulted:
http://www.esoui.com/forums/showthread.php?t=6140
http://esodata.uesp.net/100010/src/i...onbar.lua.html
This site's wiki

Does anyone have some experience with this and could help? Thanks in advance!
  Reply With Quote
10/29/16, 05:31 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
I don't believe there is a way to do this in the current API.
The functions to swap the weapons are all private and the information about the other bar is only available while it is active. Besides asking the user to swap the weapons or changing your approach and wait until he changes them by himself, there is not much you can do.
  Reply With Quote
10/29/16, 08:43 AM   #3
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
I was afraid that could be the case, gotta change my approach then Thanks for the quick response!
  Reply With Quote
10/29/16, 01:04 PM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Yeah you can't.

You can see how I did in SuperStar addon to get data. It works well.
  Reply With Quote
10/29/16, 01:28 PM   #5
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
cool, thx! hope i understand it, your code is ... advanced xD
  Reply With Quote
10/29/16, 02:41 PM   #6
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Thumbs up

Hey @Ayantir, I just browsed through your code. This "swap sniffer" method as you named it, is quite similar to my current implementation. The Problem is we have to wait for the player to swap his weapons before we get the full data set (= main bar and back bar). What I had in mind is the following:

1. Nightblade tank ability "mirrage" (20% dodge buff)
2. an aura/icon that displays as soon as the buff is missing (as a reminder for keeping it upat all times)
3. loading/displaying this aura only makes sense as long as the player has the ability sloted
4. I usually slot this ability on my back bar (long duration, no synergies, etc.)
=> Icon is even displayed if the ability is not sloted. So I wanted to provide a "loading condition: ability sloted" - but this can only be achieved if the addon knows both bar layouts from the beginning.

So using this swap sniffer method and unload unused auras as soon as the addon knows both bar layouts seems the best approach I can get, sadly

Thanks for confirming sirinsidiators response!
  Reply With Quote
10/29/16, 04:04 PM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Tbh I don't think it should be necessary to show this information at all time, especially out of combat.
Maybe only show it if the player has cast the spell and it has ran out? During combat you can just leave it visible and once the fight is over and the player doesn't recast it for x seconds hide the info again. That way it is less intrusive and you do not have to worry about the presence of the ability on the backbar.
  Reply With Quote
10/30/16, 04:45 AM   #8
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Thats a good idea for the planned "loading conditions tab"^^
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Collecting full data of skill sets without swapping action bars

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