Map Database  •  FAQ  •  RSS  •  Login

How attacks work?

<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 21 Aug 2013, 13:10

How attacks work?

I wanted to ask mapmakers of KaM about how attacks worked in KaM. There are some parameters we fill up, take TSK18 for example:

!SET_AI_ATTACK TYPE 1
!SET_AI_ATTACK TOTAL_AMOUNT 35
!SET_AI_ATTACK TARGET 3
!SET_AI_ATTACK POSITION 115 91
!SET_AI_ATTACK COUNTER 36000
!SET_AI_ATTACK TROUP_AMOUNT 0 0
!SET_AI_ATTACK TROUP_AMOUNT 1 0
!SET_AI_ATTACK TROUP_AMOUNT 2 0
!SET_AI_ATTACK TROUP_AMOUNT 3 3
!COPY_AI_ATTACK 0

The question is - how AI should choose which troops to take to attacks and how many? The script asks for 35 archers and 3 groups, how exactly is that works (e.g. AI has groups of 20 men, or of 5 men)
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
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 21 Aug 2013, 13:24

Re: How attacks work?

i thought the mapmaker had to calculate himself how many troops has to attack based on the group formations he made. but wasn't it so that only units from the backline attacks? because as far as i know when the script asks for 35 archers and there are 3 groups of 15 (=45) he will send all 45 of them. but i could be wrong here, i guess tdl , ben or to can provide more valuable insight.
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

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 21 Aug 2013, 14:00

Re: How attacks work?

Disco is right.
If the AI has 35 or more soldiers divided into three groups or more, it will send exactly 3 groups that have 35 soldiers or more. If AI has less than 35 soldiers, it will never attack. If AI has 100 cavalry units (the script asks for cavalry, not for ranged units), but only 10 per group, it will never get the requirements to attack (35 in 3 groups) either. So TOTAL_AMOUNT and TROUP_AMOUNT should be chosen in accordance with TROUP_PARAM.
So the AI will always send the exact number of groups; the amount of soldiers will be equal OR higher to TOTAL_AMOUNT, but never lower.

Return to “Feedback / Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests