1. #1
    The Patient Extremity's Avatar
    Join Date
    Mar 2008
    Location
    Florida
    Posts
    233

    Lightbulb Destro? Use WeakAuras? Need to track "bits" and not complete embers?

    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!

  2. #2
    I'm not very well versed in this kind of thing, but it looks awesome! I'd really like your completed WeakAuras code, it looks like something I could use to help myself. Thank you.

  3. #3
    Mechagnome ZaneBusby's Avatar
    Join Date
    Nov 2009
    Location
    Auckland, New Zealand
    Posts
    500
    Or you could, you know, not waste your time in trying to modify a bunch of files and insert lines of code in specific places in said files, and instead just use one of the many, many, already functioning emberbit tracking WeakAuras, found all throughout the warlock forums. Especially found in the "Warlock Weak Auras" forum, here.

    Such an example would be this simple, easy one, that functions very well.

    Code:
    daK2daGikfxIsWOKk5usfnlPsDlvP2LQKFrHWWaCmqwMk6zqvttuUguSnkL(MkyCIKZjvX7GsLdsj0cHkpuOCrkjBuf6KsvzLuO6LqPQzcLs7Kk)ekzOuOSuPk9ustvLUkuk(kfIMlfs7f9xkvdwO6Wcwmf9yr1KvvxwXMLsFwiJweonrVwenBGUTQy3u1VHmCPy5k9CctxY1b12Lk8DkPgpLOZlsTEPQA)uWeIxQpu)u)8s1eT)zXfYt(xudvfbk)uTeR2wXu09odaGAoSOqp3XYIAlSpVKiFxDAW4gIBiUH4gIVtbVEdXf1k9rVAr7tO6Ygl8cQ1MUXgVSmgY6z7YMgWq6zTPBOSURfE60iGa6e7my8X)PAI2)SXqGOLx6GOdGUt6aOdpDa0LrhelQMH8Krlc2)JHarlV0bXJy6bFgeMSua4HoXNDifBFJjJUtEeJTyGWCWwaGZEoKDidGTVXylDz0bXIATYOOz5LALUzOkQqblOclg7niRNLMuNogFrfh86L(idXT6XCwbvyXyh2llIJkSF6y8f1aCHyr1mSXqGOLx6o5Xu9aaDI)8eiZ2uyoHoW23yWWIAWlFcLe55L6tq65LAZoIPOgaBsemgmOyyrTv6LIe8sTzhXuufnYnaYIf1eJmkrr3javqu4ZlvyXyphmieeh1fbo8s9bgSK8YIfvyXyx0m5ehvrZKZlvH0hbo0HNf1CWGqWlvH0hbounsl2l2IvmSNflQPXQTvmfDVXNcGQzip5FrnXqGOLx6GOdGUt6aOdpDa0LrhelQE4N7kJIMvqhevt0(NvL9p0LIQjA)ZsCu3jsI830nd1a8gmdlvrfYtkOjvt0(NfR2wXu0bHNQ8tfh86L(idXT6XCwb1ASSoI8fvCH(rOKbQFPObmK(oww9kJsuuTqo1W)lljYhaTxRmkAwbVSOwYNzpI8fvCH(rOKbQwl)vc6Gsbq9lfnGH09LJ8u7ZDTQ3JwmMvgTVyy5uJgmLGYkTDRdlikpPDt41l9rZJ5ScQH8sI8cEP2k9srcEP(r2fiy)NMSyXIQGk0RSxhEbbqTd6GYaayrc


    Edit: Didn't actually read your entire post at first, and only now just read the bottom bit about trying to create WeakAuras to tell people what their next upcoming spell cast should be, however this still seems really unnecessary in my eyes. Just download something like Bitten's SpellFlash and it does all the work.
    Last edited by ZaneBusby; 2013-09-28 at 08:00 AM.

  4. #4
    The Patient Extremity's Avatar
    Join Date
    Mar 2008
    Location
    Florida
    Posts
    233
    Quote Originally Posted by ZaneBusby View Post
    Or you could, you know, not waste your time in trying to modify a bunch of files and insert lines of code in specific places in said files, and instead just use one of the many, many, already functioning emberbit tracking WeakAuras, found all throughout the warlock forums. Especially found in the "Warlock Weak Auras" forum, here.

    Such an example would be this simple, easy one, that functions very well.

    Code:
    daK2daGikfxIsWOKk5usfnlPsDlvP2LQKFrHWWaCmqwMk6zqvttuUguSnkL(MkyCIKZjvX7GsLdsj0cHkpuOCrkjBuf6KsvzLuO6LqPQzcLs7Kk)ekzOuOSuPk9ustvLUkuk(kfIMlfs7f9xkvdwO6Wcwmf9yr1KvvxwXMLsFwiJweonrVwenBGUTQy3u1VHmCPy5k9CctxY1b12Lk8DkPgpLOZlsTEPQA)uWeIxQpu)u)8s1eT)zXfYt(xudvfbk)uTeR2wXu09odaGAoSOqp3XYIAlSpVKiFxDAW4gIBiUH4gIVtbVEdXf1k9rVAr7tO6Ygl8cQ1MUXgVSmgY6z7YMgWq6zTPBOSURfE60iGa6e7my8X)PAI2)SXqGOLx6GOdGUt6aOdpDa0LrhelQMH8Krlc2)JHarlV0bXJy6bFgeMSua4HoXNDifBFJjJUtEeJTyGWCWwaGZEoKDidGTVXylDz0bXIATYOOz5LALUzOkQqblOclg7niRNLMuNogFrfh86L(idXT6XCwbvyXyh2llIJkSF6y8f1aCHyr1mSXqGOLx6o5Xu9aaDI)8eiZ2uyoHoW23yWWIAWlFcLe55L6tq65LAZoIPOgaBsemgmOyyrTv6LIe8sTzhXuufnYnaYIf1eJmkrr3javqu4ZlvyXyphmieeh1fbo8s9bgSK8YIfvyXyx0m5ehvrZKZlvH0hbo0HNf1CWGqWlvH0hbounsl2l2IvmSNflQPXQTvmfDVXNcGQzip5FrnXqGOLx6GOdGUt6aOdpDa0LrhelQE4N7kJIMvqhevt0(NvL9p0LIQjA)ZsCu3jsI830nd1a8gmdlvrfYtkOjvt0(NfR2wXu0bHNQ8tfh86L(idXT6XCwb1ASSoI8fvCH(rOKbQFPObmK(oww9kJsuuTqo1W)lljYhaTxRmkAwbVSOwYNzpI8fvCH(rOKbQwl)vc6Gsbq9lfnGH09LJ8u7ZDTQ3JwmMvgTVyy5uJgmLGYkTDRdlikpPDt41l9rZJ5ScQH8sI8cEP2k9srcEP(r2fiy)NMSyXIQGk0RSxhEbbqTd6GYaayrc


    Edit: Didn't actually read your entire post at first, and only now just read the bottom bit about trying to create WeakAuras to tell people what their next upcoming spell cast should be, however this still seems really unnecessary in my eyes. Just download something like Bitten's SpellFlash and it does all the work.
    Or, you know, I could have not wanted to use those and wanted to provide an alternative to have it as a baseline function to be used in ANYTHING you wanted to create rather than premade ones provided by other people. I want the option to use bits baseline, period.

    Your reply is kinda... I don't know if it's trolling or uneducated or what. You clearly didn't read the post. Trying to modify a bunch of files and insert lines of code in specific places in said file? Or, you know, paste one time in one file in one place. Way to go, you're the champion of reading things on the internet. In case you actually read the last sentence I typed, you're not really. Thank you for the contribution, however, and I apologize for wanting to assist people who might want a baseline ability to use Ember Bits in their WeakAuras for their own creations.

    And Spell Flash doesn't allow the specific conditions that I want, that I stated in the post. It doesn't allow me to prioritize spells differently based on procs, uptimes, stat values and weights, etc.

  5. #5
    That was actually a very very very very interesting read that I'd almost say belongs as a cross-post to the UI forum because it's extremely useful information for anyone who has any experience with some coding and knowledge of WA. I'd love for the full string just on a personal note and if you'd allow/like I'd love to have it plugged into the WA thread!

    I think the thing I enjoy most about it is that you can essentially insert "x" class and modify it for yourself and your own rotation. Considering I play various alts and maybe I'm not the most adapt at remembering rotations for them and I'd rather just have a WA running to do the reminders than a separate addon I would definitely be interested in playing with it.

  6. #6
    Quote Originally Posted by Extremity View Post
    If any of you would like my completed WeakAuras code for this just ask. It's actually very helpful.
    Hi Extremity, as a altoholic your weakaura strings would be very helpful to me. I did try sending you a PM requesting them but I have not made enough posts here yet to use that option.

    Regards,
    John (Movster)

  7. #7
    Dreadlord dawawe's Avatar
    Join Date
    Jul 2009
    Location
    Atl, Ga
    Posts
    883
    Ths post really needs a stick. Even tho i dont use WA on my lock its helpful http://www.mmo-champion.com/threads/...ock-Weak-Auras
    Why read words when we can kill stuff the words tell us about?
    You have dreamed of death, you thought to escape it. Now, my little puppet, death is all you will ever know.
    NO ITEMS EEEVVVEEERRR!!!

  8. #8
    Quote Originally Posted by dawawe View Post
    Ths post really needs a stick. Even tho i dont use WA on my lock its helpful
    I have read that excellent warlock WA resource post dawawe but the reason I am interested in Extremity's weakaura strings is that he has set them up as a "rotation helper" that can be customised to other class's and as an altoholic (no main as my mood changes almost every day) this really appeals to me. Not just to be a lazy player but to help me get used to rotations.

    This reply has probably opened me up to some troll replies but hey ho.

  9. #9
    The Patient Extremity's Avatar
    Join Date
    Mar 2008
    Location
    Florida
    Posts
    233
    Quote Originally Posted by Movster View Post
    I have read that excellent warlock WA resource post dawawe but the reason I am interested in Extremity's weakaura strings is that he has set them up as a "rotation helper" that can be customised to other class's and as an altoholic (no main as my mood changes almost every day) this really appeals to me. Not just to be a lazy player but to help me get used to rotations.

    This reply has probably opened me up to some troll replies but hey ho.
    Maybe I typed wrong but I what I was setting up was for Warlocks; it can definitely be used for any other class but you'd pretty much be setting conditionals yourself. You can definitely use mine as an example if you want, but there are premade addons that are great for that. There really is no reason to use WeakAuras over those addons unless you're trying to have VERY specific conditions, ie, like how I wanted it to be very precisely based on my current embers. When the game comes back up (and I wake up!) I will post mine and you'll see what I mean about it being meant for a Warlock, but you could definitely use it as an example and modify it to your needs. The CLC addons are great for this, though, and I really suggest you give them a look. 9 times out of 10 that's all you need, especially for classes with a more standardized form of power generation (a Paladin isn't going to have a fraction of a Holy Power, etc).

    If you have a specific alt/class you lean towards playing the most I could definitely try to come up with some specific examples to show why this would or wouldn't be more beneficial for it. I can see Rogues, maybe. Or Hunters? Let me know.

    Edit: Here is a link to the Rotation Helper addon for a Retribution Paladin, for example. AFAIK this is the most commonly used addon. The all-in-one that can be used for any class is definitely a bit more complicated to set up but isn't anything impossible.

    http://www.curse.com/addons/wow/clcret
    Last edited by Extremity; 2013-10-29 at 12:46 PM. Reason: Added CLCRet URL.

  10. #10
    That's actually pretty impressive! Thanks

  11. #11
    Well at the moment I am actually in to my warlock, so Extremity could I please have your warlock weak auras?

  12. #12
    Quote Originally Posted by Movster View Post
    Well at the moment I am actually in to my warlock, so Extremity could I please have your warlock weak auras?
    Chances are everything you'd be looking for is here:

    http://www.mmo-champion.com/threads/...ock-Weak-Auras

    Outside of the advanced function of there being Emberbits (as the OP details how to get) and the lack of any kind of rotation helper everything you could probably ever think of is there.

  13. #13
    I give up!

    Extremity said in his initial post "If any of you would like my completed WeakAuras code for this just ask."

    I have asked twice as I am really interested in the rotation helper part of his warlock weak auras but it seems it's not to be.
    Last edited by Movster; 2013-11-28 at 07:19 PM.

  14. #14
    Legendary! Ryme's Avatar
    Join Date
    Jul 2009
    Location
    In a field, somewhere
    Posts
    6,741
    Holy mother of god thank you, I was trying to create horribly long custom functions trying to get the aura to reference itself and all other manner of disastrous solutions.
    I am the lucid dream
    Uulwi ifis halahs gag erh'ongg w'ssh


  15. #15
    This is really awesome actually, thank you for doing this!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •