Map Database  •  FAQ  •  RSS  •  Login

Custom campaigns and AI in Remake

<<

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 2012, 10:21

Custom campaigns and AI in Remake

As the new release is approaching and I'm trying to finish a multiplayer map before the moment is there, I intend to update The New Lands for a future release. However, I'm aware the AI isn't the same as in TPR/TSK. Could someone (Krom or Lewin probably) explain to me what is different? It would save me a lot of testing.
Also, I could come up with a list of desired new script commands and other campaign-related stuff but I won't bother you with that right now. :P
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 21 Aug 2012, 13:11

Re: Custom campaigns and AI in Remake

Lewin is in charge of scripted AI, I hope he is on-line tomorrow and will answer in detail :)
Would be nice to have that differences list sticked somewhere.

There are already some new commands you would like to take advantage of, again - Lewin knows better.
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
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 22 Aug 2012, 01:36

Re: Custom campaigns and AI in Remake

Okay here we go:
1. AI will not command soldiers that are not in scripted defence positions. Even if the town right next to them is under attack they will just sit there. They WILL take part in scripted attacks however. I see this as a bug that should be fixed, in KaM troops would help out if something nearby was under attack.
2. You can control the rate at which the AI equips soldiers using !SET_AI_CHARACTER EQUIP_RATE <TICKS> where 1 tick = 1/10 of a second, so 1000 = 100 seconds.
3. AI will not train soldiers unless there is a need for it (i.e. there is a defence position that is empty/not full). This means if you make an AI with no defence positions, he will make a big village and start producing weapons but never train any soldiers because he doesn't see any need for them :P
4. AI will not move soldiers or attack during peacetime, he will feed them though (like a human player)
5. AI will pursue you mercilessly if you shoot at him, in KaM they would walk to where you used to be, then stop, then come after you again. This means archers can't outrun cavalry easily.
6. As soon as an attacking group of soldiers becomes "idle" they will be taken home and placed in a defence position if there is an available one, otherwise they will just sit there wondering what to do. This means if they are pursuing a group of archers, once they've made one strike and the archer moves out of range they will become "idle" and go home. (this should be fixed by making pursuing keep following the group even after hitting them once, because it's annoying for human players too)
7. If you have attacks over a long distance with lots of troops the game will lag noticeably when the attack is ordered because all the units have a path calculated at the same time. (also something we want to fix)

I could have missed something, if you have any questions please just ask. I know the AI behaviour in the Remake quite well.

Krom is working on a new AI system called the General which will interface with the old system by automatically placing defence positions as the village they build expands, and order attacks when they think they are strong enough. The goal of this is to have a completely independent AI in multiplayer that requires nothing special like AI script commands. Of course the General will only be used for AIs like this, the original campaigns will use the instructions in the script (except for maybe the builder AI in TSK 9, it doesn't have scripted defence/attacks as far as I know).

Unfortunately our AI is still changing a bit, as you can see I've listed some things above that should be improved. It would be awesome to see The New Lands in the Remake eventually, but I won't blame you if you decide to wait until it's more finalised :)
Cheers,
Lewin.
<<

Guest

Post 22 Aug 2012, 14:37

Re: Custom campaigns and AI in Remake

Krom is working on a new AI system called the General which will interface with the old system by automatically placing defence positions as the village they build expands, and order attacks when they think they are strong enough. The goal of this is to have a completely independent AI in multiplayer that requires nothing special like AI script commands. Of course the General will only be used for AIs like this, the original campaigns will use the instructions in the script (except for maybe the builder AI in TSK 9, it doesn't have scripted defence/attacks as far as I know).
Could you tell a bit more about the new AI system that you're working on? I'm interested in AI development in general and your project looks like a perfect place for it. May be there is an opportunity to help you?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 22 Aug 2012, 15:46

Re: Custom campaigns and AI in Remake

Could you tell a bit more about the new AI system that you're working on? I'm interested in AI development in general and your project looks like a perfect place for it. May be there is an opportunity to help you?
Krom wrote a bit about it here:
viewtopic.php?f=26&t=1060

What experience do you have? What things interest you most?
<<

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 22 Aug 2012, 16:14

Re: Custom campaigns and AI in Remake

I have a question too - I could make 3 different scripts for every mission: easy, medium and hard. I could add or remove troops, attacks, or wares from storehouses, I could make players more or less agressive, I could make players train recruits faster or slower, there are endless possibilities; but would it be useful? Or are difficulty settings already planned (differences in AI behaviour)?
<<

GreedyMex

Peasant

Posts: 1

Joined: 22 Aug 2012, 14:28

Post 23 Aug 2012, 10:25

Re: Custom campaigns and AI in Remake

Krom wrote a bit about it here:
viewtopic.php?f=26&t=1060
Thanks. I found it just right after I asked the question )
What experience do you have? What things interest you most?
I have about 5 years of professional programming experience. I was working as a web programmer for 3 years (php, javascript, actionscript, python). And now I'm a C/C++ programmer. I haven't programmed Pascal since studying in the university but I had used delphi and object pascal during this time. So I know the language.

Game AI is just my hobby for now. I have a lot of theoretical knowledge about it. I can not boast myself about having much practice with it. Can not tell you about the main interest because it's difficult to single out any specific thing. Designing and programming AI as a whole is the best answer that I could find :)
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 23 Aug 2012, 11:39

Re: Custom campaigns and AI in Remake

@GreedyMex: Feel free to contact me on ICQ (106696203)/Skype (kromster80) so we could start collaboration :)
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
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 23 Aug 2012, 12:50

Re: Custom campaigns and AI in Remake

I have a question too - I could make 3 different scripts for every mission: easy, medium and hard. I could add or remove troops, attacks, or wares from storehouses, I could make players more or less agressive, I could make players train recruits faster or slower, there are endless possibilities; but would it be useful? Or are difficulty settings already planned (differences in AI behaviour)?
We haven't decided how difficulty could work. We could just scale factors like EQUIP_RATE and stuff, but obviously it's better if the person making the mission can choose those things for himself. But I really doubt many people will bother doing it like that unless the editor supports it, and I don't think we can make the editor support it in a user friendly WYSIWYG way which is what we are aiming for.

So I think we'll just make the difficulty changes somewhat automatic (scaling parameters like EQUIP_RATE), but we haven't put much thought into it. We're interested in your opinion of course :)
<<

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 23 Aug 2012, 13:20

Re: Custom campaigns and AI in Remake

Hm yes, those are changes in the script, I could do that myself. What I was thinking of was different AI's (plural artificial intelligences? :P). For example, if you attack an AI player with an archer, an easy AI might not chase you at all, a medium AI chases you until the unit is dead or the pursuers are dead and a hard AI would maybe even do things like chasing and calculating enemy troops within a radius, and if there are too many troops he would retreat.
I do not know if it's possible in terms of CPU-use but I'm just throwing an example at you. Difficulty could be added by scripting but also by making 3 different AI's, one being as smart as possible, one being a little dumb and one between them. :P I can imagine that would be a lot of work but I guess it's needed for multiplayer AI's anyway (at least for building towns).
Then again, it would be no problem for me to make 3 scripts for every mission. But would that somehow be supported by Remake? Like when you select The New Lands from the campaign menu you can choose which difficulty you want to play on?

Return to “Ideas / Suggestions”

Who is online

Users browsing this forum: No registered users and 11 guests