WoW News

Blizzard Continues to Loosen Addon API Restrictions and Whitelist Select Spells

In an update within the WoW UI Dev Discord, Blizzard has shared new plans for addon API restrictions, allowing players more control over cast bars, unit frame healing, and limited whitelisting of select spells!

While some of the technical aspects only matter to addon authors, the short version is that the developers are relaxing some restrictions and giving players more tools to interact with cast bars or to predict healing and absorbs on unit frames directly. Overall, these are very good changes coming at the request of player feedback.

Whitelisting Soul Fragments and Maelstrom Weapon
One of the biggest updates is whitelisting specific spells, allowing addons access to track their states, charges, or cooldowns in a way that the current UI does not. A big part of this is making the number of available combat resurrections more visible for players who don't necessarily have one of those spells, with Skyriding also being added in order to make it easier for players to see how many of the shared cooldown charges are available.

Among other improvements, these changes will allow addons to track Maelstrom, rather than using janky workarounds.

Neither of those have much in the way of direct combat implications, though the big surprise is adding Enhancement Shaman Maelstrom Weapon and Devourer Demon Hunter Soul Fragment, both of which are very important secondary resources that lack native UI elements. While whitelisting them is a huge improvement for those spec's ability to engage with their most important resource, it also contracts Blizzard's previously stated intent to avoid addons enabling a gameplay advantage, which these almost certainly do. Although this may represent a slippery slope, enterprising players had already come up with jury-rigged solutions to replicate the same kind of power trackers that they would have previously made using addons. While we shouldn't expect this leniency to be extended to every class, spec, or spell, the developers have shown willingness to evaluate these needs on a case-by-case basis.

Upcoming Addon API Changes

via WoWUIDev Discord
Blizzard again! Below you will find a list of changes we are making to addon restriction APIs in the coming weeks.
These are not the entirety of the changes we are planning, just the ones already committed to for the immediately upcoming Beta releases.

NOTE: Beta 5 will be the last Beta build we put out this year. We will be continuing to work on addon dev requests until the holidays but Beta 6 won't be made until January.
Also note that Beta 4 had more changes than expected, and Beta 5 has fewer due to build timing (Beta 4 ended up being built later than expected).

REMINDER: Beta builds have switched to a 12.0.1 version number instead of 12.0.0. This is because 12.0.0 will be the version used for Midnight pre-patch, and 12.0.1 will be the version used for actual Midnight launch. The remainder of Beta will feature 12.0.1 builds, while PTR (when it goes up) will feature 12.0.0 builds. We will continue to make addon-related changes in 12.0.0 until we make our pre-patch Release Candidate (RC) build.

One important thing to note here is that we DO plan to have these new addon restrictions active in pre-patch (12.0.0), rather than waiting until 12.0.1. The reason for this is we want to give players a chance to get used to the new addon landscape prior to Midnight launch. We are not in 12.0.0 RC yet, so you can continue to test in Beta for now, but once we pick an RC build (we will let you know when that happens) we advise addon authors looking to prepare for pre-patch switch to testing on PTR instead of Beta.

After the 12.0.0 RC is chosen, our engineers will be switching over to making most addon-related changes in 12.0.1 (outside of very high priority stuff). We will continue to make changes to 12.0.1 all the way up until launch (and well past launch even, in follow-up patches) to provide you with more of the QoL changes you have requested.

Coming in Beta 5 (ETA 12/17)
UnitFrame Heal Absorb & Heal Prediction

We have added a new UnitHealPredictionCalculator Lua object (created via a new CreateUnitHealPredictionCalculator API), and an associated API UnitGetDetailedHealPrediction that accepts this object type.

Addons can use these APIs to calculate all of the heal prediction and absorb data needed for passing directly into other APIs.

This object provides various options, such as allowing for damage absorbs to be clamped to either missing health, missing health after adding incoming healing, or maximum health.

Very brief example shown below:

local calculator = CreateUnitHealPredictionCalculator();
UnitGetDetailedHealPrediction(unit, unitDoingTheHealing, calculator); -- 'calculator' is updated with new data after this call.
local incomingHeals, incomingHealsFromHealer, incomingHealsFromOthers, incomingHealsClamped = calculator:GetIncomingHeals();
myStatusBar:SetValue(incomingHealsFromHealer);

Cast Bars

Added a new optional direction parameter to `StatusBar:SetTimerDuration` that allows the status bar to calculate its fill from remaining duration rather than elapsed (for channeled spells primarily).

Party Kill Event

Added a new `PARTY_KILL` event that gets sent when a party member kills a unit. The payload is 2 unitGUIDs, the attacker and target. Both are secret when the associated unit's identity is secret.

Currently being worked on
Whitelisting Select Spells

Adding numerous spells to the whitelists for cooldown/aura secrecy: Skyriding spells, the GCD spell, Maelstrom Weapon, Devourer DH resource spells, Combat Res spells.

Continue to call out spells that you think should be whitelisted, we will evaluate each of them individually.

Removing Old Duration APIs

We are removing several APIs (in C_UnitAuras, C_Spell and C_ActionBar) that are no longer needed now that Duration objects are a thing.

Generic Boolean To Color APIs

We are adding 2 new APIs (C_CurveUtil.EvaluateColorFromBoolean and C_CurveUtil.EvaluateColorValueFromBoolean) that can be used to convert a secret boolean to a color.

This is in preference to adding SetStatusBarColorFromBoolean, SetColorTextureFromBoolean, etc.

Lots More Cast Bar Stuff

We are adding a new castbar spell sequence ID delivered with spellcast events and from the UnitCastingInfo/UnitChannelInfo APIs. This sequence ID is only delivered for casting events that should display a castbar in the UI, is incremented on each new spellcast, and is never secret.

We will be removing secret restrictions on several values needed by addons to properly display enemy empowered casts (number of stages and the percentage of cast time each stage consumes).

We will be adding a way to include the hold-at-max time of empowered casts in a duration object.

Formatting Secret Times

We are adding a new SecondsFormatter Lua object that will allow addons to format secret time values into strings.

Other numeric formatting solutions are also being worked on, including a solution for formatting differences between cast durations (eg. for spell pushback).

Restricted Environment Issues

Several functions (strsplit, strjoin, strconcat) that got mistakenly removed from the restricted environment are being added back.

Reload UI & Secrets

We are fixing an issue where secret values are made non-secret following a UI reload.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.