Register

## WeakAuras - Bleed Ratios

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

inferiorlol wrote:I did something along that lines with your WA bleed code as base.

I just added a new variable:

Code: Select all
WA_stats_mult = AP*Mastery*DamageMult*CritEffMult

to the Feral Stat Logic aura, and then I made a new weakaura to snapshot this to another variable at a button press (I chose Aquatic Form since I figure I would never accidentally use that in a raid).

I then make a new aura to return the ratio between these two variables. As of right now you need to have a target with the correct level you want to snapshot against since your code uses that to calculate the CrittEffMult. Very basic but it works pretty well for me.

Some remarks:

If you want the value to be saved between sessions, you can hijack the WeakAuras SavedVariables by naming your variable as an element of the WeakAurasSaved table, something like WeakAurasSaved["stats_mult"].

If you don't want to trigger on a spellcast, you could just make a macro to execute the relevant code (with /run) -- something like

/run WA_calcStats_feral(); WeakAurasSaved["stats_mult"] = WA_stats_mult

Posts: 35
Joined: Sat Mar 30, 2013 11:12 am

### Re: WeakAuras - Bleed Ratios

The "new" weak aura (been there for quite some time I see) that Stenhaldi made, still seems to bug with the 4 set bonus.
Applying rip with feral fury and I get the value of 165.

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

I can't reproduce that issue. To be clear, you're using the version from this post?

Also, did you disable or remove the old version? They use the same global variable names, so if you are running both, it will result in unexpected behavior.

Honored
Posts: 70
Joined: Tue Sep 18, 2012 4:01 pm

### Re: WeakAuras - Bleed Ratios

Is the last pastebin link the last version?
And is it compatible with WA 2.0?
I've installed it, but the current amount of CP is not taken into account when calculating the ratio: I apply a 5 CP rip, generate a single combo point, hit TF and it says "114" which is obviously wrong. Looking at the code it looks like it's reading the CP value, but for some reason it doesn't work right....

EDIT: ok it looks like it's using the Rip5 value in the ratio, so the effect of CPs does not appear. I changed the variable name to use the Rip (instead of Rip5) and it's ok.

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

That's intended. The display assumes you intend to cast rip at 5 combo points. That is, the "tick damage your rip would do if you were to cast it" (i.e. the divisor of the "bleed ratio") assumes 5 combo points.

It's just the "tick damage of the rip that you already cast" (the dividend of the "bleed ratio") that actually takes into account the number of combo points you cast at.

I did this because I think it's the most useful way to deal with combo points. Obviously if I actually did cast a rip at low CP, I want that to be reflected in the display. But when considering how much damage my rip would do if I were to recast it, I want the display to reflect what would happen if I cast a 5-CP rip. It's better for planning, since I typically cast rips at 5 CP -- and if I do intend to cast a low-CP rip, it's easy enough to just do some mental arithmetic.

But yes, as you observed, it's easy to change this behavior if you don't like it: just change WA_stats_RipTick5 to WA_stats_RipTick in the Rip Ratio custom text.

Posts: 35
Joined: Sat Mar 30, 2013 11:12 am

### Re: WeakAuras - Bleed Ratios

Stenhaldi wrote:I can't reproduce that issue. To be clear, you're using the version from this post?

Also, did you disable or remove the old version? They use the same global variable names, so if you are running both, it will result in unexpected behavior.

Yes I am using that one. They shouldn't be conflicting with each other (disabled afaik), but I'll make sure/try again when I get home.

Honored
Posts: 70
Joined: Tue Sep 18, 2012 4:01 pm

### Re: WeakAuras - Bleed Ratios

Stenhaldi wrote:That's intended. The display assumes you intend to cast rip at 5 combo points. That is, the "tick damage your rip would do if you were to cast it" (i.e. the divisor of the "bleed ratio") assumes 5 combo points.

Ok, for me it's the opposite, I prefer to know what happens if I hit rip now, since by the time I get to 5CP it could be that some auras are down. It also tells me when it's worth to cast a 4-CP rip. Anyway it's good that it's easy to customize

Honored
Posts: 62
Joined: Fri May 28, 2010 5:44 am

### Re: WeakAuras - Bleed Ratios

After importing the string, from the post you mentioned above, I kept getting this LUA error.

Code: Select all
Date: 2013-10-27 13:39:47ID: 10Error occured in: GlobalCount: 977Message: [string "return function()..."] line 2:   attempt to call global 'WA_calcStats_feral' (a nil value)Debug:   [C]: WA_calcStats_feral()   [string "return function()..."]:2:      [string "return function()..."]:1   WeakAuras\RegionTypes\text.lua:91: UpdateCustomText()   WeakAuras\WeakAuras.lua:4931:      WeakAuras\WeakAuras.lua:4927Locals:AddOns:

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

That's an error that should only come up in some pathological cases:
1) you import the script for the first time and then view the Weakauras options before entering combat, reloading UI, or changing zone
2) you log in as a non-feral spec and then view the Weakauras options.

I just updated the script (same link) to fix it.

Posts: 2
Joined: Thu Oct 24, 2013 12:56 pm

### Re: WeakAuras - Bleed Ratios

Hello everyone,

my first post and i want to use it for a big thanks for this Code. It increased my overall damage alot and gave me some spare time to actually watch my surroundings more. My biggest issue was/is to program with lua. I've learned how to write basic codes but i lack in syntax for lua. Do you have a good tutorial, especially for WoW? Because i wanted to make one for my Warlock and dont want to use more Addons.

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

I'm not familiar with any tutorials, sorry. I just kind of taught myself by writing and modifying scripts and looking up syntax as I needed it.

Posts: 1
Joined: Sun Dec 22, 2013 12:03 am

### Re: WeakAuras - Bleed Ratios

Hi,
I've been trying to change your setup in a way that the numbers display on class timers and change the color of the progress bars but I have not been successful. How could I go about doing that? I would appreciate any help.

Posts: 1
Joined: Fri Dec 27, 2013 9:14 pm

### Re: WeakAuras - Bleed Ratios

This looks awesome. How do I use it in TellMeWhen? I'm going to start looking into that now, but any pointers would be great. I'm a programmer, but don't know any Lua.

Cheers.

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

Deducer wrote:Hi,
I've been trying to change your setup in a way that the numbers display on class timers and change the color of the progress bars but I have not been successful. How could I go about doing that? I would appreciate any help.

ClassTimer the addon? I'm afraid I'm not familiar with it, but unless it allows custom code, that's likely not something you can do conveniently.

Changing the color of a bar is certainly something you can do in WeakAuras, though. Just set that bar to use a custom color function (animations tab, main, custom type, color, custom function) that looks something like
Spoiler: show
Code: Select all
function()    Rake_sDamage = Rake_sDamage or {}    if Rake_sDamage[UnitGUID("target")] then        local RatioPercent = (WA_stats_RakeTick / Rake_sDamage[UnitGUID("target")]) * 100        if RatioPercent >= 110 then            return 0,1,0,1        elseif RatioPercent <= 90 then            return 1,0,0,1        else            return .5,.5,.5,1        end    else return .5,.5,.5,1    endend
(a custom color function should return red, green, blue, opacity in the range [0,1])

Deimhne wrote:This looks awesome. How do I use it in TellMeWhen? I'm going to start looking into that now, but any pointers would be great. I'm a programmer, but don't know any Lua.

Cheers.

Likewise, I'm not familiar with TellMeWhen, but unless it allows custom code, that's probably not something you can do conveniently.

Posts: 1
Joined: Sun Jan 19, 2014 6:48 pm

### Re: WeakAuras - Bleed Ratios

If i open Weak Auras or start combat i always get three lua error:

Message: [string "return function()..."]:3: attempt to index global 'Rake_sDamage' (a number value)
Time: 01/19/14 23:47:44
Count: 2823
Stack: [C]: ?
[string "return function()..."]:3: in function <[string "return function()..."]:1>
Interface\AddOns\WeakAuras\RegionTypes\text.lua:91: in function UpdateCustomText'

Locals:

Message: [string "return --[[ RAKE RATIO ]]--..."]:10: attempt to perform arithmetic on local 'Rake_tDuration' (a nil value)
Time: 01/19/14 23:38:59
Count: 988
Stack: [C]: ?
[string "return --[[ RAKE RATIO ]]--..."]:10: in function <[string "return --[[ RAKE RATIO ]]--..."]:2>

Locals:

Message: [string "return function (event, ...)..."]:28: attempt to index global 'Rake_sDamage' (a number value)
Time: 01/19/14 23:47:32
Count: 1
Stack: [C]: ?
[string "return function (event, ...)..."]:28: in function trigger'

Locals:

What is causing these errors?

Revered
Posts: 305
Joined: Wed Jun 29, 2011 4:49 am

### Re: WeakAuras - Bleed Ratios

It looks like you are running Collie's original version of the script alongside my version, and this is causing the variable names to conflict. Make sure that you have only one version of the script enabled.

Posts: 1
Joined: Sun Feb 02, 2014 8:17 am

### Re: WeakAuras - Bleed Ratios

Hi, thank you for your WA, it's working fine, I just have a little issue with DoC, I'm using the french client, and it seems the DoC's multiplier isn't working (if I apply rake without DoC, then I cast HT, I still have 100 rake's score on my screen).
I went into the code and changed
"local DoCSID = select(11, UnitAura("player", "Dream of Cenarius"))"
to
"local DoCSID = select(11, UnitAura("player", "Rêve de Cénarius"))"
but it still doesn't work.
I don't know if I should change something else in the code, I'm sure of the spelling (I checked multiple times). Do you have any idea where the problem comes from ?

Thank you for your time !

EDIT : I re-launched the game and it seems to work, false alarm ! Thank you very much for your WA !

Previous