Page 1 of 1

How does Calc_Accuracy work?

Posted: Tue Feb 20, 2024 10:59 pm
by ann
There was a friendly discussion in game today where someone asked the chance of hitting a zero on a cow!

I ran the command ::Calc_accuracy 1154 (kalphite soldier) and the following result came out:
Calculate Accuracy: 14448
NPC defence: 70
Calculate Defence: 6230

How do you interpret this? Kirabaya said you would likely have to look into the code for answers.

Re: How does Calc_Accuracy work?

Posted: Tue Feb 20, 2024 11:47 pm
by aweinstock

Re: How does Calc_Accuracy work?

Posted: Wed Feb 21, 2024 1:27 am
by ann
I think I got it!
I've added a screenshot of my spreadsheet for reference.
While this is nice, it would be great if the command could return the percentage instead of component values.
Edit: I see chance to hit is calculated differently for ranged style and magic which complicates things. I now understand why the command was implemented in the way it was.

Image