
02-03-2009, 09:51 AM
| | a_Tank_01 | | Join Date: Jul 2007
Posts: 126
| | Source: Satrina
You can change GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04 to GetCombatRating(CR_DEFENSE_SKILL)/122.9625 - I left it expanded so people can see where the numbers come from. Then assign the miss calculation to a local variable instead of repeating it twice: Code: /run local a=1/(0.0625+0.956/(GetCombatRating(CR_DEFENSE_SKILL)/122.9625)) ChatFrame1:AddMessage(format("Mit %.2f Avoid %.2f",GetDodgeChance()+GetBlockChance()+GetParryChance()+7+a,GetDodgeChance()+GetParryChance()+7+a)) (and now you're basically back to the Maintankadin macro) | Thanks, i figured i'd leave the math alone and go with this instead, it also gives me some room for more formatting
(removed, see Satrina's post below)
edit: both of those include +2% from NE racial
Last edited by Astemus; 02-03-2009 at 10:11 AM..
| 
02-03-2009, 09:55 AM
|  | village idiot | | Join Date: Jul 2007 Location: Canadia
Posts: 3,159
| |
Be careful, you are assigning b,d,p,r,cr in the global Lua environment. You never know what Blizzard has defined as a global variable, and they never use namespaces for anything so you may be reassigning a variable used by the UI, which can lead to really obscure errors in addons. Always local your variables in a macro. You can also take advantage of some of Lua's syntactic sugar here to save space, and assign the results of the GetXChance to your variables instead of just memoising the function names: Code: /run local b,d,p,r=GetBlockChance(),GetDodgeChance(),GetParryChance(),GetCombatRating(CR_DEFENSE_SKILL) ChatFrame1:AddMessage(format("Mitigation=%.2f%% Avoidance=%.2f%%",b+d+p+7+1/(.0625+.956/(r/122.9625)),d+p+7+1/(.0625+.956/(r/122.9625))))
Last edited by Satrina; 02-03-2009 at 10:00 AM..
| 
02-03-2009, 10:16 AM
| | a_Tank_01 | | Join Date: Jul 2007
Posts: 126
| | |
Thanks, good thing I'm not testing these before a raid and on my work laptop. I edited my post to avoid anyone foolishly trying to copy anything I post here.
| 
02-03-2009, 11:31 AM
| | a_Tank_01 | | Join Date: Jul 2007
Posts: 126
| |
Decided to add a defense rating check in for my own use, since I ended up with so much extra room in the macro. Simply tells you how much defense rating you are over the soft cap. Negative numbers mean you're under the defense rating cap of 689. Code: /run local b,d,p,r=GetBlockChance(),GetDodgeChance(),GetParryChance(),GetCombatRating(CR_DEFENSE_SKILL) a=1/(.0625+.956/(r/122.9625)) ChatFrame1:AddMessage(format("Mitigation=%.2f%% Avoidance=%.2f%% Defense Rating calc %.0f",b+d+p+7+a,d+p+7+a,r-689)) | 
02-03-2009, 12:03 PM
|  | village idiot | | Join Date: Jul 2007 Location: Canadia
Posts: 3,159
| |
Looks good! Just one tiny tweak: Code: /run local b,d,p,r,a=GetBlockChance(),GetDodgeChance(),GetParryChance(),GetCombatRating(CR_DEFENSE_SKILL) a=1/(.0625+.956/(r/122.9625)) ChatFrame1:AddMessage(format("Mitigation=%.2f%% Avoidance=%.2f%% Defense Rating calc %.0f",b+d+p+7+a,d+p+7+a,r-689)) (adding a in the declaration of local variables)
Edit - Okay, one more tweak, forcing the +/- on the defense rating check: Code: /run local b,d,p,r,a=GetBlockChance(),GetDodgeChance(),GetParryChance(),GetCombatRating(CR_DEFENSE_SKILL) a=1/(.0625+.956/(r/122.9625)) ChatFrame1:AddMessage(format("Unhittable: %.2f%% Avoidance: %.2f%% Defense %+.0f rating",b+d+p+7+a,d+p+7+a,r-689))
Last edited by Satrina; 02-03-2009 at 12:15 PM..
| 
02-03-2009, 01:00 PM
| | a_Tank_01 | | Join Date: Jul 2007
Posts: 126
| | Source: Satrina
Edit - Okay, one more tweak, forcing the +/- on the defense rating check: Code: /run local b,d,p,r,a=GetBlockChance(),GetDodgeChance(),GetParryChance(),GetCombatRating(CR_DEFENSE_SKILL) a=1/(.0625+.956/(r/122.9625)) ChatFrame1:AddMessage(format("Unhittable: %.2f%% Avoidance: %.2f%% Defense %+.0f rating",b+d+p+7+a,d+p+7+a,r-689)) | Excellent! I wish i could learn to write these kinds of macros without learning LUA...
| 
02-04-2009, 11:15 AM
|  | I rolled a blood elf(fem) | | Join Date: Oct 2008 Location: Springvegas, Missouri
Posts: 605
| | Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + 5 + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04)))) So since im a night elf Bear, would I change the 5 in '' () + 5 + 1/(0.0625 + 0.956...)
To a 7?
So my macro when finished would look like this. Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + 7 + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04))))
Im not a good math person or a programmer at all so sorry if that seems dumb. /spoonfeed
__________________
You do realize why the Borg are so bad at making dimmer switches don't you?
Resistance is futile. www.undying-legends.com | 
02-04-2009, 11:16 AM
|  | CM and Wall-O-Text'er | | Join Date: Jul 2007
Posts: 9,253
| | |
yes shift.
__________________ 
READ THIS: Posting & Chat Rules Source: Turelliax
I will never be a kaz.. no one can reach the utter awesomeness of you. | | 
02-04-2009, 11:40 AM
|  | I rolled a blood elf(fem) | | Join Date: Oct 2008 Location: Springvegas, Missouri
Posts: 605
| |
YAY! Im smart! I figured out a macro all by myself!
__________________
You do realize why the Borg are so bad at making dimmer switches don't you?
Resistance is futile. www.undying-legends.com | 
02-06-2009, 08:40 AM
| | Wacky Warlock Wiz | | Join Date: Feb 2009
Posts: 9
| |
In this macro, and all others, you are using GetCombatRating(CR_DEFENSE_SKILL). Why wouldn't you want to use GetCombatRatingBonus(CR_DEFENSE_SKILL)? Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 5 + 1/(0.0625 + 0.956/(GetCombatRating(CR_DEFENSE_SKILL)/4.91850*0.04)))) I've gotten pretty accurate results with this, but I don't know why it wouldn't be used. I assumed because of DR, but if I'm not mistaken Defense skill is what calculates the % miss, dodge, parry, and block. So, wouldn't you want to use the actual # of skill you have bonus to the 400 base? Since that is what you are calculating?
From what I've seen the #s in the paper doll sheet are after Diminishing returns. I don't think I've hit the Defense cap which may be why I haven't noticed anything. Also, for death knights I think RatingBonus might be better suited because then it's easier to add in the +25 from Stoneskin Gargoyle.
Of course, I'm probably wrong, but that's what this thread is here for, to fix things.
If anyone could answer this, I'd appreciate it.
| 
02-06-2009, 09:17 AM
|  | village idiot | | Join Date: Jul 2007 Location: Canadia
Posts: 3,159
| | |
GetCombatRatingBonus(CR_DEFENSE_SKILL) returns the same number as GetCombatRating(CR_DEFENSE_SKILL)/4.91850 (at level 80). That is, if GetCombatRating(CR_DEFENSE_SKILL) returns 689, then GetCombatRatingBonus(CR_DEFENSE_SKILL) will return 140.0(...). You can use either, there's no actual difference.
I suppose it's technically better to use GetCombatRatingBonus since it's level independent, but nobody cares about any of this at level 79.
Last edited by Satrina; 02-06-2009 at 09:22 AM..
| 
02-06-2009, 09:52 AM
| | New Registrant | | Join Date: Dec 2008
Posts: 11
| | |
Death Knights also have the Frigid Dreadplate talent to give 3% miss so you might want to mention that along with the night elves, A NE DK with Frigid Dreadplate will have 10% miss before adding extra from defense.
Also if you have a hunter or druid in your group that you know keeps scorpid sting or insect swarm up, on a particular boss you can assume another 3% although I wouldn't incorporate this into a macro, just another thing to be aware of, that debuff alone means I only worry about reaching 99.4% which I used to reach on my DK with a Lichborne/Unbreakable armor...it was awesome for patchwerk, at 5% we would tell all melee to just step out so all hits were directed to me, which of course wouldn't land since I was unhittable.
| 
02-06-2009, 11:17 AM
| | Wacky Warlock Wiz | | Join Date: Feb 2009
Posts: 9
| |
Would this work? (the 1+ is from Stoneskin Gargoyle enchant, (25*.04 = 1) which doesn't get added to the Defense bonus at all, just the finished bonus) Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 5 + 1/(0.0625 + 0.956/(1 + GetCombatRatingBonus(CR_DEFENSE_SKILL)*0.04)))) What is "1/(0.0625 + 0.956/...)" for... I know what the ... portion is for just not sure why you do "1/(0.0625 + 0.956/ "...)
| 
02-06-2009, 11:19 AM
|  | CM and Wall-O-Text'er | | Join Date: Jul 2007
Posts: 9,253
| | |
that's to calculate the DR i think on miss.
__________________ 
READ THIS: Posting & Chat Rules Source: Turelliax
I will never be a kaz.. no one can reach the utter awesomeness of you. | | 
02-06-2009, 11:30 AM
| | Wacky Warlock Wiz | | Join Date: Feb 2009
Posts: 9
| |
Also, I think that for DKs who are using Stoneskin should use this: Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 5 + 1/(0.0625 + 0.956/(1 + GetCombatRatingBonus(CR_DEFENSE_SKILL)*0.04)))) And if they are frost and have the +3% miss from talents change the 5 to an 8. That should clear up any irregularities.
| 
02-06-2009, 11:35 AM
|  | village idiot | | Join Date: Jul 2007 Location: Canadia
Posts: 3,159
| |
No, you do not do this: Code: 1/(0.0625 + 0.956/(1 + GetCombatRatingBonus(CR_DEFENSE_SKILL)*0.04)))) If you do that, you are subjecting that 1% to diminishing returns, and they are known to not be subject to DR. Just add the extra +1 to the 5 term in the macro and leave the DR miss part completely alone: Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 6 + 1/(0.0625 + 0.956/(GetCombatRatingBonus(CR_DEFENSE_SKILL)*0.04)))) Then if you have the extra +3 from talents Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 9 + 1/(0.0625 + 0.956/(GetCombatRatingBonus(CR_DEFENSE_SKILL)*0.04))))
The bigger question is whether GetDodgeChance and GetParryChance include that 1% from the extra defense in their return value. Simple stupid way to find out: Enchant one grey sword with Stoneskin, and another without. Equip one and do /run ChatFrame1:AddMessage(GetParryChance().." "..GetDodgeChance()). Switch and do the other. If the results are different, then it is added in. If not, it isn't.
Edit2: Another question is whether GetCombatRating/GetCombatRatingBonus returns as if the 25 defense from Stoneskin is there or not. I really don't want to make a deathknight to test this
Last edited by Satrina; 02-06-2009 at 11:46 AM..
| 
02-06-2009, 12:09 PM
| | Wacky Warlock Wiz | | Join Date: Feb 2009
Posts: 9
| | |
It does not. My defense mouseover returns this w/ the stoneskin enchant:
"Defense 556 (400 + 156) -- notice the +156 is 25 higher than +131 below
Defense Rating 648 (+131 Defense)
Increases chance to Dodge, Block, and Parry by 6.24%
Decreases chance to be hit and critically hit by 6.24%
(Before diminishing returns)"
And my "GetCombatRatingBonus(CR_DEFENSE_SKILL)" returned "131.74753651002567"
And my "GetCombatRating(CR_DEFENSE_SKILL)" returned "648.0000"
Therefore the number is not added in. I also tested the dodge and parry chance include the 25 straight defense from stoneskin here's the results:
W/O Stoneskin
Parry: 14.018374443054
Dodge: 19.160154342651
W/ Stoneskin
Parry: 15.018375396729
Dodge: 20.160154342651
It seems to add 1% to dodge and slightly more than 1% to parry... not a noticeable amount more... but more...
Also, I'd like to point out that by taking "floor(GetCombatRatingBonus(CR_DEFENSE_SKILL)) " might more accurately depict your actual gain from the amount. Because, for example, 648 rating returns 131.74753651002567 defense skill, doesn't mean we should use that number in our calculations... I'm pretty sure that that long number is rounded off at 131. You have to get the full point in rating for it to add to your avoidance. floor() just cuts off the excess.
Last edited by Liudeath; 02-06-2009 at 12:17 PM..
| 
02-06-2009, 12:15 PM
|  | CM and Wall-O-Text'er | | Join Date: Jul 2007
Posts: 9,253
| | |
floor for defense rating is a good idea.
__________________ 
READ THIS: Posting & Chat Rules Source: Turelliax
I will never be a kaz.. no one can reach the utter awesomeness of you. | | 
02-06-2009, 03:09 PM
|  | village idiot | | Join Date: Jul 2007 Location: Canadia
Posts: 3,159
| |
The floor on defense is indeed a good idea.
So what I think we're left with for deakthknights with Stoneskin is: Code: /run ChatFrame1:AddMessage(format("Total avoidance: %.2f%%", GetDodgeChance() + GetParryChance() + 6 + 1/(0.0625 + 0.956/(floor(GetCombatRatingBonus(CR_DEFENSE_SKILL))*0.04)))) We're explicitly adding in the 1% miss from Stoneskin, leaving the extra 1% dodge and parry to their respective get functions, and truncating the defense skill to the nearest one
| 
02-17-2009, 07:20 AM
| | New Registrant | | Join Date: Jan 2009
Posts: 3
| | | Thanks Orcstar
I just recently started browsing the forums here to see what i can see...
I really want to thank Orcstar for posting about the benefits of a building a block set. It's good to see some confirmation on thoughts and theories have been tinkering with myself. I honestly thought I was the only one who had made the attempt. My block is very high and I'm pretty proud at what I've done with the set. Honestly though, as a warrior, I wouldn't bet on another type of set-up for the class. The AoE threat gen is amazing thanks to a high block value and damage shield
|
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | World of Warcraft™ and Blizzard Entertainment® are all trademarks or registered trademarks of Blizzard Entertainment in the United States and/or other countries. These terms and all related materials, logos, and images are copyright © Blizzard Entertainment. This site is in no way associated with or endorsed by Blizzard Entertainment®. |
|