I needed to track fractions of embers in WeakAuras, but unfortunately the only tracking option (Trigger Tab -> Status -> Burning Embers) only tracks COMPLETE embers. You can't put "0.9", it wont work. It's 1, 2, 3, or 4.
If you'd like to be able to track fractions of an ember, usually referred to as an ember "bit", there's a pretty easy way to simply add another value to the dropdown rather than have to modify the existing Embers entry. Basically, you will have "Burning Embers" and "Burning Ember Bits" to select from. I'm sure the author will add this soon as it's insanely easy, but if you *must* have it now, here you go.
I apologize if this is in the wrong place. I debated whether it should go here or UI but I felt since it was extremely specific to not only a certain class but a certain spec, I figured this would be best but I have a feeling that because I posted here it'll be moved there, but if I'd posted there it'd be moved here
-) Browse to your WeakAuras folder in your WoW addon directory. - Generally C:\Program Files (x86)\World of Warcraft\Interface\AddOns\WeakAuras
-) Open "Prototypes.lua" in your favorite text editor. I'm a programmer so I have specific programs for this, but notepad is just fine. If you've never opened a lua file before you might have to select a program to use. Just pick notepad and check the box to always open lua files with that program.
-) Do a "find in document" (usually CTRL+F) for the text in the code snippet below. I know we're not editing Shadow Orbs, but it's the easiest way to find a spot RIGHT AFTER the burning embers code snippet.
Code:
["Shadow Orbs"] = {
If you've done this right, you should be right where the Burning Ember bit ends and the Shadow Orb bit begins. Right ABOVE that line we've just searched for, put a few empty lines (hit enter a few times). You should now have some empty space between the Shadow Orbs line; above these empty spaces, the first line of content should be a bracket and a comma - "}," - In case you're not sure, once you've added the spaces it should look like this and be between the lines of code you see here (obviously don't put the "spaces start/end here" lines in the file!):
Code:
automatic = true
},
[-------- SPACES SHOULD START HERE, BUT DON'T ADD THIS LINE TO THE FILE! --------]
[-------- SPACES SHOULD END HERE, BUT DON'T ADD THIS LINE TO THE FILE! --------]
["Shadow Orbs"] = {
type = "status",
In that empty space, paste the following code:
Code:
["Burning Ember Bits"] = {
type = "status",
events = {
"UNIT_POWER",
"PLAYER_TARGET_CHANGED",
"PLAYER_FOCUS_CHANGED"
},
force_events = {
"player",
"target",
"focus",
"pet"
},
name = L["Burning Ember Bits"],
init = function(trigger)
trigger.unit = trigger.unit or "player";
local ret = [[
local unit = unit or '%s';
local concernedUnit = '%s';
]];
return ret:format(trigger.unit, trigger.unit);
end,
args = {
{
name = "unit",
required = true,
display = L["Unit"],
type = "unit",
init = "arg",
values = "actual_unit_types_with_specific"
},
{
name = "power",
display = L["Burning Ember Bits"],
type = "number",
init = "UnitPower(unit, SPELL_POWER_BURNING_EMBERS, true)"
},
{
hidden = true,
test = "UnitExists(concernedUnit)"
}
},
durationFunc = function(trigger)
return UnitPower(trigger.unit, SPELL_POWER_BURNING_EMBERS, true), math.max(1, UnitPowerMax(trigger.unit, SPELL_POWER_BURNING_EMBERS, true)), true;
end,
stacksFunc = function(trigger)
return UnitPower(trigger.unit, SPELL_POWER_BURNING_EMBERS, true);
end,
automatic = true
},
Here's a brief explanation of what we're adding - also, anybody even slightly versed in code will be able to vouch this is an extremely minor change, as I'm sure inexperienced people will be worried about pasting something into a game file that they found in a forum.
The "UnitPower" lua function is used to return "power" values, power being a term relative to the class you are playing. A rogue's "power" is energy, while we have two as Destro; mana and burning embers. The function simply returns our CURRENT ember value, 1 through 4. However, WeakAuras does not send the proper flag to say "Hey LUA, send me the precise value including anything after the decimal".
What we've done is simply added a "true" clause to the UnitPower function. We've simply changed...
Code:
UnitPower(trigger.unit, SPELL_POWER_BURNING_EMBERS);
to...
Code:
UnitPower(trigger.unit, SPELL_POWER_BURNING_EMBERS, true);
Feel free to look through the code in the thread and compare it to the section directly ABOVE where I've instructed you to paste. You'll see that all that's been done is we've added the "true" flag to one or two UnitPower calls. So why the need to add an entirely new snippet, why not just edit the existing Burning Ember section and call it a day? Well, you absolutely can! I just prefer having "Burning Ember" for full embers and "Burning Ember Bits" for partials. Yes, you could just have partials and use "10" instead of "1", but I have a ton of things in WeakAuras I'd prefer not to have to edit.
Once you do this, save the file, restart WoW, and you'll now see "Burning Ember Bits" in your available options for Triggers -> Status! You can add pretty much anything you want by playing around with this file if you do a little research on the LUA, too! Don't be afraid to break things, simply back up the original file and take baby steps. If you're an experienced programmer this will be absolutely nothing to you, but if you're new to this sort of thing it's a fun way to make your own tweaks; why wait for a new version when you can make basic updates yourself?
You can add the code snippet I provided pretty much anywhere in that section of the file as long as it's not inside another array, ie, you can put it between any two other options. I simply instruct you to put it where I said so it's in the proper spot in the dropdown (it does not automatically order them, it's ordered by the order of values in the array). - The basic rule is "if you know what I'm talking about you're fine, but if you're hesitant or new please just put the code where I said".
Curious why I needed this? I'm making a "rotation helper" for some friends since I couldn't find any viable addon alternatives. If you have a Paladin you might be familiar with "CLCRet" or "CLCProt", or maybe you know about it because you use CLCInfo or any of the other class alternatives. Basically, it simply shows an icon of the next spell you should cast and any helpful cooldowns' statuses too. I built one using WeakAuras for my friends but realized it wasn't quite as useful as it was showing it in real time, not ahead of time. Basically, their casts were jumping around because it wasn't giving them notice ahead of time but RIGHT when something should be casted (basically, it wasn't saying "Your next spell should be a chaos bolt", it wasn't predictive, it would only say it as soon as you should perform the action instead of ahead of time). Because of this, I wanted it to trigger Chaos Bolt or Shadowburn at 0.9 embers instead of 1, so that they'd know it should be the NEXT cast while they're still one cast away.
If any of you would like my completed WeakAuras code for this just ask. It's actually very helpful. You can set it up with your own conditionals and unlike CLC it is COMPLETELY customizable. You can have it tell you to Chaos Bolt next only when you have a certain amount of haste. You can avoid using it with Backdraft procs. I have spell priorities, but they change based on trinket procs. It's very useful, and now it's predictive meaning you can always maintain a *perfect* rotation. Once you're familiar with the class we all know you don't need this, but while you're still learning or are still trying to squeeze out every drop of DPS and learn your rotation, it's a godsend. Just lemme know if you'd like it! <3
If you have any questions, let me know! If you want something else added to WeakAuras and don't want to wait, I'm happy to help! With small changes we can add pretty much any functionality that this amazing addon doesn't already have. Good luck, and happy editing!