Jump to content

DPS Calculator Project


TheAncient

Recommended Posts

I've recently heard of a plausible mechanism for how Runescape determines your melee accuracy against monsters. I'm not sure whether or not the theory has sufficient evidence backing it up, but the values I'm getting from it seem to be consistent with experience.

 

The theory says that the game calculates "Maximum Hit Values" from your Attack Bonus, Attack Level and Boosts using the same equation that it uses to calculates your maximum hit from your Strength Bonus, Strength Level and Boosts. Call this number "X". It also calculates a "Maximum Hit Value" from your opponent's Defense Bonus, Defense Level and Boosts using the maximum hit formula too. Call this number "Y". It then takes a random number generated from the interval (0 to X) and a random number generated from the interval (0 to Y). If the random value from the (0 to X) interval is larger than the random value from the interval (0 to Y), then your attack hits.

 

In simple terms, the game calculates a value for "damage" using your Attack Bonus and Levels, and a value for "damage" using your opponent's Defense Bonus and Levels, and then compares the two. If your "attack damage value" is higher than your opponent's "defense damage value", then the attack hits.

 

What is really convenient about this theory is that maximum hit formulas are known to a high degree of accuracy already. Using some basic math, it is therefore possible to calculate expected accuracies.

 

I have written an Excel program that does exactly this. I will not release it yet, because I still want to do more extensive research with it and want to tinker with it.

 

But here's an explanation of how it works.

 

In order to understand it, you also have to understand how the game calculates your max hit. It does by calculating an "equivalent level" of your strength after prayer and pot boosts, and an "equivalent bonus" of your strength equipment. It then multiples the two to find a max hit.

 

Assumptions:

-- Damage values are random values sampled from a uniform distribution on the interval (0, max hit)

-- Jard Y Dooku's Max hit formula is accurate

 

What the Excel sheet does:

-- Input relevant levels and equipment bonuses for you and your opponent.

-- Calculate the "equivalent level" for your attack, and your opponent's defense.

+ + + Formula: Equivalent Level = Potted Level + Attack Style + (Base Level * (1+0.01*Prayer Boost) - Base Level). Taken from Jard Y Dooku's Max hit calculator.

-- Calculate the "equivalent bonus" for your attack and strength, and your opponent's defense.

+ + + Formula: Equivalent Bonus = 0.00175*Bonus + 0.1

-- Calculate the maximum "attack damage value" and "defense damage value".

+ + + Formula: Max Hit = floor(EL * EB * 10)

-- Calculate the probability that a random value sampled from a uniform distribution on the interval (0, max attack damage value) is greater than a random value sampled from a uniform distribution on the interval (0, max defense damage value).

+ + + Formula:

[hide]

This may require some knowledge in introductory college Probability.

Let n = "maximum attack damage value"

Let m = "maximum defense damage value"

Let X be a random value (RV) sampled from the uniform distribution on the interval (0, n).

Let Y be a random value (RV) sampled from the uniform distribution on the interval (0, m).

 

Find P(X>Y).

P(X>Y) = for all i, P(X = a) * P(Y<a)

= sum(1/n*a/m) for a = 0:n

= n/(2m) using the formula for the sum of an arithmetic series

[/hide]

-- The above probability is your accuracy.

 

What we can take from all of this convoluted math is a new potential way to calculate DPS of weapons and equipment, and what gear is best in each situation. This is what I will be doing soon, after I have made sure the formula works.

 

Here are some sample accuracy values:

Assume 99 Attack, and 99 Defense, OL and turmoil on both players.

1) Attacker has 120 Att bonus. Defender has 500 Def bonus.

Acc = 16%

2) Attacker has 120 Att bonus. Defender has 250 Def bonus.

Acc = 28%

Assume 99 Attack, OL, turmoil for attacker; 70 Defense, Super Def, piety for defender.

3) Attacker has 120 Att bonus. Defender has 250 Def bonus.

Acc = 45%

4) Attacker has 155 Att bonus. Defender has 150 Def bonus.

Acc = 80%

 

What I'd like to hear are things I can do to improve the formula (including the validity of it), what you'd like to be calculated from the formula (I'll be comparing all of the Chaotic weapons as one example), or any other comments.

 

Here's the file. As far as I know, my computer is virus-free. And I'm a pretty trustworthy source if I say so myself \:D/

http://www.mediafire.com/?yhwnvjcjhzn

 

:grin:

sigcopyaf.png

Ever wanted to find street prices of RS items? Check out the SPOLI Index

 

Nex Drops: Pernix Cowl, Pernix Chaps, Torva Helm, Torva Platebody, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Zaryte Bow, Virtus Mask, Torva Legs, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Zaryte Bow, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Body, Torva Platelegs, Torva Platelegs, Virtus Robe Top

Link to comment
Share on other sites

The thing is, figuring out dps against monsters is something that this cannot do, because we do not know its defense values. You can still use it to compare weapons, using substitution you can find out at what accuracy you need to hit for a certain weapon to surpass another weapon.

Dps against players is useless also, because when you pk, its not about dps, its about getting your opponents hp to 0. I wrote a around 250 line c++ program to simulate a fight between 2 players using this accuracy formula though.

Link to comment
Share on other sites

I've already written a DPS calculator that I believe to be accurate, but I've never published it for the following reasons:

a- I don't know the resolution of the accuracy/defense rolls.

b- The max hit equation as per the tip.it calculator and runescape wiki both seem slightly inaccurate from my experiences.

c- google doc calculators are kind of pointless, as players can't input their own stats.

 

I'm taking a closer look at your equation right now, but so far it seems correct.

anyways I do have 2 small comments to make.

 

a- what do you think happens when the attacker and the defender roll the same value?

I'm inclined to believe that the defender wins, as per the implications of the Jad vs Roosters article.

 

b- what do you think the Accuracy/Defense Resolution is?

Strength used to have what I call "1x" resolution, but ever since lifepoints came out, it now has "10x" resolution so to speak.

I've done a few calculations on accuracy myself, and the difference between 1x and 10x resolution can be substantial, even at higher levels.

 

yeah so the formula here:

 

 

This may require some knowledge in introductory college Probability.

Let n = "maximum attack damage value"

Let m = "maximum defense damage value"

Let X be a random value (RV) sampled from the uniform distribution on the interval (0, n).

Let Y be a random value (RV) sampled from the uniform distribution on the interval (0, m).

 

Find P(X>Y).

P(X>Y) = for all i, P(X = a) * P(Y<a)

= sum(1/n*a/m) for a = 0:n

= n/(2m) using the formula for the sum of an arithmetic series

 

 

so instead of n/(2m)

I would argue that the equation would be (n-r)/(2m) for n =< m

and (m+r)/(2n) for m < n

where r is the lowest accuracy/defense roll in runescape, that is nonzero.

Naaxi.png
Link to comment
Share on other sites

The thing is, figuring out dps against monsters is something that this cannot do, because we do not know its defense values. You can still use it to compare weapons, using substitution you can find out at what accuracy you need to hit for a certain weapon to surpass another weapon.

Dps against players is useless also, because when you pk, its not about dps, its about getting your opponents hp to 0. I wrote a around 250 line c++ program to simulate a fight between 2 players using this accuracy formula though.

 

Yes, I agree that it can't exactly find DPS against monsters, since you don't know their maximum defense values. But if you spend the time to record an approximate accuracy against a monster using the same set of gear each time, you can approximate the monster's maximum defense value.

 

I agree with you about DPS against players in that it doesn't perfectly simulate a real match. It doesn't even incorporate eating time, which is a vital part of who wins fights. However, it's still useful to have a general sense of the DPS of a weapon against a certain kind of defense. It isn't predictive, but it can give you a relative rank order for how effective your setup is.

 

I've already written a DPS calculator that I believe to be accurate, but I've never published it for the following reasons:

a- I don't know the resolution of the accuracy/defense rolls.

b- The max hit equation as per the tip.it calculator and runescape wiki both seem slightly inaccurate from my experiences.

c- google doc calculators are kind of pointless, as players can't input their own stats.

 

I'm taking a closer look at your equation right now, but so far it seems correct.

anyways I do have 2 small comments to make.

 

a- what do you think happens when the attacker and the defender roll the same value?

I'm inclined to believe that the defender wins, as per the implications of the Jad vs Roosters article.

 

b- what do you think the Accuracy/Defense Resolution is?

Strength used to have what I call "1x" resolution, but ever since lifepoints came out, it now has "10x" resolution so to speak.

I've done a few calculations on accuracy myself, and the difference between 1x and 10x resolution can be substantial, even at higher levels.

To your first statements;

b- I used Jard Y Dooku's max hit calc, which according to him is the most accurate max hit formula so far.

c- I can upload the workbook as a MS Excel file, not Googledoc.

 

To your comments;

a- Right now I am treating equal rolls in favor of the attacker. I really think this is negligible, because of the damage*10 update. The chance that an attacker and defender get the same value is pretty small if you're dealing with max hits in the 500-1000 damage range. (About 1/500 chance)

b- I would guess that it's a 10X resolution (or even higher). I doubt they have rounding on their max hit values. From a coding perspective, it only requires changing data types away from using an int.

 

so instead of n/(2m)

I would argue that the equation would be (n-r)/(2m) for n =< m

and (m+r)/(2n) for m < n

where r is the lowest accuracy/defense roll in runescape, that is nonzero.

Hm. How did you get this? + How do you know the minimum roll value is nonzero?

sigcopyaf.png

Ever wanted to find street prices of RS items? Check out the SPOLI Index

 

Nex Drops: Pernix Cowl, Pernix Chaps, Torva Helm, Torva Platebody, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Zaryte Bow, Virtus Mask, Torva Legs, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Zaryte Bow, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Body, Torva Platelegs, Torva Platelegs, Virtus Robe Top

Link to comment
Share on other sites

The thing is, figuring out dps against monsters is something that this cannot do, because we do not know its defense values. You can still use it to compare weapons, using substitution you can find out at what accuracy you need to hit for a certain weapon to surpass another weapon.

Dps against players is useless also, because when you pk, its not about dps, its about getting your opponents hp to 0. I wrote a around 250 line c++ program to simulate a fight between 2 players using this accuracy formula though.

 

Yes, I agree that it can't exactly find DPS against monsters, since you don't know their maximum defense values. But if you spend the time to record an approximate accuracy against a monster using the same set of gear each time, you can approximate the monster's maximum defense value.

 

I agree with you about DPS against players in that it doesn't perfectly simulate a real match. It doesn't even incorporate eating time, which is a vital part of who wins fights. However, it's still useful to have a general sense of the DPS of a weapon against a certain kind of defense. It isn't predictive, but it can give you a relative rank order for how effective your setup is.

 

I've already written a DPS calculator that I believe to be accurate, but I've never published it for the following reasons:

a- I don't know the resolution of the accuracy/defense rolls.

b- The max hit equation as per the tip.it calculator and runescape wiki both seem slightly inaccurate from my experiences.

c- google doc calculators are kind of pointless, as players can't input their own stats.

 

I'm taking a closer look at your equation right now, but so far it seems correct.

anyways I do have 2 small comments to make.

 

a- what do you think happens when the attacker and the defender roll the same value?

I'm inclined to believe that the defender wins, as per the implications of the Jad vs Roosters article.

 

b- what do you think the Accuracy/Defense Resolution is?

Strength used to have what I call "1x" resolution, but ever since lifepoints came out, it now has "10x" resolution so to speak.

I've done a few calculations on accuracy myself, and the difference between 1x and 10x resolution can be substantial, even at higher levels.

To your first statements;

b- I used Jard Y Dooku's max hit calc, which according to him is the most accurate max hit formula so far.

c- I can upload the workbook as a MS Excel file, not Googledoc.

b- what is Jard Y dooku's equation? I tried looking it up but it came in the form of a computer code. Could you decipher it for me?

c- this is good stuff.

 

 

 

To your comments;

a- Right now I am treating equal rolls in favor of the attacker. I really think this is negligible, because of the damage*10 update. The chance that an attacker and defender get the same value is pretty small if you're dealing with max hits in the 500-1000 damage range. (About 1/500 chance)

b- I would guess that it's a 10X resolution (or even higher). I doubt they have rounding on their max hit values. From a coding perspective, it only requires changing data types away from using an int.

a- you don't know that the damage*10 update affected attack and defense rolls, perhaps it only applied to max hit and not accuracy.

If this is the case, the impact of "tie breakers" is 10x what you think it could be.

I did a void accuracy analysis a while ago, and as it turns out the difference of 10x and 1x resolution in accuracy, often makes or breaks the difference between black dhide and void range, just as an example.

It's negligible in many circumstances, but I personally don't consider it negligible overall.

 

so instead of n/(2m)

I would argue that the equation would be (n-r)/(2m) for n =< m

and (m+r)/(2n) for m < n

where r is the lowest accuracy/defense roll in runescape, that is nonzero.

Hm. How did you get this? + How do you know the minimum roll value is nonzero?

first statement:

oopsies the equation I just posted above assumes that accuracy rolls range from 1 to n, as opposed to 0 to n

the equation for 0 to n is as follows:

n/(2*(m+r)) for n =< m and

(m+2r)/(2*(n+r))

 

Anyways the explanation for this equation is as follows:

we can draw out every possible outcome of a pair of dice rolls, in an m by n matrix (or an m+r by n + r matrix if you assume rolls of 0 to n)

Lets mark every point in the matrix, where attack > defence with an x

the equation I posted above is the equation for the total number of x's divided by the total number of slots in the matrix.

 

your second statement:

I think you misunderstood what i meant by "minimum roll value is nonzero"

Lets say a player can roll an accuracy roll of 0 to 10, then the "lowest accuracy/defense roll that is nonzero" is 1.

more specifically, I did not claim that the minimum roll value is nonzero.

I said r was the lowest nonzero value you could roll.

Naaxi.png
Link to comment
Share on other sites

Grimy and I discussed this in game, and our basic consensus was that it's hard to say anything for sure because we don't know to what precision jagex calculates the maximum damage values. Hence, for negligible effects such as berserker ring vs warrior ring, we still can't say with certainty which one is better. I agree with this for the most part.

 

Anyway, for Grimy's curiosity:

Equivalent Strength Level = (Strength level with potions) + (fight style boost) + (Base Strength Level * (Percent Boost from Prayer)

Strength Multiplier = (Strength Bonus) * 0.00175 + 0.1

 

Max hit = 10*((Equivalent Strength Level * Strength Multiplier) + 1.05), rounded down to the nearest integer.

sigcopyaf.png

Ever wanted to find street prices of RS items? Check out the SPOLI Index

 

Nex Drops: Pernix Cowl, Pernix Chaps, Torva Helm, Torva Platebody, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Zaryte Bow, Virtus Mask, Torva Legs, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Zaryte Bow, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Body, Torva Platelegs, Torva Platelegs, Virtus Robe Top

Link to comment
Share on other sites

I'm very interested in all of this. I can't help due to my inability to comprehend any mathematics above basic algebra, but it's interesting nonetheless. :thumbup:

dgs5.jpg
To put it bluntly, [bleep] off.

Link to comment
Share on other sites

I'm very interested in all of this. I can't help due to my inability to comprehend any mathematics above basic algebra, but it's interesting nonetheless. :thumbup:

Actually, all you need is basic algebra, and the ability to calculate the area of triangles/rectangles ;)

 

I explained it in a previous thread:

 

but it boils down to this

Roll.png

 

your accuracy is the area of the red triangle, divided by the area of the red triangle + the area of the blue shape

the length of one edge(not hypotenuse) of the red triangle is approximately equal to your max accuracy.

The length of the longest edge of the blue shape is approximately equal to the target's max defense.

Naaxi.png
Link to comment
Share on other sites

I'm very interested in all of this. I can't help due to my inability to comprehend any mathematics above basic algebra, but it's interesting nonetheless. :thumbup:

Actually, all you need is basic algebra, and the ability to calculate the area of triangles/rectangles ;)

 

I explained it in a previous thread:

 

but it boils down to this

Roll.png

 

your accuracy is the area of the red triangle, divided by the area of the red triangle + the area of the blue shape

the length of one edge(not hypotenuse) of the red triangle is approximately equal to your max accuracy.

The length of the longest edge of the blue shape is approximately equal to the target's max defense.

 

^ This. My formula is a little bit convoluted, and requires extra calculations, but arrives at the same conclusion.

sigcopyaf.png

Ever wanted to find street prices of RS items? Check out the SPOLI Index

 

Nex Drops: Pernix Cowl, Pernix Chaps, Torva Helm, Torva Platebody, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Zaryte Bow, Virtus Mask, Torva Legs, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Zaryte Bow, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Body, Torva Platelegs, Torva Platelegs, Virtus Robe Top

Link to comment
Share on other sites

Well, if we manage to find the accuracy formula on other people using set defense values, then we might be able to backtrack through a plain and simple DPS test on mobs their defence level.

 

Formula gives a DPS / defence value --> We measure DPS by.. doing 1000 hits on a monster, having a fixed weapon speed and bonus. Then you can easily calculate the approximate defence level.

 

Still a shame Jagex doesn't give more feedback and we aren't able to use nice addons like WoW has them. That would make life so much easier haha.

34eyfbd.jpg9h43sp.jpg16m28ty.jpg
Link to comment
Share on other sites

Why doesn't jagex just tell us the formulas.. like seriously.

Levon.png Bladewing.png

 

It's great you know what you're talking about rustiod. Everything you've said is 100% accurate a true.

 

That being said...your a [bleep]ing [bleep] douchebag, and none of your advice will ever (or should ever) be taken seriously because of it.

disregard good advice because the giver is a douche

 

THAT MAKES YOU A BETTER PERSON

Link to comment
Share on other sites

Well, if we manage to find the accuracy formula on other people using set defense values, then we might be able to backtrack through a plain and simple DPS test on mobs their defence level.

 

Formula gives a DPS / defence value --> We measure DPS by.. doing 1000 hits on a monster, having a fixed weapon speed and bonus. Then you can easily calculate the approximate defence level.

 

Still a shame Jagex doesn't give more feedback and we aren't able to use nice addons like WoW has them. That would make life so much easier haha.

 

That's exactly what I meant earlier. I think it'd be useful to do, too. We could get more or less conclusive evidence as to which weapons we should be using. I used to have a program that records accuracy, but it was on my old computer which crashed. I could write it again, but I've forgotten most of my Java and would prefer not to.

sigcopyaf.png

Ever wanted to find street prices of RS items? Check out the SPOLI Index

 

Nex Drops: Pernix Cowl, Pernix Chaps, Torva Helm, Torva Platebody, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Chaps, Virtus Robe Legs, Zaryte Bow, Virtus Mask, Torva Legs, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Zaryte Bow, Virtus Robe Legs, Virtus Robe Top, Virtus Robe Top, Torva Platelegs, Zaryte Bow, Pernix Body, Torva Platelegs, Torva Platelegs, Virtus Robe Top

Link to comment
Share on other sites

Why doesn't jagex just tell us the formulas.. like seriously.

Yep, why would it hurt them to do so? Really this is something that shouldn't be a big deal to release and could have all sorts of cool applications. I think they should also explain how defense of monsters is figured out also.

Hameigh.png
Link to comment
Share on other sites

Why doesn't jagex just tell us the formulas.. like seriously.

Yep, why would it hurt them to do so? Really this is something that shouldn't be a big deal to release and could have all sorts of cool applications. I think they should also explain how defense of monsters is figured out also.

That's just Jagex for you. They'd rather people spend the countless hours trying to figure this stuff out. Look at the combat formulas. ;).

09144a99bb.png

Link to comment
Share on other sites

  • 2 months later...

I think the theory works quite well and would be a helpful tool in determining the defense of alot of monsters...for example:

 

I did a test of accuracy on dark beasts on a slayer task with my attack ''max hit'' being around 680(around the same as str max hit) and in a test of 562 hit's i dealt damage on 85,6% of the hits, using a random number generator i determined the defense max hit of dark beasts to be around 190(their strength max hit is 174, so it makes sense). Now if we assume no weapon, prayer or potions for dark beasts(which are all believable) and no significant stab defense bonus their defense level should be in the range of 160-170. Ofcource, this would be easier to do if we had combat/max hit calculators go past level 99 but we can still get a general understanding of the monsters combat stats. In a similar way if you count the accuracy of dark beasts and compare it to your defense max hit, you would get a approximate dark beast attack max hit and attack level. With a good enough calculator and a sheet of monster defense max hit values it wouldn't be extremely hard to determine if onyx(I)/berserker(i), warrior/berserker, attacker/neitiznot or any other close call combat equipment is best for that particular monster.

 

Also, according to the same calculations, assuming 745 attack max hit for CLS, the Chaotic rapier and longsword would hit within a percentage point of eachothers accuracy.

First to 99 Farming on 27. September, 2005.

First to 3766 Port Score on 20. March, 2014.

First to 4664 Port Score on 2. March, 2015.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.