How does Calc_Accuracy work?

General discussion
Post Reply
User avatar
ann
Noob
Posts: 11
Joined: Sat Feb 10, 2024 3:12 pm
Has thanked: 10 times
Been thanked: 5 times

How does Calc_Accuracy work?

Post 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.
User avatar
aweinstock
Developer
Posts: 31
Joined: Thu Aug 11, 2022 1:17 am
Been thanked: 14 times

Re: How does Calc_Accuracy work?

Post by aweinstock »

User avatar
ann
Noob
Posts: 11
Joined: Sat Feb 10, 2024 3:12 pm
Has thanked: 10 times
Been thanked: 5 times

Re: How does Calc_Accuracy work?

Post 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
Post Reply