Download
(285Kb)
Download
Updated: 12-21-22 03:43 AM
Pictures
File Info
Compatibility:
Dragonflight (10.0.2)
Updated:12-21-22 03:43 AM
Created:06-12-18 02:08 PM
Downloads:1,182
Favorites:5
MD5:

Prediction

Version: 10.0.2v2022.12.21
by: Chosenfish [More]

This has been updated to [nominally] work in Dragonflight. No rotations have been entered, and hasn't been fully tested yet. Promised fixes were lost sometime in the last 4 years :P

GitHub project here

Overview

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.



Options


/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]
on|off
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.
[+-]spells
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).
[+-]prediction
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.



The API

Code:
        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:
Code:
         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.



Examples

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)



TODO

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].

8.0.1_201806250000:
[?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.


8.0.1_201806202034:
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


8.0.1_201806180816:
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.

8.0.1_201806172355:
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.

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

8.0.1_201806142311:
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.

8.0.1_201806141550:
Added Pet object.

8.0.1_201806102200:
Updated for Battle for Azeroth.
Post A Reply Comment Options
Unread 12-10-20, 04:58 PM  
Chosenfish
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 1
Uploads: 1
Originally Posted by soyolas
Did this addon ever took off?
It's had less than 1000 downloads, so safe to say, no. I also stopped playing WoW shortly after BfA released, so never uploaded the changes I'd made to the addon at that point (as mentioned in the TODO list).

At this stage, a small API change by Blizzard that means it won't work out-of-the-box (A quick couple of edits will fix that though, so I may do that).
Report comment to moderator  
Reply With Quote
Unread 12-08-20, 10:05 AM  
soyolas
A Kobold Labourer

Forum posts: 0
File comments: 141
Uploads: 0
Did this addon ever took off?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: