Greyface's Might andMagic 6 Game Mechanics page,
https://sites.google.com/site/sergroj/mm/mechanics
and Bones' Combat Guide
http://www.angelfire.com/nt/bones/chance.html
both give alogirthms for calculating the Chance to Hit in Might and Magic VI. However, the two methods are incompatible and produce different results. Greyfaces is a simple calculation of the chance which produces reasonable results, while Bones produces a method for enacting combat in the game which seems more realistic but would not come to the same effect.
Which is the method used in the game? I will disassemble the releant parts of the exe at the weekend if nobody knows.
MM6: Chance to Hit
Mine comes from decompiling the game.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
- tomchen1989
- Pixie
- Posts: 136
- Joined: 21 Jun 2008
- Location: Europe / China
Re: MM6: Chance to Hit
Bones' alogirthms for calculating the chance to hit as well as the resistance are also available here:
http://telp.org/files/resistance.zip
http://telp.org/files/tohit.zip
I checked out, the alogirthm of resistance is exactly the same as GrayFace's.
But the chance to hit's alogirthm is a little different.
GrayFace's formula is:
(15 + PlayerAttack*2)/(30 + PlayerAttack*2 + MonsterArmorClass)
Bone's is:
(PlayerAttack*2+MonsterArmorClass*(1-n)+(30-15*n)+ABS(PlayerAttack*2+MonsterArmorClass*(1-n)+(30-15*n)))
/(PlayerAttack*4+MonsterArmorClass*2+60)
where n = 1 (short range), 1.5 (medium range) or 2 (long range)
which is equivalent to:
When at short range, Bone's and GrayFace's formula are the same one.
At medium/long range, Bone's seems reasonable, while GrayFace's doesn't have and might need to add these specific circumstances.
http://telp.org/files/resistance.zip
http://telp.org/files/tohit.zip
I checked out, the alogirthm of resistance is exactly the same as GrayFace's.
But the chance to hit's alogirthm is a little different.
GrayFace's formula is:
(15 + PlayerAttack*2)/(30 + PlayerAttack*2 + MonsterArmorClass)
Bone's is:
(PlayerAttack*2+MonsterArmorClass*(1-n)+(30-15*n)+ABS(PlayerAttack*2+MonsterArmorClass*(1-n)+(30-15*n)))
/(PlayerAttack*4+MonsterArmorClass*2+60)
where n = 1 (short range), 1.5 (medium range) or 2 (long range)
which is equivalent to:
Code: Select all
if at short range ( 0 to 40 feet ):
(PlayerAttack*2+15)/(PlayerAttack*2+MonsterArmorClass+30)
if at medium range ( 40 to 200 feet ):
if PlayerAttack*2-MonsterArmorClass/2+22.5>0:
(PlayerAttack*2-MonsterArmorClass/2+22.5)/(PlayerAttack*2+MonsterArmorClass+30)
else:
0
if at long range ( 200 to 320 feet ):
if PlayerAttack*2-MonsterArmorClass>0:
(PlayerAttack*2-MonsterArmorClass)/(PlayerAttack*2+MonsterArmorClass+30)
else:
0
At medium/long range, Bone's seems reasonable, while GrayFace's doesn't have and might need to add these specific circumstances.
Last edited by tomchen1989 on 26 Aug 2017, 19:35, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 65 guests