View Single Post
  #2  
Old 11-22-2011, 06:15 PM
mitra mitra is offline
Approved Member
 
Join Date: Mar 2008
Location: Milano
Posts: 668
Default

Quote:
Originally Posted by Goblin Wizard View Post
I know a little about programming. Let me know where I should look for. If I have any problems I ask again.
1 - open editor.exe
2 - from the menu of editor select "editor script->states machines"
3 - you will see a list of aix files and a button edit
4 - every aix files contains the battle mechanics and the AI routines: example
west europe global.aix contains AI routines, west europe group.aix the routine for group factors in battle, all the others manage routines of single soldiers or objects (open one of them with edit).
5 each aix contains different states which are a logical block of code (something similar to a class), the states are called in a logical sequence starting from a the state main. THe state have names sufficient speaking for understand what they do, wihtout reading all the before.

Quote:
Originally Posted by Goblin Wizard View Post
I don't want to argue with you so I'll give you an example from one of my latest battles:
AI took defensive positions and stood still. I set my units in line in front of AI's line. AI didn't want to attack first so I sent one of my archers on the enemy flank and started to shoot. 1st unit was reduced by more than 50%...2nd unit was reduced by more than 50%.. when the 3rd unit was close to 50% of loses AI started to react but it was far too late. My archers were firing from the short range and from the flank so they killed more than 250 enemy soldiers without loosing even one man. AI had archers too but from the unknown reasons decided not to shoot or react in any other way. How would you call that type of behavior?
This is the behaviour of peasants armies, the ai in game has three behaviour preset, defensive, aggressive, free (you can set it manually in custom battle). Depending from the situation or army type on the campaign map you has different behaviour. Anyway if you read the scripts you will see how logic the AI apply in reaction to situations.
Reply With Quote