Adding Skills
Currently ST should support hunter and warrior skills. Shaman, Warlocks and Priests have rudimentary support of their level 60 skills, and talent detection may be a little off. To add skills for the other classes, please follow these guidelines.
The Files
Each class has its own file, called abilities-className.lua. These files contain the abilities that will be tracked. enemy-buffs.lua contains the skills of enemies that you want to track. More on that later.
Skill Structure
Each skill set is separated into sections: useActionSkills, aoeDebuffs, debuffs, castSpell, castDamageSpell, onEnemyParry, onEnemyDodge, onCrit, onParry, onDodge, onKill and special.
Skills basically are opened in each section with their name [BS["Name"] ] (the BS is the Ace2 Library Babble-Spell, which handles translations for those spells, if it's a new TBC skill that's not supported by BabbleSpell then use [L["name"]] and add it Locale-enUS.lua). There are several flags that each skill in useActionSkills can have:
enable - set this to true on all useActionSkills group - set this to "default", any skill with a duration needs a group duration - time in seconds the bar should last icon - icon path (ex: "Interface\\Icons\\Ability_Hunter_KillCommand") afflict - if the skill afflicts a debuff and has less than a 21 yard range, use this instead of a duration (value: BS["Affliction Name"]) aoeafflict - if the skill afflicts an aoe debuff than use this (value: BS["Affliction Name"]) stop - stop a bar (value: BS["Skill Name"]) start - start a new bar (value: BS["Skill name from special"]) target - will show the bar as "SkillName - Target" (value: true or nil) stopunit - this will stop bars with the name "SkillName - Target" rather than just "SkillName" (value: true or nil) refresh - refresh a bar with this name (value: BS["Skill Name"]) diminishing - set this if this skill has diminishing returns (value: true or nil)
Adding a skill
It's easiest to show how this is done by example. Let's take the hunter skill Scorpid Sting. You'd start by noting that Viper Sting has a 35 yard range by default, so affliction messages will not always get sent (they're capped at 20some odd yards) so you don't want to use the ["afflict"] modifier.
["useActionSkills"] = {
[BS["Viper Sting"] ] = {
["enable"] = true,
},
},
It has an 8 second duration, and the icon "Interface\\Icons\\Ability_Hunter_CriticalShot". So we'll add that information:
["useActionSkills"] = {
[BS["Viper Sting"] ] = {
["enable"] = true,
["duration"] = 8,
["icon"] = "Interface\\Icons\\Ability_Hunter_CriticalShot",
["group"] = "default",
},
},
You can set group to whatever you want, it'll be set to default the first time its run. You only need group and icon if you have a duration. To get the icon you can search Thottbot for the skill, then when it's displayed right click on the skill icon to the side and select "View Background Image" and then look at the URL, which will look something like this: http://i.thottbot.com/en/Interface/Icons/Ability_Hunter_BeastWithin.jpg. Take everything from Interface onwards and lop off the .jpg, then change the /'s to \\'s.
Viper Sting should be a per target skill. So we'll add the ["target"] modifier. It also should stop other stings, and when it does those stings are also targetting skills so we'll need the ["stopunit"] flag as well.
["useActionSkills"] = {
[BS["Viper Sting"] ] = {
["enable"] = true,
["duration"] = 8,
["icon"] = "Interface\\Icons\\Ability_Hunter_CriticalShot",
["group"] = "default",
["target"] = true,
["stop"] = {
BS["Serpent Sting"],
BS["Scorpid Sting"],
},
["stopunit"] = true,
},
},
Since it stops multiple skills, ["stop"] contains a small table (surrounded by { },). If there was only one skill, you'd just do ["stop"] = BS["SkillName"]. Now, when you use this skill it will add a bar (pending the success of the action) that lasts for 8 seconds, has the icon for Viper Sting on the side, and shows up as Viper Sting - Name.
Now let's add an afflict skill. I'll go with Wing Clip:
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
},
},
Wing Clip afflicts a debuff called Wing Clip (some skills will afflict things with names different from what they're called, Freezing Trap will inflict Freezing Trap Effect rather than just Freezing Trap). Since it's a melee skill, when the afflict first occurs it will always show up in the combat log.
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["afflict"] = BS["Wing Clip"],
},
},
Since we're using afflict, we need to move over to ["debuffs"] section now. Wing clip lasts for 10 seconds, and has a target.
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["afflict"] = BS["Wing Clip"],
},
},
["debuffs"] = {
[BS["Wing Clip"] ] = {
["duration"] = 10,
["icon"] = "Interface\\Icons\\Ability_Rogue_Trip",
["target"] = true,
["group"] = "default",
},
},
Notice, things in ["debuff"] do not have an enable flag. DO NOT ADD ONE or you'll pick up every Wing Clip that hits an enemy. It's flagged on and off through the useActionSkills portion. Everything with a duration must have a group, so that's there. Icon shows up as well with duration.
Now, there's a slight problem. You can spam Wing Clip. Lots, actually. Each time it refreshes Wing Clip's duration, but does not show an "SoandSo is afflicted by Wing Clip" for any of the refreshes. So we'll have to refresh it another way, through ["castDamageSpells"].
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["afflict"] = BS["Wing Clip"],
},
},
["debuffs"] = {
[BS["Wing Clip"] ] = {
["duration"] = 10,
["icon"] = "Interface\\Icons\\Ability_Rogue_Trip",
["target"] = true,
["group"] = "default",
},
},
["castDamageSpells"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
},
},
Adding it to castDamageSpells will have ST watch for "Your Wing Clip hits SoAndSo for SomeOdd damage." If you give it a duration, icon and group it'll add a bar every time it sees that line. But we don't want that, because sometimes mobs are immune to Wing Clip and you get the damage anyway. Instead, we'll use ["refresh"]. ["refresh"] will reset any bar with that name. Since this bar has a target, we need a ["target"] modifier again.
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["afflict"] = BS["Wing Clip"],
},
},
["debuffs"] = {
[BS["Wing Clip"] ] = {
["duration"] = 10,
["icon"] = "Interface\\Icons\\Ability_Rogue_Trip",
["target"] = true,
["group"] = "default",
},
},
["castDamageSpells"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["target"] = true,
["refresh"] = BS["Wing Clip"],
},
},
And there we go. But wait! Wing Clip has a talent that affects it. If you have Improved Wing Clip then it has a chance to inflict Improved Wing Clip. So we'll add that using the ["talent"] modifier.
["useActionSkills"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["afflict"] = BS["Wing Clip"],
["talent"] = {
["tab"] = 3,
["num"] = 6,
["afflict"] = BS["Improved Wing Clip"],
},
},
},
["debuffs"] = {
[BS["Wing Clip"] ] = {
["duration"] = 10,
["icon"] = "Interface\\Icons\\Ability_Rogue_Trip",
["target"] = true,
["group"] = "default",
},
},
["castDamageSpells"] = {
[BS["Wing Clip"] ] = {
["enable"] = true,
["target"] = true,
["refresh"] = BS["Wing Clip"],
},
},
["talent"] needs ["num"] and ["tab"]. ["tab"] should be set which tab the talent resides on. ["num"] is the talent number, counting from the top left horizontally. Talents can add afflictions and change the duration at the moment, as well as enable skills. For skills that have mutlipe talents affecting them you need to use the ["multiple"] talent option. For example, Shadow Word Pain looks like this:
["useActionSkills"] = {
[BS["Shadow Word: Pain"] ] = {
["enable"] = true,
["duration"] = 18,
["target"] = true,
["hostile"] = 1,
["group"] = "default",
["icon"] = "Interface\\Icons\\Spell_Shadow_ShadowWordPain",
["talent"] = {
["multiple"] = {
{
["tab"] = 3,
["num"] = 2,
["afflict"] = BS["Blackout"],
},
{
["tab"] = 3,
["num"] = 11,
["afflict"] = BS["Shadow Vulnerability"],
},
{
["tab"] = 3,
["num"] = 4,
["duration"] = 3,
},
},
},
["refresh"] = BS["Shadow Vulnerability"],
},
},
["debuffs"] = {
[BS["Shadow Vulnerability"] ] = {
["duration"] = 15,
["icon"] = "Interface\\Icons\\Spell_Shadow_BlackPlague",
["group"] = "default",
["target"] = true,
},
[BS["Blackout"] ] = {
["duration"] = 2,
["icon"] = "Interface\\Icons\\Spell_Shadow_GatherShadows",
["group"] = "default",
["target"] = true,
},
},
Because it has multiple talents affecting it it uses a table called ["multiple"]. Since it has a range greater than 20 some odd yards it has its own duration, and does not use afflict. However, with talents it sometimes afflicts Shadow Vulnerability and Blackout, so it adds those if you have the required talents. It also has a duration talent, the ["duration"] amount is added to the skill's normal duration per point you have invested in the talent. If it's a -duration talent like the one for Fire Nova Totem, just use a -duration (-1 for example).
Other Skill Types
Totems
Totems are special. A whole bunch of code is devoted specifically to making totems work, especially the silliness that goes on with Grounding Totem. Totems are tossed into the ["castSpells"] category, because they show up in the combat log as "You cast SomeTotem." Let's take a look at a totem entry:
["castSpells"] = {
[BS["Fire Resistance Totem"] ] = {
["icon"] = "Interface\\Icons\\Spell_FireResistanceTotem_01",
["duration"] = 120,
["canDie"] = BS["Fire Resistance Totem"],
["enable"] = true,
["group"] = "default",
["stop"] = {
BS["Healing Stream Totem"],
BS["Mana Spring Totem"],
BS["Poison Cleansing Totem"],
BS["Disease Cleansing Totem"],
},
},
},
["canDie"] = {
[BS["Fire Resistance Totem"] ] = {
["aura"] = "Interface\\Icons\\Spell_FireResistanceTotem_01",
["stop"] = BS["Fire Resistance Totem"],
},
},
Totems each need an entry in ["canDie"]. If the totem gives off an aura, then add the aura's icon to the ["aura"] field for better detection of totem death. It detects totem death when a totem of that name takes damage. If it doesn't give off an aura it will detect deaths of other friendly totems of the same name as your totem dying, but there's really no way around that.
AOE Debuffs
AOE Debuffs work just like regular debuffs, except that they're flagged with ["aoeafflict"] rather than just ["afflict"] and are put in ["aoeDebuffs"] rather than ["debuffs"]. Otherwise they work exactly the same. This is also used for delayed action skills like Intimidation, where your pet afflicts sometime after 15 seconds (if this is the case, put a ["delay"] attribute with the time in seconds as the value. If it has charges, use the ["charges"] flag. Here's an example:
["useActionSkills"] = {
[BS["Psychic Scream"] ] = {
["aoeafflict"] = BS["Psychic Scream"],
["enable"] = true,
["talent"] = {
["multiple"] = {
{
["tab"] = 3,
["num"] = 2,
["afflict"] = BS["Blackout"],
},
{
["tab"] = 3,
["num"] = 11,
["afflict"] = BS["Shadow Vulnerability"],
},
},
},
["refresh"] = BS["Shadow Vulnerability"],
},
},
["aoeDebuffs"] = {
[BS["Psychic Scream"] ] = {
["duration"] = 9,
["charges"] = 5,
["icon"] = "Interface\\Icons\\Spell_Shadow_PsychicScream",
["group"] = "default",
},
},
That's all there is too it really. I'm sure I forgot some stuff, but for the most part, that's it.