Map Database  •  FAQ  •  RSS  •  Login

Damage formula

<<

GWigWam

Post 08 Jan 2015, 21:57

Damage formula

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

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 09 Jan 2015, 09:17

Re: Damage formula

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.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 09 Jan 2015, 09:41

Re: Damage formula

The code with the formula is in here: https://code.google.com/p/castlesand/so ... nFight.pas see line 282+
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

GWigWam

Post 09 Jan 2015, 10:28

Re: Damage formula

Thank you both, I think I get it now :)
<<

Uziman

Post 21 Jan 2015, 16:53

Re: Damage formula

I once had a battle, where 2 militia units killed a knight. weird, right?
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 21 Jan 2015, 18:58

Re: Damage formula

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.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Killer!!

Sword Fighter

Posts: 263

Joined: 01 Sep 2013, 10:51

KaM Skill Level: Skilled

Location: On my chair

Post 21 Jan 2015, 19:07

Re: Damage formula

So technically 1 militia is also possible to kill 100 knights without been killed itself?! :D
Do you want to play with/against me? Just write me a PM :D
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 21 Jan 2015, 19:10

Re: Damage formula

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
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

Ben

User avatar

Former Site Admin

Posts: 3814

Joined: 08 Jan 2009, 23:00

Location: California - Pacific Time (UTC -8/-7 Summer Time)

Post 21 Jan 2015, 19:23

Re: Damage formula

I've seen 1 militia kill a knight on majestic waters. Good times!
I used to spam this forum so much...
<<

Everstill

Farmer

Posts: 24

Joined: 21 Jan 2015, 16:59

KaM Skill Level: Skilled

Post 23 Jan 2015, 18:42

Re: Damage formula

@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!
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 23 Jan 2015, 19:22

Re: Damage formula

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) :)
<<

Everstill

Farmer

Posts: 24

Joined: 21 Jan 2015, 16:59

KaM Skill Level: Skilled

Post 24 Jan 2015, 16:15

Re: Damage formula

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?
<<

Esthlos

User avatar

Knight

Posts: 676

Joined: 23 Jun 2013, 16:02

KaM Skill Level: Beginner

Post 26 Jan 2015, 12:01

Re: Damage formula

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-
Last edited by Esthlos on 26 Jan 2015, 16:10, edited 1 time in total.
Just when you think you know something, you have to look at it in another way, even though it may seem silly or wrong. You must try! - John Keating, "Dead Poets Society"
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 26 Jan 2015, 13:21

Re: Damage formula

Gj Esthlos, is there value for directions?
<<

Roastix

User avatar

Laborer

Posts: 13

Joined: 20 Jan 2015, 19:18

KaM Skill Level: Average

Post 26 Jan 2015, 13:33

Re: Damage formula

rebels have more attack vs horses then lances? didnt know that. but it is a good overview. gj

Return to “General Talk”

Who is online

Users browsing this forum: Google [Bot] and 11 guests