6.0 UI Add-On Changes - Updated Aug 4

UI and Macro
Note: For a list of changes in previous patches, please see thread titled: UI Add-On Changes Compilation.

Edit Aug 4: Added information on changes pertaining to dismissing pets to the bottom of the list.


In a pre-Warlords of Draenor patch, there will be a number of updates and changes to functions that affect how User Interface Add-Ons will work. Add-Ons in the Beta client has been enabled and will allow UI Add-On authors will have a chance to work on updating their Add-Ons and test these changes out.

To help keep things organized, please specify the section you’re referencing when providing feedback.

== Saving Keybinds/Macros/UI Settings ==

Saving keybinds/macros/UI settings has changed a little. Most of the changes were on the backend to make things more in-line with our current architecture.

The main is difference is we no longer compare local versions with the server versions of keybinds/macros/UI settings to determine which ones to load on the client. Instead, we have local CVars that toggle looking at local files or server files. All clients default to server side storage. If you don’t want that, you can change the following CVars to only look at local files instead.

    “synchronizeConfig” [0/1] – defaults to 1 which will save character & account UI configurations (i.e. CVars) to the server.
    “synchronizeBindings” [0/1] – defaults to 1 which will save character & account keybindings to the server.
    “synchronizeMacros” [0/1] – defaults to 1 which will save character & account macros to the server.
    “synchronizeSettings” [0/1] – defaults to 1 which will save all character & account information to the server (this is exactly like setting the previous three to 1 or 0).

== Add-On Communications ==

Add-on communication is now available through custom chat channels.

    SendAddonMessage() where Type is "CHANNEL", and target is the channel name.

== KeyValues ==

To enable the creation of better self-contained templates that are easier to configure, (i.e. you don’t have to remember to override the OnLoad and call the original) we’re allowing both key and value types to be modified using “keyType” and “type” respectively. The default for both is “string”. Other available options are: string, boolean, number, global (where the value is looked up in the global table).

When we make templates that make use of this sort of option, we plan to add a commented out KeyValues section listing all available options so you don’t have to go digging through the code.

Example:
<Frame name="RoleButtonTemplate" virtual="true">
<!-- Available options
<KeyValues>
<KeyValue key="role" value="tank"/>
<KeyValue key="tooltip" value="TALENT_SPEC_TANK_TOOLTIP" type="global"/>
<KeyValue key="roleID" value="1" type="number"/>
</KeyValues>
-->
<OnLoad>
self.Texture:SetTexture(GetTextureForRole(self.role));
</OnLoad>

<OnClick>
DoSomethingWithRole(self.role);
DoSomethingWithRoleID(self.roleID);
</OnClick>

<OnEnter>
GameTooltip:SetText(self.tooltip);
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:Show();
</OnEnter>

<OnLeave function="GameTooltip_Hide"/>
</Frame>

<Frame name="TankButton" inherits="RoleButtonTemplate">
<KeyValues>
<KeyValue key="role" value="tank"/>
<KeyValue key="tooltip" value="TALENT_SPEC_TANK_TOOLTIP" type="global"/>
<KeyValue key="roleID" value="1" type="number"/>
</KeyValues>
</Frame>

<Frame name="HealerButton" inherits="RoleButtonTemplate">
<KeyValues>
<KeyValue key="role" value="healer"/>
<KeyValue key="tooltip" value="TALENT_SPEC_HEALER_TOOLTIP" type="global"/>
<KeyValue key="roleID" value="2" type="number"/>
</KeyValues>
</Frame>

== Atlas ==

Atlases are textures with mappings onto standard textures that include normalized texture coordinates.

    useAtlasSize - Use the actual pixel size of the sub-texture as the in-game rectangle size.

Example:
XML
<Texture atlas="_Garr_InfoBox-Top" horizTile="true" useAtlasSize="true">
<Anchors>
<Anchor point="TOPLEFT" y="7"/>
<Anchor point="TOPRIGHT" y="7"/>
</Anchors>
<!--This uses the top-left quarter of this atlas entry, not the top-left quarter of the whole texture-->
<TexCoords left="0" right="0.5" top="0.0" bottom="0.5"/>
</Texture>

Lua
filename, width, height, left, right, top, bottom, tilesHoriz, tilesVert = GetAtlasInfo("name")
someTexture:SetAtlas("_Garr_InfoBox-Top");
atlas = someTexture:GetAtlas()

== New Timer System ==

There is a new timer system being added in. Documentation is available in C_TimerAugment.lua

Functions:

    C_Timer.After(duration, callback) – Calls the callback cafter duration seconds.
    timer = C_Timer.NewTimer(duration, callback) – Calls callback after duration seconds. This is more expensive than C_Timer.After, so this only should be used if you need it to be cancellable.
    timer:Cancel() – Cancels a timer
    ticker = C_Timer.NewTicker(duration, callback, iterations) – Calls callback every duration seconds (up to iterations times)
    ticker:Cancel() – Cancels a ticker

== Animation System ==

Animation system is receiving a few changes and various bug fixes.

    Alpha animation has fromAlpha and toAlpha. This is a variant from just a change delta.
    Scale animataion has fromScale and toScale.
    childKey is the same as targetKey with automatically pre-pending “$parent.$parent.”
    AnimGroups now have a “setToFinalAlpha” setting that will apply the animations final resulting alpha to all animating regions.

== Dismissing Pets ==

In the pre-Warlords of Draenor patch, Dismiss Pet will no longer be in the Spellbook. Players will dismiss their pets by right-clicking on the pet's frame and selecting Dismiss Pet. We'll be adding a /petdismiss command so that UI Add-Ons will continue to have a way to dismiss pets.

Reminder: To help keep things organized, please specify the section you’re referencing when providing feedback.
== Saving Keybinds/Macros/UI Settings ==
Feature request: Can we have cross-character settings for things like the chat windows, autoloot, and the other things that are still per-character?
I'll get a lot of use out of the <KeyValues> and the C_Timer stuff.

The synchronizeMacros cvar doesn't appear to behave how it's described on beta yet. (There is no SET synchronizeMacros "1" entry in config.wtf and its behavior is the old behavior of grabbing edits to the macros-cache.txt. Adding a SET synchronizeMacros "1" didn't alter behavior either. Didn't test the other cvars). When it's implemented I hope it continues to write out a macros-cache.txt even when its set to 1. It's a useful backup especially since the macro editbox has no undo feature. Many times I've alt-tabbed back into game to reply to a whisper and I've destroyed a macro.
== Atlas ==
Will we be able to create our own? I would assume not since none of the one you guys are using are defined in the frameXML, but figured i'd ask.

On a tangent to the above, is there any word on png support? This would be a massive help for when working with textures that have an alpha channel.
07/10/2014 02:39 PMPosted by Rygarius
ticker = C_Timer.NewTicket(duration, callback, iterations) – Calls callback every duration seconds (up to iterations times)


Is the call really "NewTicket" or was that a typo and "NewTicker" is the actual call?
It's NewTicker. From C_TimerAugment.lua:
--Creates and starts a ticker that calls callback every duration seconds for N iterations.
--If iterations is nil, the ticker will loop until cancelled.
--
--If callback throws a Lua error, the ticker will stop firing.
function C_Timer.NewTicker(duration, callback, iterations)
07/10/2014 05:45 PMPosted by Kaydeethree
== Saving Keybinds/Macros/UI Settings ==
Feature request: Can we have cross-character settings for things like the chat windows, autoloot, and the other things that are still per-character?

Unfortunately, the CVar system is only either/or. If we made them account-wide, no one would be able to make them work on a per-character basis. However, we reevaluate the CVars and their defaults from time-to-time. We’ll keep these in mind, but will likely err on the side of leaving them character based.

07/10/2014 09:27 PMPosted by Gethe
== Atlas ==
Will we be able to create our own? I would assume not since none of the one you guys are using are defined in the frameXML, but figured i'd ask.

On a tangent to the above, is there any word on png support? This would be a massive help for when working with textures that have an alpha channel.

The system doesn't support creating your own; it's tied to our internal database and editors. You only need to know about our atlas if you reuse our textures.

There's no PNG support in Warlords of Draenor, but we may reevaluate this in the future.

07/11/2014 05:34 AMPosted by Kulakai
ticker = C_Timer.NewTicket(duration, callback, iterations) – Calls callback every duration seconds (up to iterations times)


Is the call really "NewTicket" or was that a typo and "NewTicker" is the actual call?

Fixed it, thanks for letting me know. :)

I'll get a lot of use out of the <KeyValues> and the C_Timer stuff.

The synchronizeMacros cvar doesn't appear to behave how it's described on beta yet. (There is no SET synchronizeMacros "1" entry in config.wtf and its behavior is the old behavior of grabbing edits to the macros-cache.txt. Adding a SET synchronizeMacros "1" didn't alter behavior either. Didn't test the other cvars). When it's implemented I hope it continues to write out a macros-cache.txt even when its set to 1. It's a useful backup especially since the macro editbox has no undo feature. Many times I've alt-tabbed back into game to reply to a whisper and I've destroyed a macro.

UI Add-Ons haven't been enabled yet on Beta. This is just an advanced heads-up to give you guys time to prep.
== Add-On Communications ==

Any details you can share about the bandwidth which addons can use in 6.0.x to send data between players? Currently, it's capped at about 1kB/s according to (http://wowpedia.org/ChatThrottleLib). With these changes, and the changes with how the server processes client requests (saw something about them no longer being batched every Xms but being processed in real-time), can we expect to be able to safely use more bandwidth than we currently can? Also, I assume this change means we can send data via trade chat?

I'll certainly be testing these things once addons are enabled, but it'd be nice to have some context from Blizzard's point-of-view on this topic.

== New Timer System ==

This is something I've written myself since I started working on addons. Glad to see it become part of an official API. Are these timers going to be implemented in Lua? I assume the Lua environment will still be single-threaded, so when exactly do the timers fire? Again, some details would be awesome since I do some pseudo-multi-threaded stuff in my addons using coroutines, so I'd love to see if these can tie into that. Even if they just replace my implementation that'd be handy.
If the timers are in lua, then using animationgroups will be better. But if the timers are direct calls to C code. Then it will be faster.

About the new alpha changes. On live there has been a bug where if you fade out a frame that has a child frame that is also fading out. You can cause the child frame to get stuck mid alpha. So say a frame is half faded out, so it looks ghostly. That frame will look that way till a reloadUI is done.

I had to write complicated code to work around this bug. Be great if I can just fade out a frame and not have to worry if any of the child frames are also fading out at the same time.
Just for everyone's info, Mods are now working in the current release of Beta. However the "Load out of date" button does not work, so you have to manually update the WoW version of each mod you use. If you don't want to be bothered, CollisionTD has released a few mods that he has updated so that they at least work. There are no guarantees right now due to possible bugs with the mods themselves though.

https://docs.google.com/file/d/0B0BVED00EIIUejFmVW5OVjk2Tm8/edit

These include:
Castbar
CombatTime
ElkBuffBars
EnergyWatch
Nameplates
NeedToKnow
Skada
TipTac
Weak Auras
Hello.

Is it acceptable to ask questions regarding the API in this thread? I'm worried about a few return values from the UnitBuff() function.

Thank you.

Regards,
Cammy Bear.
07/10/2014 02:39 PMPosted by Rygarius
== Add-On Communications ==

Seeing as some other changes are being made to SendAddonMessage(), will SendAddonMessage() WHISPER be changed to properly work in crossrealm zones?

Currently they silently fail to send/receive messages to/from players from other realms, despite being in situations where SendChatMessage() WHISPER will succeed properly. This may possibly be related to http://us.battle.net/wow/en/forum/topic/12878457755 where SendAddonMessage() WHISPER also behaves differently from SendChatMessage() WHISPER in a way which causes some failures.

Such a change would enable much better use of crossrealm zones for roleplaying servers, as those server types currently make heavy use of addons to identify other roleplayers (meaning the design intent of crossrealm zones, making the world feel more populated, would finally be really fulfilled for that realm type). It would also, of course, be helpful to the host of other addons which make use of SendAddonMessage() WHISPER in a variety of ways.

(Note: I'm explicitly referring to crossrealm zones here, not to connected realms -- as far as I'm aware, SendAddonMessage() WHISPER already works as it should with connected realms on live.)

And a really, really short second question... Still Lua 5.1, or is Warlords using 5.2? It'd be really nice to have __pairs for some things I do.
Is there a separate sticky/forum that lists additions or deletions to the actual API?

I check where I thought they might be found, but so far haven't seen any documentation.

What has triggered the question is that in several places and cases there appears to be addons that have broken due to the removal or otherwise altered API calls.

Example: QUEST_QUERY_COMPLETE

Fires when quest completion information is available from the server. This event fires in response to a call to the QueryQuestsCompleted function.

"This function or event no longer exists in version 6.0.1.18612 of World of Warcraft."

Also: QueryQuestsCompleted()

Queries the server for the player's completed quest information....

"This function or event no longer exists in version 6.0.1.18612 of World of Warcraft."

The 2 obviously are paired so makes sense that either both are present or neither.

This is just one example. Where can we find out what all these changes are and how to work with the WoD api?
/bump 12hr bump
There's really no need to bump a sticky thread. It's not going anywhere :P

For changes and help you can check these locations:
http://wowpedia.org/Patch_6.0.1/API_changes#Changes
http://www.wowinterface.com/forums/forumdisplay.php?f=152
Thanks, yeah forgot it's a sticky. DOH!

However, I'd prefer the official blizz page for the updates, after all, the other websites must be getting the info from somewhere. You can't really disassembled/reverse engineer how the api calls are now, changes, new ones etc. There has to be some kind of published info from Blizzard.
Not to mention I've found things not yet listed on the provided non-Blizzard links

08/01/2014 08:52 AMPosted by Macdeth
There's really no need to bump a sticky thread. It's not going anywhere :P

For changes and help you can check these locations:
http://wowpedia.org/Patch_6.0.1/API_changes#Changes
http://www.wowinterface.com/forums/forumdisplay.php?f=152


Not to mention I've found things not yet listed on those links.
Not to mention I've found things not yet listed on the provided non-Blizzard links

Not to mention I've found things not yet listed on those links.


If you have info that's not on there, add it! It's a wiki for a reason.
You can't really disassembled/reverse engineer how the api calls are now, changes, new ones etc..


Actually, that's exactly what they do.
You can run "ExportInterfaceFiles code" or "ExportInterfaceFiles art" from the command console in the login screen to get the Blizzard lua/xml files or the Blizzard textures respectively. From there it's just a simple diff from previous extracted versions.
Any info/update on the really annoying bug introduced into the SavedVariables serializer (see: http://www.wowinterface.com/forums/showthread.php?t=49523) on Beta I assume as a side effect of some of these changes?

Not really looking to having to floor every number that is supposed to be an integer coming in from SavedVariables because the serializer can't be trusted anymore.

Join the Conversation

Return to Forum