Page 1 of 3

Damage formula

PostPosted: 08 Jan 2015, 21:57
by GWigWam
Hello KaM fans,

I was poking around a bit with Merchator's Uniteditor which gives you a good overview of the stats of different units since that isn't really clear form the UI. I still have a hard time comparing them though because I hardly have an idea how damage is calculated. All I could find is that there is some random factor involved and you do 5(?) times damage from behind.

How is it for instance possible for units to have 35 attack but then only 2/3 hitpoints??? I really don't get it.

Does anyone know the damage forumula, or have a link where I can find out?

Thanks in advance,
GWigWam

Re: Damage formula

PostPosted: 09 Jan 2015, 09:17
by The Dark Lord
Hello GWigWam,

There is a thread somewhere on this forum about it; you may be able to find it using the search function.
I don't exactly know how the fighting system works, but I believe this is the bottomline: the 'attack' a unit has is not the amount of hit points that are subtracted from the attacked unit's hit points when he strikes, it is merely the chance of 'hitting', thereby reducing the attacked unit's hit points by 1.
This also explains why a militia can beat a knight: if there is a chance, then there is also luck.

Re: Damage formula

PostPosted: 09 Jan 2015, 09:41
by Krom
The code with the formula is in here: https://code.google.com/p/castlesand/so ... nFight.pas see line 282+

Re: Damage formula

PostPosted: 09 Jan 2015, 10:28
by GWigWam
Thank you both, I think I get it now :)

Re: Damage formula

PostPosted: 21 Jan 2015, 16:53
by Uziman
I once had a battle, where 2 militia units killed a knight. weird, right?

Re: Damage formula

PostPosted: 21 Jan 2015, 18:58
by Krom
Weird, but technically possible. Unlike many other RTS games, KaM combat is guided by probabilities and their chances, so sometime, in 00.1% of cases 2 militias can indeed kill a knight.

Re: Damage formula

PostPosted: 21 Jan 2015, 19:07
by Killer!!
So technically 1 militia is also possible to kill 100 knights without been killed itself?! :D

Re: Damage formula

PostPosted: 21 Jan 2015, 19:10
by Esthlos
So technically 1 militia is also possible to kill 100 knights without been killed itself?! :D
It is.
The chance though is probably lower than that of winning a lottery... :P

Re: Damage formula

PostPosted: 21 Jan 2015, 19:23
by Ben
I've seen 1 militia kill a knight on majestic waters. Good times!

Re: Damage formula

PostPosted: 23 Jan 2015, 18:42
by Everstill
@Krom, can you please inform the Unit Stats in KnM Remake? I tried to find, but I found nothing.

For example:
Militia
HP: 1
Armor: 1

Axe Soldier
HP: 2
Armor: 2 (+1 against arrows)

etc...

Thanks in advance!

Re: Damage formula

PostPosted: 23 Jan 2015, 19:22
by RandomLyrics
Unmounted: 2 HP, on 3rd they die
Mounted: 3 HP, on 4th die
Its kinda like this:
ChanceToHit % =( Attack * Direction ) / Defence. Defence offcours of the attacked enemy.
Every successful Hit takes 1 HP.
Better for info will be table with every units chance to hit (with direction and target's armor) :)

Re: Damage formula

PostPosted: 24 Jan 2015, 16:15
by Everstill
Unmounted: 2 HP, on 3rd they die
Mounted: 3 HP, on 4th die
Its kinda like this:
ChanceToHit % =( Attack * Direction ) / Defence. Defence offcours of the attacked enemy.
Every successful Hit takes 1 HP.
Better for info will be table with every units chance to hit (with direction and target's armor) :)
Yes, that's what I want, a table with every unit Attack value, Defense, HP and Attack Speed.

For example, I know Archer is weaker in Remake, but what changed?

Re: Damage formula

PostPosted: 26 Jan 2015, 12:01
by Esthlos
Yes, that's what I want, a table with every unit Attack value, Defense, HP and Attack Speed.

For example, I know Archer is weaker in Remake, but what changed?
In r6720:
-EDIT: moved to the next page with the rest, for ease of use-

Re: Damage formula

PostPosted: 26 Jan 2015, 13:21
by RandomLyrics
Gj Esthlos, is there value for directions?

Re: Damage formula

PostPosted: 26 Jan 2015, 13:33
by Roastix
rebels have more attack vs horses then lances? didnt know that. but it is a good overview. gj