d87 edited this page Dec 8, 2016 · 24 revisions
Clone this wiki locally

NugRunningUserConfig allows you to have your own portable configuration, without skipping default config updates.
Use NugRunning/config.lua as reference and place your changes into NugRunningUserConfig/userconfig.lua.

DL: WoWInterface #Timer types# Spell - for usual buffs/debuffs
Cooldown - for your character ability cooldowns
Cast - castbar timer
Activation - timers based on "Spell Activation Overlay",
it's that shiny border on actionbars, that tells you what to do
EventTimer - for internal cooldowns and combat log events in general

To add a new spell, you need to call a function corresponding to timer type.

Spell(id, options)           Args:
Cooldown(id, options)        id - spellID number, for Spell you also can use table with multiple IDs 
Activation(id, options)      options - table with timer properties, if nil timer will be disabled [UNUSED]
Cast(id, options)



name            - text on the progress bar. (Note: if you want localized spell names, use /nrun localnames)
short           - short name for spell
color           - RGB table of for bar color
color2          - if present, timer color shifts from "color" to "color2" as it's progressing
timeless        - infinite timer
scale           - vertical scale of timer, if it's below 0.7 then text labels become hidden
scale_until     - until duration is less than X, timer is minimized
shine           - play shine animation when timer is created
shinerefresh    - shine when refreshed
tick            - tick interval, negative interval ignores haste. Enables dot ticks.
                  Don't forget to remove "recast_mark" property when adding ticks.
tickshine       - play shine animation when tick is expired.
overlay         - table containing {startTime, endTime[, alpha, isHasteReduced]}, creates shadowed area to indicate stuff.
                  Special values: "tick", "tickend", "end", "gcd"
recast_mark     - place mark on a timer, that will shine when passed through,
                  indicating that you can start recsating.
                  e.g., 3.5 for haunt is roughly equals to cast time + travel time at 30yd range.
glowtime        - when to start glowing
glowghost       - glow when in ghost state
glowstack       - glow if amount of applications >= X
arrow           - color of the stripe on the left side of timer frame
glow2time       - time when it starts to spin
effect          - 3d effect when timer is present
ghosteffect     - 3d effect when timer turns to ghost

fixedlen        - allows to align several spells to single fading speed, by forcing max time to X
scale           - bar vertical scale specific to current timer between 0 and 1.
priority        - customization of timer order. Default priority is 0,
                  timers with equal priority sorted by expiration time.
                  You can also use negative priorities.
specmask        - hex number indicating in what specs timer should appear in,
                  e.g. 0x0F00 for only THIRD druid spec from the standard
                  spec order (Balance, Feral, Guardian, Restoration).
                  0x0FF = first and second specs.

Spell properties

duration        - timer duration, generally used only when precise info cannot be obtained
                  from the game.
maxtimers       - max amount of timers that can exist
pvpduration     - same as duration, but for pvp targets (pets, players)
singleTarget    - timer is only displayed if it's on current target or you have no target.
                  More like UNIT_AURA addons. Used to prevent spam.
affiliation     - <nil|"raid"|"any"> - allows events from party/raid members or from outsiders.
multiTarget     - for aoe auras, like thunderclap or shadowfury.
                  Condensing timers from multiple targets into one. Used to prevent spam.
nameplates      - mark spell to be used on nameplates
charged         - (unstable) transforms timer into stack counter.
maxcharge       - max amount of possible applications of spell, when it's charged.

Cooldown properties

hide_until      - don't start timer until X seconds left

Activation properties

showid          - use other spellID for timer icon and name
for_cd          - don't create a new timer, but merge with existing cooldown timer for the same spell.
                  e.g. Raging Blow cooldown timer will become transparent when enrage fades halfway through.

EventTimer properties

event           - event type of COMBAT_LOG_EVENT_UNFILTERED
spellID         - spell id for event
affiliation     - <nil|"raid"|"any"> - allows events from party/raid members or from outsiders.

Modifying existing configuration

With ModSpell, ModCooldown, ModActivation functions you can change properties of spells existing in default configuration, without completely overwriting them.
They use the same format as "Add" functions, but instead of supplying full list of properties, you only need to fill in those you want to override.

ModSpell(348, { color = colors.WOO }) -- will change only Immolate color

Removing spells

Spell(id, nil)

Figuring out spell ID

You can just find your spell on wowhead, and 12292 in would be it's id in wow too.

In-game methods:

  1. /nrun debug - display combat log events in chat

  2. Macro to list ids of all current player auras:

    /nrun listauras player


/nrun listauras target
  1. Macro to get id of spell under your mouse in spellbook:

     /script local f = GetMouseFocus(); local sn = f.SpellName; if sn then local t,id = GetSpellBookItemInfo(sn:GetText()); print (sn,id) end

Internal cooldowns

To create a timer for internal cooldown, you need to create an EventTimer for it's proc/use spell.

EventTimer({ event = "SPELL_AURA_APPLIED", spellID = 101291, color = colors.WOO, duration = 45 })

For event timers duration property is really important, because unlike other timer types, here it's always used, as there's no way to get it from wow itself.


Defining new colors:

colors["CUSTOM1"] = { .5, .5, 1 }

If you don't want colored bars, use this:

colors["DEFAULT_BUFF"] = { .4, .4, .4 }
colors["DEFAULT_DEBUFF"] = { .4, .4, .4 }

Font & texture

NugRunningConfig.width = 200       -- if w & h are present, they will override values from saved variables
NugRunningConfig.height = 20

NugRunningConfig.texture = "Interface\\AddOns\\NugRunning\\statusbar"
NugRunningConfig.nameFont = { font = "Interface\\AddOns\\yourfont.ttf", size = 12 }
NugRunningConfig.timeFont = { font = "Interface\\AddOns\\yourfont.ttf", size = 10 }
NugRunningConfig.stackFont = { font = "Fonts\\FRIZQT__.TTF", size = 10 }