Quantcast AddOn API Released! - ESOUI
Thread Tools Display Modes
02/20/14, 06:20 PM   #1
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 430
AddOn API Released!

We're happy to announce that we've gotten permission to release the AddOn API for ESO. You can find it on our wiki. In addition to the list of API Functions and Events, we've also posted Zenimax's AddOn Quick Questions and their 'My First Addon' tutorial.

At present the API Functions and Events are merely listed alphabetically. Getting them sorted into their various categories (ie Global Variables, Object API, etc.) and having things like what parameters get returned haven't been added yet. That's the joy of a Wiki, though, everyone is welcome to contribute as they can.

Have at it guys & gals!
  Reply With Quote
02/21/14, 02:57 AM   #2
zork
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 29
That OnUpdate tag in the XML that everyone seems to be using right now. How often is that firing? Every frame? According to the this snippet (..."We're just going to make a simple window frame with some text on it that updates every frame."...) I would guess yes.

Code:
  <OnUpdate>
    DoStuff()
  </OnUpdate>
Are there any arguments that allow throttling like elapsed?

Article from the wow wiki page regarding that kind of trigger:
http://www.wowwiki.com/Using_OnUpdate_correctly
http://wowpedia.org/Using_OnUpdate_correctly

Frame rate and the human eye
http://en.wikipedia.org/wiki/Frame_rate
__________________
| Simple is beautiful.
| ESOUI GoogleCode | ROTHUI GoogleCode | WoWInterface | Guild | zorker.de

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02/21/14 at 03:16 AM.
  Reply With Quote
02/21/14, 09:21 AM   #3
JonathanDark
 
JonathanDark's Avatar
Join Date: Feb 2014
Posts: 6
Originally Posted by Cairenn View Post
We're happy to announce that we've gotten permission to release the AddOn API for ESO.
And there was much rejoicing!
  Reply With Quote
02/21/14, 12:05 PM   #4
Wykkyd
Are you Wykkyd Gaming?
 
Wykkyd's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 112
Originally Posted by zork View Post
Are there any arguments that allow throttling like elapsed?
Cross posting this from something I posted somewhere else I can't talk about

Events in this game can trigger really, really... really fast. If you want to know how fast you can easily dump a counter to your chat window when that event triggers and watch as it fliiieeeeesssss by. This can cause issues when your update script has to parse something or do any heavy lifting. In fact, it can cause a problem at times when your update script isn't really doing much.

The safe way to handle this is to buffer your event handling so that you're only processing updates at set intervals, instead of nearly instantaneously. And yes, some things are fine at lightening speed but I've found that most work just fine between 0.33 and 3 seconds.

In the case of my War Tools addon (found within my [MH] Addon Suite) I parse Cyrodiil rather extensively. When I first drafted the addon I walked into Cyrodiil, the events registered and I instantly entered stutter-frame, stop-motion TESO. It... was... bad...

The simple fact was that events were triggering too quickly for the Cyrodiil parser to constantly run the way it was. In fact, it was running in layers on top of itself because the events fired so fast.

I also use this trick in Gear Tools (also in the Addon Suite) to build a queuing system to handle gear moves because items can't all be unequipped all at once. You have to trigger those moves one at a time. So, I pile the "these things need to happen" gear moves into a table and I execute anything pending in the table, 1 item per iteration, as the OnUpdate event triggers in the addon... at a 0.33 buffer. Because anything faster than 1/3rd of a second doesn't allow time for gear to move properly and register with your UI.

This is the basic buffer I use, modified for "generic and global" application:
Code:
local BufferTable = {}
function BufferReached(key, buffer)
	if key == nil then return end
	if BufferTable[key] == nil then BufferTable[key] = {} end
	BufferTable[key].buffer = buffer or 3
	BufferTable[key].now = GetFrameTimeSeconds()
	if BufferTable[key].last == nil then BufferTable[key].last = BufferTable[key].now end
	BufferTable[key].diff = BufferTable[key].now - BufferTable[key].last
	BufferTable[key].eval = BufferTable[key].diff >= BufferTable[key].buffer
	if BufferTable[key].eval then BufferTable[key].last = BufferTable[key].now end
	return BufferTable[key].eval
end
This is how you would consume that buffer in an event/update handler:
Code:
function OnUpdateHandler()
	if not BufferReached("myaddonupdatebuffer", 1) then return; end
	--[[ process your update here ]]--
end
Hopefully this little tidbit helps someone.
Cairenn it might be good to have tips like this in your wiki, since OnUpdate fires so quickly it's likely to crash a LOT of people if addons are written that don't know how to buffer properly.
  Reply With Quote
02/21/14, 12:34 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
It's a wiki - anyone can help out!
  Reply With Quote
02/21/14, 01:38 PM   #6
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 430
What Seerah said. Feel free to add it, and any other tips you have.
  Reply With Quote
02/21/14, 03:29 PM   #7
Holylifton
 
Holylifton's Avatar
Join Date: Feb 2014
Posts: 18
Originally Posted by JonathanDark View Post
And there was much rejoicing!
Read your creds from a previous post. Looking forward to see what you come up with.
__________________
Black holes are where God divided by zero.
  Reply With Quote
02/21/14, 03:59 PM   #8
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Cheer

Now I can start looking to see what I can do. My guildies in wow are already looking forward to what addons I think up for ESO.

Of course, no beta this weekend *sigh*
  Reply With Quote
02/21/14, 03:59 PM   #9
Kelnoreem
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 11
Originally Posted by Wykkyd View Post
Cross posting this from something I posted somewhere else I can't talk about .
This info was timely for me, as I don't have access to that somewhere else, but have started looking at ESO LUA addon development.
__________________
Curiosity is the cure for boredom, there is no cure for curiosity.
  Reply With Quote
02/21/14, 05:15 PM   #10
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Hmm, am I reading it right.

The Addon Tutorial gives the impression you can start a new addon while still inside ESO playing. Unlike WOW where you have to be logged out to set the files up. Or, is it assuming we know that already.
  Reply With Quote
02/21/14, 08:00 PM   #11
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
Nope. You can add files and even whole addons while the game is running. You just need to reload the UI for it to pick them up.
  Reply With Quote
02/21/14, 08:39 PM   #12
Wykkyd
Are you Wykkyd Gaming?
 
Wykkyd's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 112
Originally Posted by Seerah View Post
It's a wiki - anyone can help out!
Page create and linked under Guides.
  Reply With Quote
02/21/14, 09:01 PM   #13
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 430
Originally Posted by Wykkyd View Post
Page create and linked under Guides.
Excellent!
  Reply With Quote
02/22/14, 07:42 AM   #14
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Originally Posted by Seerah View Post
Nope. You can add files and even whole addons while the game is running. You just need to reload the UI for it to pick them up.
Cool, I always hated that part of wow rofl
  Reply With Quote
02/24/14, 01:17 PM   #15
Son of a Sailor
Join Date: Feb 2014
Posts: 7
Now my time with the beta will be torn between actually playing the game and working on an addon. I wish we could test them without beta access
  Reply With Quote
02/24/14, 01:44 PM   #16
gamegenius86
 
gamegenius86's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 27
Originally Posted by Son of a Sailor View Post
Now my time with the beta will be torn between actually playing the game and working on an addon. I wish we could test them without beta access
That would be amazing! However sadly, we cant
  Reply With Quote
03/01/14, 02:21 PM   #17
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 47
Seems like something I'd like to look into. I had a key for a while, but have been too busy to make it into a testing weekend. I'm on break from WoW in favor of FFXIV at the moment and am starting to miss writing addons.
  Reply With Quote
03/01/14, 02:41 PM   #18
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
Seerah waves SDPhantom over to the dark side...

We have cookies!

**one must be willing to pick up said cookies, they will not be delivered
  Reply With Quote
03/01/14, 04:35 PM   #19
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 430
Cairenn holds out a nice warm mug of hot cocoa to go with Seerah's cookies.

*must also be picked up
  Reply With Quote
03/20/14, 05:35 AM   #20
datbunneh
Join Date: Mar 2014
Posts: 12
Question

Are they going to release API with descriptions/commentary?
  Reply With Quote

ESOUI » Site Forums » News » AddOn API Released!

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