1. #1

    WeakAuras questions

    I got inspiration from a fellow poster who linked this UI:

    http://www.youtube.com/watch?v=OaAFf...layer_embedded

    Specifically, setting an animation when Debuffs fall off the target. Here are my questions / requests in order of importance:

    1. I have my debuffs setup so they slide/fade to the left when they drop off the target. Makes it impossible for me to miss. But they play this animation even if I just change targets, or if my target dies. So if I am tab-dotting, this animation is actually really obnoxious, because every single time I change targets, I will see the slide. Is there a way to change this behavior so that, at a minimum, the animation is NOT triggered by changing targets??

    2. Does anyone know the LUA code this guy used to get his WA to show remaining stacks instead of remaining time? Much more helpful.

    3. Is there any way, or could a feature be added, so that the "end" animation begins x seconds prior to the aura ending? It would be cool if the slide could start before the debuff drops off.
    Last edited by ashin; 2011-09-23 at 12:56 PM.
    Ashin, Stormreaver
    South of Heaven

  2. #2
    Quote Originally Posted by ashin View Post
    I got inspiration from a fellow poster who linked this UI:

    http://www.youtube.com/watch?v=OaAFf...layer_embedded

    Specifically, setting an animation when Debuffs fall off the target. Here are my questions / requests in order of importance:

    1. I have my debuffs setup so they slide/fade to the left when they drop off the target. Makes it impossible for me to miss. But they play this animation even if I just change targets, or if my target dies. So if I am tab-dotting, this animation is actually really obnoxious, because every single time I change targets, I will see the slide. Is there a way to change this behavior so that, at a minimum, the animation is NOT triggered by changing targets??

    2. Does anyone know the LUA code this guy used to get his WA to show remaining stacks instead of remaining time? Much more helpful.

    3. Is there any way, or could a feature be added, so that the "end" animation begins x seconds prior to the aura ending? It would be cool if the slide could start before the debuff drops off.
    personally i dont know much of the coding that went into that, the person who worked on those exports for weakauras is Evn who is also a poster here on mmo-champion. You can probably look at the coding Evn [if you dont want the code posted i'll happily edit it out of the post] did for one of the dots and see if you can adapt it:

    Code:
    function ()
        
        local dot = {
            name = "Vampiric Touch",
            duration = 15.0,
            interval = 3.0,
        }
        
        
        WA_DOTS = WA_DOTS or {}
        WA_DOTS[dot.name] = WA_DOTS[dot.name] or {}
        local stats = WA_DOTS[dot.name][UnitGUID("target")] or {haste = 0}
        
        local _, _, _, _, _, duration, expires, _ = UnitAura("target", dot.name, nil, "PLAYER|HARMFUL")
        expires = expires or 0
        duration = duration or 0
        local time_left = expires - GetTime()
        local percent = floor((time_left / duration) * 100)
        
        -- calculate total number of ticks.
        local total_ticks =  dot.duration / (dot.interval / (1 + (stats.haste / 100)))
        
        if (floor(total_ticks * 10) - (10* floor(total_ticks)) >= 5) then
            total_ticks = ceil(total_ticks)
        else
            total_ticks = floor(total_ticks)
        end
        
        -- ticks_per_second=  (duration / ticks)
        local ticks_per_second = duration / total_ticks
        
        
        -- ticks_left = ceil(time_left / ticks_per_second)
        local ticks_left = ceil(time_left / ticks_per_second)
        if ticks_left < 0 then
            ticks_left = 0
        end
        
        
        return string.format("%d", ticks_left or 0)
        
    end
    Thanks Caiti for the Signature and Avatar

  3. #3
    Quote Originally Posted by ashin View Post
    1. I have my debuffs setup so they slide/fade to the left when they drop off the target. Makes it impossible for me to miss. But they play this animation even if I just change targets, or if my target dies. So if I am tab-dotting, this animation is actually really obnoxious, because every single time I change targets, I will see the slide. Is there a way to change this behavior so that, at a minimum, the animation is NOT triggered by changing targets??
    On the display group you could turn off the "animated expand and collapse" option and see if you like that better. I'm not really sure of a good way to have "sliding" happening when you're single-targeting and then "no sliding" when you're tab dotting.

    You could probably work out something with multiple dynamic groups (one iwth animation, one without) and some lua to figure out when you're tab dotting and toggle the appropriate group -- ultimately I think it would be a huge pain even if it was possible.

    You can probably look at the coding Evn [if you dont want the code posted i'll happily edit it out of the post] did for one of the dots and see if you can adapt it:
    Doesn't bother me in the slightest: any code I've written for my interface isn't exactly novel so there's reason to get upset trying to "protect" it. I owe more to the wow addon community than I could possibly repay so if this helps somebody then by all means repost.

    I'll be the first to point out that I'm worthless at Lua so if anybody can find improvements I'm all for it. I've been working on a slightly different implementation of the same idea for my frost DK. If it works out I'll "back port" it for dot classes.

    In this case you should just have to edit the first couple of lines of the function you linked.
    Change the spell name, the duration, and interval to appropriate values. Make sure you use the base (before haste) duration and interval--time between ticks--Most (all?) player cast DOTs tick once every three seconds so you should only need to change the spell name and duration.

    There's also a bit of lua in the trigger that actually records the dot display - you'll need to change the spell name in there as well.

    3. Is there any way, or could a feature be added, so that the "end" animation begins x seconds prior to the aura ending? It would be cool if the slide could start before the debuff drops off.
    The easiest way would be to adjust the triggers for each, change them from just "aura missing" to "aura has < 3s"
    Last edited by a21fa7c67f26f6d49a20c2c51; 2011-09-23 at 03:29 PM.

  4. #4
    Quote Originally Posted by evn View Post
    The easiest way would be to adjust the triggers for each, change them from just "aura missing" to "aura has < 3s"
    I didn't know I could do that. These icons come on when the aura is present, not when the aura is missing. I guess what you're suggesting is that I make a second, duplicate group which doesn't appear until the aura has less than 3 seconds, and then does its sliding? But then I'd temporarily see the icon twice (once over my target frame and one for the slider).

    Or did I misunderstand?

    Thank you both for your replies!
    Ashin, Stormreaver
    South of Heaven

  5. #5
    Deleted
    Just in case anyone stumbles upon this thread at any point, here is an updated reply:
    www . wowace . com /addons/weakauras/forum/26736-tracking-current-stats/

Posting Permissions

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