(637 Kb)
Updated: 06-24-18 06:03 AM
File Info
Battle for Azeroth (8.0.1)
Updated:06-24-18 06:03 AM
Created:06-12-18 02:08 PM
Categories:DPS, Battle for Azeroth Beta


Version: 8.0.1_201806250000
by: Chosenfish [More]

This version is only usable on Beta:Battle for Azeroth and PTR.


The aim of Prediction is to take your character's current state (gear, buffs, debuffs, etc) and attempt to predict what abilities you should be using within the next few moments. It does this by keeping an internal database of 'Rules' - similar to SimC - and a list of 'Effects'. These Rules and Effects make use of a simple API that has been exposed for the player to use, and can be edited/updated in-game. It also includes a personal dps meter, which allows you to easily test the efficacy of your priority list.

The config frame is restricted to your class and talent specialization, but it allows you to select/make different configs of your own choosing, based on your selected talents and/or named rulesets. You can also use the Import/Export feature to save and share Rulesets.

Updating this addon will cause the default Rulesets to be changed to the author's versions. You can create your own rulesets to prevent losing any customisations you may have made.

Priority Lists Implemented *

Death Knight (Blood)
Druid (Restoration)
Mage (Arcane - no talents)
Monk (Mistweaver)
Paladin (Holy)
Priest (Discipline, Holy)
Shaman (Elemental, Restoration)

* Not necessarily optimal, doesn't include healing abilities, and only effects of the included spells were implemented. The astute reader will note these are primarily healing specs - they are easier to start with, as have fewer dps abilities. See the Changelog to see a very brief description of the test builds.


/prediction [option string]

ruleset [name]
Switch to the specified ruleset. This can be done anytime, and is included mainly to facilitate interplay with other addons through a macro.
frequency [num]
The frequency for calculations to take place. More results in a smoother experience. (0-30, default 16)
overlay [options]
If the debug overlay is visible or not. The overlay is a fixed size, and atm data overflowing the overlay results in loss of frames. Use the following options at your discretion.
Display all spells in overlay. Some specs, such as BM Hunter, this will cause massive frame rate loss, so you're better off using the targeted version below.
[+-]spell [spell name]
Display the selected spell in the overlay. This can be especially useful in the event the spell you are interested in is not automatically tracked (a victim of the Blizz IsSpellKnown bug).
Display the prediction calculations. Useful for debugging your priority list, difficult to follow though. Screenshots are generally required to snapshot due to the pace of predictions.
ooc on|off
Display the HUD when out of combat. Also, the HUD will only display on a non-friendly target.
latency [num]
The latency in seconds (default 0.18).
size [pixels]
The base size of the icons. All icons are scaled from this (default 80).
offsetX [pixels]
Positioning of center of current prediction. Predictions slide in from the right of this location.
offsetY [pixels]
Positioning of center of current prediction.
secondBest on|off
Display the second best cast also. This is bugged at the moment and never displays.
showDPS on|off
Display the personal damage meter. Non-configurable atm, to the bottom-right of the frame.

Evaluation Sequence

  1. Rules
    Evaluated to determine what is cast.
  2. SpellEffects.Instant
    Effects that happen immediately upon cast.
  3. DelayedEffects
    If any have been specified by an action in the current sequence, evaluate when time past.
  4. BuffEffects
    Effects related to buffs that happen during the cast/GCD. An example is Voidform effect on haste generation.
  5. RegenEffects
    Regen effects that happen during the cast/GCD. This can be as simple as energy regen, or complex such as Maelstrom Weapon and Voidform Insanity degeneration.
  6. SpellEffects.Cast
    The effects of the cast. Last thing evaluated, with any delayed effects that happen after the SpellEffect.Cast will be processed in the next prediction, if reached.


        Player {
            name            The character's name
            class           The character's class
            spec            The character's current specialization
            talents         A list of the character's chosen talents
            gear            A list of the character's equipped gear
            enchants        NOT YET IMPLEMENTED
            haste           The character's haste value, where 1 = 100%
            hp_percent      The character's life, as percent
            resources       A list of resources the character may have, with associated values
            maxResources    A list of the maximums a character may have of each resource
            runes           For Death Knights, recharge times for each rune
            buffs           A named list of buffs that the character currently has
            debuffs         A named list of debuffs that the character currently has
            spells          A named list of spells that the character has available
        Pet {
            name            The pet's name
            class           The pet's class
            spec            The pet's current specialization
            haste           The pet's haste value, where 1 = 100%
            hp_percent      The pet's life, as percent
            resources       A list of resources the pet may have, with associated values
            maxResources    A list of the maximums a pet may have of each resource
            buffs           A named list of buffs the pet currently has
            debuffs         A named list of debuffs the pet currently has
        Target {
            name            The target's name
            hp_percent      The target's life, as percent
            resources       A list of resources the target may have, with associated values
            buffs           A named list of buffs that the target currently has
            debuffs         A named list of debuffs that the target currently has
            cast            The name of the currently casting spell, or NIL
            channel         The name of the currently channeled spell, or NIL
            interruptible   If the cast/channel can be interrupted
        Buff/Debuff {
            count           How many stacks the buff/debuff has
            timeRemaining   How long the buff/debuff has left till it is exhausted, in seconds
            caster          Who cast the ability
        Spell {
            spellId             The id of the spell
            name                The name of the spell
            icon                Path to the icon file
            baseCastTime        Cast time without haste taken into account
            castTime            Current cast time
            baseCooldown        Cooldown without haste and abilities taken into account
            effects             List of effects that this spell has on successful cast
            maxCharges          How many charges this spell may have
            currentCharges      How many charges the spell currently has
            remainingCooldown   How long (in seconds) till reusable
Utility functions are also available:
         Player.runes.available How many runes are available right now
         AddRunes(x)            Recharge x runes
         UseRunes(x)            Use x runes
         GetPeriod()            Return how long in seconds to apply a buff/regen/cast update for
         Procced(chance)        Returns true chance percent of the time
         OverrideGCD(time)      Tell the engine the spell uses a different GCD.
         SetInstant()           Tells the engine the spell used an instant version instead of a cast.
         SetDelayEffect(time, instructions)
                                Tells the engine there is an effect that is delayed, e.g. Elemental T21_2PC causes Earthen Strength when spell lands, not when cast.


The author primarily plays an Elemental Shaman, so the data for that (was!) pretty fleshed out, though possibly not optimal, and you are recommended to use it as an example of what to do. For example, the effect of the spell 'Flame Shock' is given below:
Lua Code:
  1. Target.debuffs['Flame Shock'] = { count = 0, timeRemaining = 15, caster = 'player', }
  2. local spent = math.min(20, Player.resources['Maelstrom'])
  3. if Player.talents['Aftershock'] then
  4.     spent = spent * 0.7
  5. end
  6. Player.resources['Maelstrom'] = Player.resources['Maelstrom'] - spent
Rules have two fields for you to enter - the name of the ability, and a condition that must evaluate to either TRUE or FALSE, with TRUE indicating that ability should be used. You do not need to check if the ability is available or off cooldown - Prediction will do that for you, before testing any other conditions. For a real example, one of the conditions for 'Totem Mastery' as an Elemental Shaman is
Lua Code:
  1. (not Player.buffs['Totem Mastery'] or Player.buffs['Totem Mastery'].timeRemaining < 1.5)
Rules are evaluated in order of prescription - the first ability found that is both available and matches it's condition is the ability that will be recommended at that time. The addon then simulates the use of that ability, via it's Effect if defined, and continues to make predictions in this way until a predetermined limit (at the time of writing, 4) is reached.

Extra Considerations

When checking the property of an item, particularly gear or debuff, you should check that the gear/debuff first exists. E.g:
Lua Code:
  1. (Target.debuffs['Flame Shock'] and Target.debuffs['Flame Shock'].timeRemaining < 9)


Add configuration panel to the UI.
Add DISPELLABLE etc flags to buffs/debuffs.
Investigate Azerite gear buffs.
Finish adding spell/talent effects.
Add basic DPS rotations.
Improve help/instructions.
Finish DelayedEffects implementation [DONE for next release].
Catch parsing errors caused be entry outside GUI (hard file edits and imported Rulesets) [DONE for next release].
Fix secondBest config option [DONE for next release].

[?bugfix] Ensured Prediction doesn't try to advance a user-nullified buff.
Increased size of data entry GUI, and attempted to make it more intuitive to use.
Added a Notes tab, for RuleSet author's to add extra information.
Added Blood DK rotation [2222212], ~1360dps @ 111
Started adding spell effects in for Arcane Mage - spells done, but not talents as yet.
Based on experience with Arcane Mage, next release will mostly have spell and talent EFFECTS done, rather than priority lists. Will hopefully make it
easier for players to put their own priority lists together without worrying about the back-end (even though the purpose of the addon IS to give you
that much control).
Synced in-game help with wowinterface version.

Modified DPS to also report time in combat.
Added ST priorities for Mistweaver Monk, Holy Paladin, Holy Priest, Discipline Priest
(Using healers as smaller tasks, still useful for revealing bugs)
DPS Measured for 5 minutes on a Raiding dummy by 110 premade characters:
Restoration Druid: [3131131] ~860dps
Mistweaver Monk: [1121121] ~890dps
Holy Paladin: [3123221] ~1100dps
Discipline Priest: [3132112] ~1160dps
Holy Priest: [1222213] ~1030dps
Restoration Shaman: [3131131] ~1300dps - BUT had Heart + Chest

Added workaround for IsSpellKnown bug (Data.BrokenSpellIDs in Data.lua). This should also fix the talented spells missing bug. Will add missing spellIds to table as required/found.
Fixed bug where infinite auras were giving a negative timeRemaining.
Add ruleset for Restoration Druid as a real example.
Renamed constants to more global-friendly names.
Added basic DPS meter to GUI, with associated showDPS on|off switch.

Added hasted cooldowns for all specs.
Added Target.{cast,channel,interruptible}
Added Import/Export rulesets.
[FOUND BUG, NOT FIXED]: Some talented abilities missing from spell tracking - what and why?
[TODO]: Catch parsing errors so they don't crash client (I use bugsack, so no crashes for me.)
[TODO]: Rename constants into namespace.

Persisted Options in DB by name/realm.
Added ruleset, size, offsetX and offsetY config options.
Fixed bug where Pet object not properly exposed.

Fixed bug where Edit UI didn't change spec with character.
Fixed bug where Regen and Buff Effects couldn't be deleted.
Verified buff/regen implementation works as intended.
Added examples for Shaman class.

Added Pet object.

Updated for Battle for Azeroth.
Archived Files (3)
File Name
06-20-18 02:55 AM
06-18-18 02:21 PM
06-17-18 06:05 AM

There have been no comments posted to this file.
Be the first to add one.

Category Jump: