# Forums

- Home
- Forums
- Old School RuneScape General
- Combat Formulas

## Combat Formulas

Quick find code: **317-318-712-65587452**

**Zandiskoul**said:

Lame stuff when you have the spreadsheet locked out with requiring your permission and a google account. Just hella lame, like you don't care or want to keep tabs on my personal email address. Kinda shitty when Jagex policy is to not give your info away and you are requesting their info. I think this needs to be removed as a violation of terms of service and against the whole player privacy tutorials in the game.

To use the spreadsheet you need to make a copy, otherwise multiple people will be using the same calculator which is pointless.

To make a copy you need to be logged in, which is Google's policy. Take it up with them about that.

By making a copy you are NOT sharing your email adres, I can't see who makes a copy and/or how often. So I do not know who and how many people use the spreadsheet.

Only when you click 'Request access' you agree to ask me to give you access to the spreadsheet, but I ignore these requests. People are supposed to click on 'File' and 'Make a copy', like my instructions clearly dictate.

About the reference to the spreadsheet and twitter from these forums, I'm not providing any links to external sites. The websites I refer to are frequently used by Jagex staff themselves.

Feel free to disagree and report this and that. But please do not post on my thread anymore.

**Combat Formulas**

*@Bitter koekjeRS*

15-Feb-2019 15:56:53

**Downlifter**said:

I'm copy-pasting my comment on a video for @1_Defence's calculator. I realize your calculator is PvM-specific, and does not include a Castle Wars brace modifier, but this may be useful to you, assuming it wasn't already realized:

With the Castle Wars brace effect, the 1.2x modifier to hits is applied individually to each hit AFTER the initial roll through your normal distribution of possible hit values, as opposed to normal modifiers (like non-overhead prayers), which simply raise the upper bound of your range of possible hit values (your max hit).

Ultimately, this distinction affects your average hit value because certain hit values are not possible within your distribution with the CW brace effect.

This shows how the average hit values are affected by the CW brace with a non-brace max hit of 10:

In other words, this means that it's impossible to hit a 5 and an 11 with the CW brace effect (disregarding protection prayers, SotD spec, etc.).

I would not be surprised if this mechanic applies elsewhere (certain special attacks?), but I haven't done further testing.

This mechanic occurs quite often. It's the difference between an increased max hit before the damage roll and a bonus to the actually rolled damage.

The former bonuses are listed in 3.4a and the latter in 3.4b.

**Combat Formulas**

*@Bitter koekjeRS*

15-Feb-2019 16:03:10 - Last edited on 15-Feb-2019 16:03:49 by Bitterkoekje

I'm interested on how the actual calculation of hitting the next hit or not works, rather than overall chance to hit.

Is it if(random(0;maxattackroll) > random(0;maxdefenceroll)) then hit random(0;maxhit) else hit(0), or something completely different?

Is it if(random(0;maxattackroll) > random(0;maxdefenceroll)) then hit random(0;maxhit) else hit(0), or something completely different?

02-Mar-2019 20:13:04

Based on the current formula for opal dragon bolts (e) special attack, at 112 ranged versus protect from range, it shouldn't be possible to hit below an 11 (disregarding other damage modifiers). From testing, I found that it is indeed possible to hit below an 11 in that circumstance. I believe the additive effect from the special attack is subject to the 0.6 damage modifier against the overhead prayer.

In the circumstance of:

112 ranged, ACB on rapid with rigour versus protect from range

The range of bolt effect hits from this formula should be 11 through 36.

However, from limited testing, I'm assuming the range should be 6 through 31.

In the circumstance of:

112 ranged, ACB on rapid with rigour versus protect from range

The range of bolt effect hits from this formula should be 11 through 36.

However, from limited testing, I'm assuming the range should be 6 through 31.

18-Mar-2019 21:07:03 - Last edited on 18-Mar-2019 21:30:21 by Downlifter

Could you add trapped soul to the nmz calculator?

12-Apr-2019 15:59:08

Hey, thanks for the great information.

Where does the Dragon hunter lance fit into the formula?

Thanks

Where does the Dragon hunter lance fit into the formula?

Thanks

30-May-2019 17:56:09

Excuse me if I am misunderstanding these formulae, but the math here

• If the max attack roll is higher:

Accuracy = 1 - (def+2) / (2*(atk+1))

• Or else:

Accuracy = atk / (2*(def+1))

assumes that you roll random integers in the inclusive sets [0,

This means that for

However, I believe it would make more sense that the rolls are [0,

This should lead to the following, simpler and more elegant formulae:

• If the max attack roll is higher:

Accuracy = 1 - (def+1) / (2*atk)

• Or else:

Accuracy = (atk-1)/ (2*def)

From a programming perspective, I very much think this is more likely to be the case. Java's native Math.random() yields a float greater than or equal to 0 and less than 1, meaning floor(Math.random()*N) would generate

Even if this isn't the exact implementation, with any implementation they would have to be

Would love to hear your thoughts on this: whether or not you have considered this issue and if so, what would lead you to believe contrary to my assertions.

**Bitterkoekje**said:5.6 |

Hit chance• If the max attack roll is higher:

Accuracy = 1 - (def+2) / (2*(atk+1))

• Or else:

Accuracy = atk / (2*(def+1))

assumes that you roll random integers in the inclusive sets [0,

__def__] and [0,__atk__], and if the__atk__roll is greater than the__def__roll then the attack will land, correct?This means that for

__N__=__atk__(or__N__=__def__, respectively), there are__N__+1 possible rolls that could be yielded from either roll.However, I believe it would make more sense that the rolls are [0,

__def__) and [0,__atk__), where the sets are exclusive of__N__and the possible rolls are {0, 1, 2, ... , N-1}. This means that there would be__N__possible values rolled instead of__N__+1, which would emulate tossing an__N__-sided die.This should lead to the following, simpler and more elegant formulae:

**Bea5**said:• If the max attack roll is higher:

Accuracy = 1 - (def+1) / (2*atk)

• Or else:

Accuracy = (atk-1)/ (2*def)

From a programming perspective, I very much think this is more likely to be the case. Java's native Math.random() yields a float greater than or equal to 0 and less than 1, meaning floor(Math.random()*N) would generate

__N__possible values and lead to the formulae I am arguing for.Even if this isn't the exact implementation, with any implementation they would have to be

*deliberately adding 1*to__N__in order to generate__N__+1 possible values, which your formulae suppose.Would love to hear your thoughts on this: whether or not you have considered this issue and if so, what would lead you to believe contrary to my assertions.

03-Jun-2019 16:21:47 - Last edited on 04-Jun-2019 04:08:20 by Bea5

I've found higher up in the thread where this issue is addressed

2. I believe the formulas in section 8.6 are slightly wrong. Assume an example where the maximum roll for both attacker and defender is 1. The only way for the attacker to win is if he rolls 1 and the defender rolls 0, which would be 1/4 chance, however the current formula suggest that the chance is 0. This can be fixed by adding 1 to Atk and Def.

Although your formulas give very accurate results in pretty much all proper cases, I thought it's still worth mentioning.

2. You're right. I forgot to take this into account. I'll add +1 to every roll variable in 8.6.

However, I think this is a very poor assumption. It is perfectly reasonable to assume that if the max roll of both an attacker and a defender is 1, then the attacker will never land a hit. This is simply a byproduct of the fact that, for an attack to land, the attack roll has to be

The difference in the two models would be noticeable at very low accuracies. Currently, the lowest maximum attack roll you can achieve is 8, by brewing to 0 stats and having -63 equipment bonus. At these levels, one should expect the two models to approach a ~14.2% difference in accuracy as a monster's defences increases.

The best monster I can find to test on is chickens, as they have low enough defence to get an adequate sample size in a reasonable amount of time, yet should still yield a 13% difference between the models. 10 hours of attacking chickens should be enough to be able to determine accuracy at these levels.

**Woox**said:2. I believe the formulas in section 8.6 are slightly wrong. Assume an example where the maximum roll for both attacker and defender is 1. The only way for the attacker to win is if he rolls 1 and the defender rolls 0, which would be 1/4 chance, however the current formula suggest that the chance is 0. This can be fixed by adding 1 to Atk and Def.

Although your formulas give very accurate results in pretty much all proper cases, I thought it's still worth mentioning.

**Bitterkoekje**said:2. You're right. I forgot to take this into account. I'll add +1 to every roll variable in 8.6.

However, I think this is a very poor assumption. It is perfectly reasonable to assume that if the max roll of both an attacker and a defender is 1, then the attacker will never land a hit. This is simply a byproduct of the fact that, for an attack to land, the attack roll has to be

*strictly greater than*the defence roll. This should be an*expectation*of the combat mechanics and*not*a perceived error. This is only my opinion, of course.The difference in the two models would be noticeable at very low accuracies. Currently, the lowest maximum attack roll you can achieve is 8, by brewing to 0 stats and having -63 equipment bonus. At these levels, one should expect the two models to approach a ~14.2% difference in accuracy as a monster's defences increases.

The best monster I can find to test on is chickens, as they have low enough defence to get an adequate sample size in a reasonable amount of time, yet should still yield a 13% difference between the models. 10 hours of attacking chickens should be enough to be able to determine accuracy at these levels.

03-Jun-2019 22:11:25 - Last edited on 04-Jun-2019 21:38:22 by Bea5

Quick find code: **317-318-712-65587452**Back to Top