How is the attack dodge rate calculated?
From OHRRPGCE-Wiki
Accuracy varies on the Aim Math setting in the Edit Attacks -> Damage Settings... menu. Unfortunately, the OHRRPGCE's hit chance determination is complex and does not give users any help with balancing at all.
First, find the offensive value
- Bad : Aim * 1 of attacker
- Poor : Aim * 2 of attacker
- Normal : Aim * 4 of attacker
- Magic : Magic of attacker
Next, the defensive value
- Bad, Poor and Normal : Dodge of defender
- Magic : Will * 1.25 of defender
- Never Misses : 0
Randomize both values to within +/- 75% Now, if the offensive number is higher than defense, the attack hits, otherwise it misses.
If you have the source code, you can look at the details, currently in inflict in bmodsubs.bas.
Your best bet for calculating the actual hit chances for attacks is to use a utility ( OHRaim by DukeofDellot). This doesn't change the fact that you should always thoroughly test the actual in-game result!
[edit] Calculation Example
Lets say that your hero has an Aim of 20 and attacks an animated towel with a Dodge of 16 with an attack with Normal aim math.
20 * 4 vs 16 => 80 vs 16
Now consider the randomisation, which is 75% of each value
80 +/- 60 vs 16 +/- 12 => 20 - 140 vs 4 - 28
You can see that the overlap here is not very much, so the attack will probably hit. How exactly do you work out the chance to hit? Not easily at all...
if (random(20,140) => 29) then (hit) 111/120 = 92.5%
else ( (100% - 92.5%) = 7.5%
if (random(4,28) << 20) then (hit) 15/24 = 62.5%
else ( 7.5% * (100% - 62.5%) = 2.8%
if (random(20,28) >> random(20,28)) then (miss) 50%
) )
total chance to hit = 100% - 2.8% * 50% = 98.6%
(Note: rounding and strict equality ignored for simplicity, in fact this calculation is not too accurate)
