raethkcj / RatingBuster

An item comparison tool for WoW Classic.
GNU General Public License v2.0
58 stars 14 forks source link

[Bug]: Dodge % completely wrong #140

Closed Vishiswaz closed 1 year ago

Vishiswaz commented 1 year ago

Describe the bug

When comparing my current tank item (Shiver) to a dps weapon with agility (Caress of Insanity) I noticed that it is incorrectly showing my dodge percent going DOWN when switching to a weapon with Agility. When I looked closer, I saw that Recount says that, on its own, I gain negative dodge percent from Caress of Insanity, when compared to being unarmed.

The dodge % calculation from Agility is completely off. How is this possible?

I really hope this gets fixed soon, the Ratingbuster on Curse is almost unusable for me due to some missing options that you have on this version. WoWScrnShot_022723_234359 WoWScrnShot_022723_234520

Addon Source

GitHub Releases

Version

1.7.4

Locale

English

Talent Specialization

Protection Paladin

Race

Human

raethkcj commented 1 year ago

In a quick check, I can't reproduce anything like that: image

Please share your full talent specialization as well as your settings file from World of Warcraft/_classic_/WTF/Account/<YourAccount>/SavedVariables/RatingBuster.lua

Also, after a fresh reload, type /sldebug and then hover over Caress of Insanity and share the results printed to chat. Then type it again or reload to turn off the spam.

Vishiswaz commented 1 year ago

RatingBuster.zip

Vishiswaz commented 1 year ago

https://www.warcrafttavern.com/wotlk/tools/talent-calculator/paladin?t=B111112222266666448cc999aaaaaeeehkkpoqqquuussswwwxyyEEEIC1111124555abbBmmm

Vishiswaz commented 1 year ago

[07:02:16] [Shiver] [07:02:16] S1: '220 - 409 Damage' [07:02:16] DeepScan DualStat: 220 - 409 Damage, MIN_DAMAGE=220, MAX_DAMAGE=409 [07:02:16] PreScan: (196.6 damage per second), DPS=196.6 [07:02:16] SinglePlus: +41 Strength, STR=+41 [07:02:16] SinglePlus: +88 Stamina, STA=+88 [07:02:16] S1: '+8 Expertise Rating and +12 Stamina' [07:02:16] S1-1: '+8 Expertise Rating' [07:02:16] DeepScan2: +8 Expertise Rating, EXPERTISE_RATING=+8 [07:02:16] S1-2: '+12 Stamina' [07:02:16] DeepScan2: +12 Stamina, STA=+12 [07:02:16] S1: '+4 Hit Rating' [07:02:16] DeepScan: +4 Hit Rating, HIT_RATING=+4 [07:02:16] SingleEquip: Equip: Increases defense rating by 31., DEFENSE_RATING=31 [07:02:16] SingleEquip: Equip: Increases your parry rating by 37., PARRY_RATING=37 [07:02:16] SingleEquip: Equip: Improves hit rating by 26., HIT_RATING=26 [07:02:16] [Caress of Insanity] [07:02:16] S1: '371 - 690 Damage' [07:02:16] DeepScan DualStat: 371 - 690 Damage, MIN_DAMAGE=371, MAX_DAMAGE=690 [07:02:16] PreScan: (196.5 damage per second), DPS=196.5 [07:02:16] SinglePlus: +45 Agility, AGI=+45 [07:02:16] SinglePlus: +48 Stamina, STA=+48 [07:02:16] WholeText: Red Socket [07:02:16] SingleEquip: Equip: Improves haste rating by 28., HASTE_RATING=28 [07:02:16] SingleEquip: Equip: Increases your expertise rating by 39., EXPERTISE_RATING=39 [07:02:16] SingleEquip: Equip: Increases attack power by 118., AP=118 [07:02:16] [Shiver] [07:02:16] S1: '220 - 409 Damage' [07:02:16] DeepScan DualStat: 220 - 409 Damage, MIN_DAMAGE=220, MAX_DAMAGE=409 [07:02:16] PreScan: (196.6 damage per second), DPS=196.6 [07:02:16] SinglePlus: +41 Strength, STR=+41 [07:02:16] SinglePlus: +88 Stamina, STA=+88 [07:02:16] S1: 'Mongoose' [07:02:16] S1-1: 'Mongoose' [07:02:16] DeepScan2 Fail: 'Mongoose' [07:02:16] No Match: 'Mongoose' [07:02:16] S1: '+8 Expertise Rating and +12 Stamina' [07:02:16] S1-1: '+8 Expertise Rating' [07:02:16] DeepScan2: +8 Expertise Rating, EXPERTISE_RATING=+8 [07:02:16] S1-2: '+12 Stamina' [07:02:16] DeepScan2: +12 Stamina, STA=+12 [07:02:16] S1: '+4 Hit Rating' [07:02:16] DeepScan: +4 Hit Rating, HIT_RATING=+4 [07:02:16] SingleEquip: Equip: Increases defense rating by 31., DEFENSE_RATING=31 [07:02:16] SingleEquip: Equip: Increases your parry rating by 37., PARRY_RATING=37 [07:02:16] SingleEquip: Equip: Improves hit rating by 26., HIT_RATING=26

Vishiswaz commented 1 year ago

It seems to be related to Diminishing Returns, as the dodge amount from the agi seems to be changing based on how many items I have on with dodge rating. Still, there's no way my dodge should go down just from adding Agility? Like, if I have all my normal gear on with no weapon, and then I equip a 1h with agi, my dodge should definitely go up, no?

Vishiswaz commented 1 year ago

I just confirmed this with another scenario using stuff I have in the bank.

I unequipped only my weapon and shield, then equipped a 2h with agi (Inevitable Defeat). Ratingbuster said my dodge would go down by 0.22 percent versus being unarmed and unshielded. Instead, my dodge went up by nearly a whole percent.

Vishiswaz commented 1 year ago

My list of gear so you can test yourself, if you want and are able:

Conqueror's Aegis Faceguard, 37 Stam + 20 Def enchant, 32 Stam + 2% armor meta gem, +20 yellow hit gem Shard of the Crystal Forest Shoulderplates of the Deconstructor, Hodir tank enchant (20 Dodge 15 Def) Cloak of the Makers, 225 armor enchant Conqueror's Aegis Breastplate, +10 stats enchant, 24 stam gem, 8 expertise + 12 stam gem Bracers of the Unholy Knight, 40 stam enchant, 8 expertise + 12 stam gem Gauntlets of the Royal Watch, Armsman enchant (2% threat + 10 parry rating) Indestructible plate girdle, 24 stam gem, 8 expertise + 12 stam gem, belt buckle with +51 stam JC gem in it Saronite Plated Legguards, 55 Stam + 22 Agi boe leatherworking leg enchant, 8 expertise + 12 stam gem, 24 stam gem Charred Saronite Greaves, 22 stam enchant The Leviathan's Coil Signet of the Impregnable Fortress Figurine - Monarch Crab, 8 defense rating + 12 stamina gem, +51 stam JC gem Royal Seal of King Llane Shiver, Mongoose Enchant, 8 expertise + 12 stam gem The Boreal Guard, 18 stam enchant, 8 expertise + 12 stam gem, +51 stam JC gem Libram of the Sacred Shield

Vishiswaz commented 1 year ago

Glyphs: Major: Righteous Defense, Seal of Vengeance, Divine Plea Minor: Sense Undead, Blessing of Kings, Lay on Hands

Vishiswaz commented 1 year ago

And one last thing that might help you, before I head to bed:

I tested the Ratingbuster on Curseforge, and it works fine there. But as I said, I prefer your Ratingbuster, so I hope it can be fixed here. Maybe you can compare their diminishing returns formula?

raethkcj commented 1 year ago

Hmm, I've imported your settings, and matched your enchants+glyphs while stacking as much dodge as the PTR vendors would give me, and I'm still seeing normal diminished dodge (the 0.62% breakdown from Agility is the raw, undiminished amount, while the 0.51% in the summary is after Diminishing Returns): image

Since you mentioned trying the version on Curse, can I ask whether you completely deleted the RatingBuster and StatLogic addon folders before switching versions each time? It's possible a leftover file is being unintentionally loaded. Perhaps also make a backup of the RatingBuster SavedVariables file, and then delete that as well before installing this version from scratch.

Vishiswaz commented 1 year ago

Just tried a fresh install (delete and unzip) and copied, then deleted the RatingBuster.lua and RatingBuster.bak files, then did a /reload. Still giving me the same bug.

Vishiswaz commented 1 year ago

I just tried:

Exiting game, deleting the lua files, deleting the ratingbuster files and re-unzipping

Didn't work

I also just tried:

Un-loaded all addons except RatingBuster and AtlasLoot.

Didn't work.

raethkcj commented 1 year ago

Can you run each of these on the affected character and share the output?

/dump LibStub("StatLogic"):GetDodgeFromAgi(45)

/dump LibStub("StatLogic"):GetAvoidanceGainAfterDR("DODGE", LibStub("StatLogic"):GetDodgeFromAgi(45))

/dump LibStub("StatLogic"):GetDodgeChanceBeforeDR()

/dump LibStub("StatLogic"):GetAvoidanceAfterDR("DODGE", LibStub("StatLogic"):GetDodgeChanceBeforeDR() + LibStub("StatLogic"):GetDodgeFromAgi(45))

Vishiswaz commented 1 year ago
[06:37:05] Dump: value=LibStub("StatLogic"):GetDodgeFromAgi(45) 
[06:37:05] [1]=-0.24660349800174, 
[06:37:05] [2]="DODGE"
[06:38:49] Dump: value=LibStub("StatLogic"):GetAvoidanceGainAfterDR("DODGE", LibStub("StatLogic"):GetDodgeFromAgi(45)) 
[06:38:49] [1]=-0.17542796994027
[06:38:16] Dump: value=LibStub("StatLogic"):GetDodgeChanceBeforeDR() 
[06:38:16] [1]=18.036079313508, 
[06:38:16] [2]=10.497607828092 
[06:39:47] Dump: value=LibStub("StatLogic"):GetAvoidanceAfterDR("DODGE", LibStub("StatLogic"):GetDodgeChanceBeforeDR() + LibStub("StatLogic"):GetDodgeFromAgi(45)) 
[06:39:47] [1]=15.364136519472
raethkcj commented 1 year ago

Thank you, one last set of dumps, should be the last ones: /dump UnitStat("player", 2)

/dump GetDodgeChance()

/dump LibStub("StatLogic"):GetStatMod("ADD_DODGE")

/dump LibStub("StatLogic"):GetEffectFromRating(GetCombatRating(CR_DODGE), CR_DODGE, UnitLevel("player"))

/dump LibStub("StatLogic"):GetEffectFromDefense(UnitDefense("player")+select(2,UnitDefense("player")), UnitLevel("player"))

Vishiswaz commented 1 year ago

Big, massive dumps.

[06:53:31] Dump: value=UnitStat("player", 2) 
[06:53:31] [1]=122, 
[06:53:31] [2]=122, 
[06:53:31] [3]=32, 
[06:53:31] [4]=0 
[06:54:56] Dump: value=GetDodgeChance() 
[06:54:56] [1]=26.037172317505 
[06:55:04] Dump: value=LibStub("StatLogic"):GetStatMod("ADD_DODGE") 
[06:55:04] [1]=5, 
[06:55:04] [2]=true
[06:56:45] Dump: value=LibStub("StatLogic"):GetEffectFromRating(GetCombatRating(CR_DODGE), CR_DODGE, UnitLevel("player")) 
[06:56:45] [1]=12.331441800976, 
[06:56:45] [2]="DODGE"
[06:56:15] Dump: value=LibStub("StatLogic"):GetEffectFromDefense(UnitDefense("player")+select(2,UnitDefense("player")), UnitLevel("player")) 
[06:56:15] [1]=5.88
raethkcj commented 1 year ago

Thanks for providing all the information, should be fixed! Ended up being a problem with the conversion rate of agi to dodge, but only showed up when you had a certain amount of diminished dodge.

Vishiswaz commented 1 year ago

Excellent! Just tested it, seems to work now. Thanks!