View previous topic :: View next topic |
Author |
Message |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Wed Jun 13, 2007 9:39 am Post subject: Aim Question |
|
|
I am having some difficulty with the Aim stat.
First, let me stat that I have read the How is the attack dodge rate calculated? article, so I sort-of know what I'm doing (hah! maybe).
Anyway, I have a hero with an Aim of 54 fighting enemies with an average Dod of 90. During approximately 30 attacks with a normal success rating, only 1 failed.
If a normal attack would have Aim * 4 ~ Dod, then I have approximately 200 ~ 90 within 75% randomization.
That gives an Aim of 50 - 350 vs. a Dod of 22 - 158. That's not a very large overlap.
Am I calculating all this correctly? I seem to remember hearing a long time ago that, if Aim = Dod, about 4 out of five attacks should succeed. |
|
Back to top |
|
 |
haappy-aardvark aka Eagtile

Joined: 29 May 2007 Posts: 19 Location: SK, Canada
|
Posted: Wed Jun 13, 2007 11:45 am Post subject: |
|
|
I have found that if you want attacks to ever miss in your game, you're better off making all attacks have 'poor' aim (Aim*2 vs Dodge) in the attack editor. Your calculation to find the ranges is fine, but I think that, if you work out the % chance that aim exceeds dodge, it will be fairly high. I would guess about 85-90%.
Consider Aim*4 vs. Dodge: Both stats are 100.
####Calculation 1####(based on "how is the dodge rate calculated?")
We get 400 vs. 100
With 75% randomization, we get 100-700 vs. 25-175
Let's calculate this from the dodge point of view, since the range is smaller.
Out of ~150 possible results (25 to 175)...
~50% (74/150 results, 25 to 99) will never be a miss (aim always >99)
for the other ~50%, you have to consider the aim stat
100 is a miss 1/600 times (if aim stat randomizes to 100)
101 is a miss 2/600 times (if aim stat randomizes to 100 or 101)
102 is a miss 3/600 times (etc.)
...
173 is a miss 74/600 times
174 is a miss 75/600 times
175 is a miss 76/600 times
This means that (38 * 77/600) = 4.877 times out of 150, it's a miss.
Or misses 3.25% of the time. So the 4/5 times stat you heard is incorrect.
Back in the day, I remember hearing that too.
#### ####
Now let's consider Aim*2 vs. Dodge (poor aim): Both are 100.
####Calculation 2####(based on "how is the dodge rate calculated?")
We get 200 vs. 100
With 75% randomization, we get 50-350 vs. 25-175
Let's calculate this from the dodge point of view, since the range is smaller.
Out of ~150 possible results (25 to 175)...
~17% (24/150 results, 25 to 49) will never be a miss (aim always >49)
for the other ~83%, you have to consider the aim stat
50 is a miss 1/300 times (if aim stat randomizes to 50)
51 is a miss 2/300 times (if aim stat randomizes to 50or 51)
52 is a miss 3/300 times (etc.)
...
173 is a miss 124/300 times
174 is a miss 125/300 times
175 is a miss 126/300 times
This means that (63 * 127/300) = 26.67 times out of 150, it's a miss.
Or misses 17.78% of the time. This means missing happens fairly often.
#### ####
It doesn't take a calculation to see that terrible aim (Aim vs. Dodge) has a hit rate of 50% when both stats are equal. I personally prefer a miss rate of about 30-35%, or 1/3 of the time. That way, spells and equipment that pump aim or dodge actually matter. I could go through another calculation, but it's really not necessary. To get a miss rate in that range, an enemy's dodge stat should be about 1.15 times the hero's aim value, and the enemy's aim stat should be about 0.87 times the hero's dodge value. Oh... and of course, all attacks need to have 'poor' aim.
(Yes, I did have a lot of time on my hands one afternoon to go through these calculations. I'm pretty sure they're correct [or at least close], because I get the results I want when playing my game.)
Hope that helps... it's pretty confusing stuff. _________________ A sheep doesn't get to do anything! |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Wed Jun 13, 2007 12:28 pm Post subject: |
|
|
In your example:
if (random(50,350)>>158) then hit # (158/301 = 64% base)
else # 100 - 64 = 36%
if (random(22,158)<<50) then hit # (28/137 = 20% base)
else # .36 * .8 = 29
else if (random(50,158) >> random(50,158)) then hit # 50% base
So your aggregate hit% should be roughly 29 * .5, or 15%. 29/30 success is a bit high, but it's not a huge sample size.
Or maybe my math's off? That's been known to happen. _________________
|
|
Back to top |
|
 |
Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Thu Jun 14, 2007 12:04 pm Post subject: |
|
|
Hmmm...makes sense.
Thanks for the advice. I've reduced my attack success rate to poor and it works better (where "better" is defined as "worse"!).
The calculation in the article made little sense to me -- it seems as if it's a complicated way of stating: Code: | if(random(low, high) => random(low, high)) |
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jun 16, 2007 12:59 am Post subject: |
|
|
Actually, the 'Battles' HOWTO article quotes some figures for hit rates with each of Normal, Poor, and Bad. But I think those numbers are just made up (bad James!). I think we could do with a php form to calculate hit rates. To calculate the exact hit rate, you need to know where the engine starts introducing rounding errors and the like... _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Jun 16, 2007 9:05 am Post subject: |
|
|
I doubt a 2% margin of error is really going to make a difference. The script would be neat even if it weren't 100% precise. _________________
|
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Jun 18, 2007 6:57 am Post subject: |
|
|
The Mad Cacti wrote: | Actually, the 'Battles' HOWTO article quotes some figures for hit rates with each of Normal, Poor, and Bad. But I think those numbers are just made up (bad James!). I think we could do with a php form to calculate hit rates. To calculate the exact hit rate, you need to know where the engine starts introducing rounding errors and the like... |
Why not build the calculator right into custom? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Jun 18, 2007 7:48 pm Post subject: |
|
|
Beats mucking around with php. But where would we put it? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Jun 19, 2007 7:45 am Post subject: |
|
|
The Mad Cacti wrote: | Beats mucking around with php. But where would we put it? |
*shrug*
Perhaps we could add under the attack editor menu or the damage setting submenu. There are other things that could be simulated in the same calculator, like defense. |
|
Back to top |
|
 |
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Tue Jun 19, 2007 7:52 am Post subject: |
|
|
How would this work? Would the user actually be able to type in arbitrary values for an aim stat and a dodge stat, and then the calculator works it out based on whatever aiming choice is chosen on the given attack? This sounds very helpful. _________________ My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161
This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com |
|
Back to top |
|
 |
|