Closed hugocowan closed 6 months ago
I have a few questions about your setup so I can do calculations on my side:
With that I should be able to help more.
Usually the prediction tooltip only shows zeros when the max hit shown is different from the max hit value used in the prediction calculation. That is interesting. For the panel, the value is rounded down and turned into an integer and while in the Predictions it is not rounded at all and used as the original double value returned. This should be fixed as they should be equivalent. But this also could be a red herring for fixing the axe calculation as the prediction could be using any value under 68 but more than 67.00.
If you'd like to try to debug this, I think the first step would be seeing the actual value the MaxHit.calculateMeleeMaxHit function is returning by outputting the maxHit variable before it returns on line 290 in MaxHit.java.
The baseDamage
in calculateMeleeMaxHit
is 67.703125, which ends up as 67 when rounded down and returned as maxHit
I'll also add that this rounding error happens with multiple different strength bonus variations. The amount baseDamage
is off by varies. Sometimes it's 0.05 off from the proper number, sometimes it's 0.3 off.
I tried changing the magic value of 0.009 to other values, and that did fix this specific max hit, but also broke others. Seems that something else is wrong :/
Right now, I'm trying to narrow down the causes to find where changes need to be made. Thanks for the additional info, it should help out.
With high melee strength bonus setups like this one, is the calculator correct if you are not using any prayers?
Edit: With the initial setup in this thread (118 str, 166 bonus, defensive style, piety on), is the correct max hits in order: 55, 58, 60, 63, 65, 68?
Hey @hugocowan, I've made a significant breakthrough.
I misunderstood how the soul stack bonus was calculated in game. Originally, I thought the prayer bonus and soul stack bonus were added together: strengthlevel * (prayerbonus + soulstackbonus)
. The 0.009 value I found was just from looking at formulas, using Desmos, and spreadsheeting results. The current implementation uses this method:
This is flawed because it is affecting the calculation of the prayer bonus. They should be separate and additive like this:
(strength * prayerbonus) + (strength * soulstackbonus)
Therefore, I believe the correct implementation is this:
I've compared it's results to all the original tests in my spreadsheet and the new problem in this thread and it is correct for all of them so far. And no more magic numbers either! I've created the branch sr-axe-test and pushed the changes there. When you have the chance, please test this change on that branch in game and let me know how it's doing!
I just tried out the new branch with multiple different strength configurations, going through each and every max hit per soul stack level and everything is right now! I think you've done it!
Great! I'm going to rename the branch to v1.12.3 and begin using it for updating other problems I've found for next release. I'll update the progress here and keep the issue open until it is confirmed working when released in Runelite.
Hey @hugocowan ! Update 12.3 was pushed into runelite last night! Please let me know if everything is still working correctly.
Hi there! Nicely done, I currently no longer have the soulreaper axe, but I used the branch extensively and found 0 issues with it. Thanks so much for working on this plugin and for sorting out the axe!
Thanks for all the help testing it! Glad we got it figured out.
Hey there, looks like another rounding issue type of problem!
The max hit shows as 67 when it should be 68.
The next max hit tooltip is interesting, it says you need 0 strength bonus to achieve a max hit of 68, and 2% extra prayer bonus.