Skip to content

NugRunningUserConfig

d87 edited this page Oct 12, 2012 · 27 revisions

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 NugRunningConfig/userconfig.lua.

DL: WoWInterface #Timer types# Spell - for usual buffs/debuffs
Cooldown - for your character ability cooldowns
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
EventTimer(options)  

Properties

Common

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
timeless        - infinite timer
shine           - play shine animation when timer is created
shinerefresh    - shine when refreshed
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
fixedlen        - allows to align several spells to single fading speed, by forcing max time to X
anySource       - allows events coming from other players
priority        - customization of timer order. Default priority is 0,
                  timers with equal priority sorted by expiration time.
                  You can also use negative priorities.

Spell properties

duration        - timer duration, generally used only when precise info cannot be obtained
                  from the game.
pvpduration     - same as duration, but for pvp targets (pets, players)
multiTarget     - for aoe auras, like thunderclap or shadowfury.
                      Condensing timers from multiple targets into one.
shout           - while being multitarget spell, ignore everyone except palyer character.
charged         - (unstable) transforms timer into stack counter.
maxcharge       - max amount of possible applications of spell, when it's charged.

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
anySource       - allows events coming from other players

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.

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

Removing spells

Single
Spell(id, nil)
All
helpers.RemoveAll()  

Figuring out spell ID

You can just find your spell on wowhead, and 12292 in http://www.wowhead.com/spell=12292 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 your buffs:

     /script for i=1, 100 do local name, _,_,_,_,_,_,_,_,_, spellID = UnitBuff("player", i); if not name then break end; print( name, spellID) end
    

Target debuffs:

    /script for i=1, 100 do local name, _,_,_,_,_,_,_,_,_, spellID = UnitDebuff("target", i); if not name then break end; print( name, spellID) end
  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.

Colors

Defining new colors:

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

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

helpers.WipeColors()
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 }
Clone this wiki locally