Is this macro correct?

Warning: Theorycraft inside.

Moderators: Fridmarr, Worldie, Aergis, theckhd

Re: Is this macro correct?

Postby Xayton » Fri May 06, 2011 12:33 pm

RedAces wrote:hey,

apparantly UnitStat returns
current, current, positive, negative - why I'm not sure!

Both macros corrected:
Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", ((a+549)*1.05-p+n)*0.58)-(UnitStat("player",1)*0.0125+144.1125))


Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("For perfect avoidance you need this much more parry rating: "..string.format("%.2f", ((a+549)*1.05-p+n)*0.58+GetCombatRating(3))-(UnitStat("player",1)*0.0125+144.1125+GetCombatRating(4)))


Bye, RedAces.


The only thing that I notice is the macros produce two different numbers. The top one is giving me 216, while the bottom one is giving me 124. The bottom one sounds more accurate to me, just based on what my stats look like with buffs.

Edit:
Actually all 3 macros you came up with Red give me different numbers.
Xayton <Notéd> Llane
I'll try being nicer if you'll try being smarter.
User avatar
Xayton
 
Posts: 45
Joined: Wed May 13, 2009 5:25 am
Location: Sanity

Re: Is this macro correct?

Postby Celyn » Fri May 06, 2011 2:34 pm

Cavalorn wrote:Got a few strange values yesterday >300 Rating where ~16 should be the right answer for my gear.
Taking off the agi-items reduced the rating needed to ~100 instead of a negative value due to dropping dodge under parry with raidbuffs.
Need some more testing this weekend.


Unless im misunderstanding what you are saying it should never give negative values at our current gear levels. The macro only states how much more parry than dodge rating you need ignoring your current dodge and parry rating. Its saying "you need to keep parry this much higher than dodge" rather than "you need to add this much more parry to reach perfect raid buffed avoidance."

Its not how much you need to adjust your current dodge/parry amounts, but the absolute difference you need to have between the two. For instance with my agility ring it tells me that i need 302 more parry than dodge. Switching out my agility ring for str ring it says i need 185.

Like RedAces said you would need a huge amount of str before you would get a negative value.

I hope that made sense >.<
RedAces wrote:hey,

apparantly UnitStat returns
current, current, positive, negative - why I'm not sure!

Both macros corrected:
Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", ((a+549)*1.05-p+n)*0.58)-(UnitStat("player",1)*0.0125+144.1125))


Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("For perfect avoidance you need this much more parry rating: "..string.format("%.2f", ((a+549)*1.05-p+n)*0.58+GetCombatRating(3))-(UnitStat("player",1)*0.0125+144.1125+GetCombatRating(4)))


Bye, RedAces.

Yeah. I found that out in the link i gave that it does NOT return the base value but rather current, current. However, for the base using those numbers you would need (a-p+n) using your format. Also thanks for shortening the str part of the formula. I was copying my formula from the first post (which i keep it in that form so people can see how its derived) and did not even think to simplify it to (UnitStat("player",1)*0.0125+144.1125)! That saves a bunch of characters.

So the final form of my paladin macro (ignoring my dk one) should be:
Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", ((a+549)*1.05-(a-p+n))*0.58)-(UnitStat("player",1)*0.0125+144.1125))


Red aces macro that takes your current combat ratings should be:
Code: Select all
/run local _,a,p,n=UnitStat("player",2) print("For perfect avoidance you need this much more parry rating: "..string.format("%.2f", ((a+549)*1.05-(a-p+n))*0.58+GetCombatRating(3))-(UnitStat("player",1)*0.0125+144.1125+GetCombatRating(4)))


Ill check this in game in a moment.

Edit: Just checked in game and (p+n) gives your agility from gear and NOT base agility. It needs to be (a-p) which gives me the correct value for my base agility of 99.

With the correction in it, the second macro gives me -13 which is exactly how much parry i need to lose to be consistent with the first macro.
"When I was ten, I read fairy tales in secret and would have been ashamed if I had been found doing so. Now that I am fifty I read them openly. When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -C.S. Lewis
User avatar
Celyn
 
Posts: 28
Joined: Mon Feb 22, 2010 12:50 pm

Re: Is this macro correct?

Postby RedAces » Fri May 06, 2011 4:23 pm

hey,

do a /run print(UnitStat("player",1)) to see all results of UnitStats, you'll see that p is your (positive) bonus from gear and buffs and n your negative bonus from gear (?) and buffs/debuffs (think of the -20 Str debuffs of vanilla). Unbuffed this "n" should be zero - you can ignore it.

Bye, RedAces.
Image
User avatar
RedAces
 
Posts: 500
Joined: Tue Dec 01, 2009 9:39 am
Location: Germany

Re: Is this macro correct?

Postby Celyn » Fri May 06, 2011 4:47 pm

Thanks for all the help RedAces. Thanks to you i feel we finally got this macro perfected =D

Thank you!
"When I was ten, I read fairy tales in secret and would have been ashamed if I had been found doing so. Now that I am fifty I read them openly. When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -C.S. Lewis
User avatar
Celyn
 
Posts: 28
Joined: Mon Feb 22, 2010 12:50 pm

Re: Is this macro correct?

Postby Celyn » Thu Jun 16, 2011 12:46 pm

Thought id post an update for my macro for 4.2

Code: Select all
/run local _,s,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", 0-(((UnitStat("player",1)+549)*1.05-UnitStat("player",1))*0.27)))


If block capped and using dodge food change the 0 to 90.
"When I was ten, I read fairy tales in secret and would have been ashamed if I had been found doing so. Now that I am fifty I read them openly. When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -C.S. Lewis
User avatar
Celyn
 
Posts: 28
Joined: Mon Feb 22, 2010 12:50 pm

Re: Is this macro correct?

Postby yappo » Thu Jun 16, 2011 6:44 pm

Celyn wrote:Thought id post an update for my macro for 4.2

Code: Select all
/run local _,s,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", 0-(((UnitStat("player",1)+549)*1.05-UnitStat("player",1))*0.27)))


If block capped and using dodge food change the 0 to 90.


Since we want dodge rating higher than parry when ub, won't a negative number seem a bit unintuitive? (Assuming your macro does indeed result in something around -200)
yappo
 
Posts: 1107
Joined: Wed Sep 17, 2008 4:15 pm

Re: Is this macro correct?

Postby Xayton » Sat Jun 18, 2011 10:10 pm

yappo wrote:
Celyn wrote:Thought id post an update for my macro for 4.2

Code: Select all
/run local _,s,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", 0-(((UnitStat("player",1)+549)*1.05-UnitStat("player",1))*0.27)))


If block capped and using dodge food change the 0 to 90.


Since we want dodge rating higher than parry when ub, won't a negative number seem a bit unintuitive? (Assuming your macro does indeed result in something around -200)


Unless something other then slight number changes has changed, it doesn't come up with a negative number. If it is coming up with a negative number it might mean your dodge is higher then your parry and it is saying to lose 200. Although I can be completely wrong because I haven't tested the 4.2 version of the macro.
Xayton <Notéd> Llane
I'll try being nicer if you'll try being smarter.
User avatar
Xayton
 
Posts: 45
Joined: Wed May 13, 2009 5:25 am
Location: Sanity

Re: Is this macro correct?

Postby yappo » Sun Jun 19, 2011 11:16 am

Xayton wrote:
Unless something other then slight number changes has changed, it doesn't come up with a negative number. If it is coming up with a negative number it might mean your dodge is higher then your parry and it is saying to lose 200. Although I can be completely wrong because I haven't tested the 4.2 version of the macro.


Eh, yes?

In 4.2 we want dodge to be higher than parry. Hence my question.
yappo
 
Posts: 1107
Joined: Wed Sep 17, 2008 4:15 pm

Re: Is this macro correct?

Postby Celyn » Sat Jun 25, 2011 1:43 am

yappo wrote:
Celyn wrote:Thought id post an update for my macro for 4.2

Code: Select all
/run local _,s,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Parry Rating this much higher than dodge: "..string.format("%.2f", 0-(((UnitStat("player",1)+549)*1.05-UnitStat("player",1))*0.27)))


If block capped and using dodge food change the 0 to 90.


Since we want dodge rating higher than parry when ub, won't a negative number seem a bit unintuitive? (Assuming your macro does indeed result in something around -200)


Sorry for the late reply. If you dont want a negative number in 4.2 i guess you could set it up like this:

Code: Select all
/run local _,s,p,n=UnitStat("player",2) print("Must be unbuffed. Try to keep Dodge Rating this much higher than parry: "..string.format("%.2f", (((UnitStat("player",1)+549)*1.05-UnitStat("player",1))*0.27)))
"When I was ten, I read fairy tales in secret and would have been ashamed if I had been found doing so. Now that I am fifty I read them openly. When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -C.S. Lewis
User avatar
Celyn
 
Posts: 28
Joined: Mon Feb 22, 2010 12:50 pm

Previous

Return to Advanced Theorycraft and Calculations

Who is online

Users browsing this forum: No registered users and 1 guest

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: No registered users and 1 guest