Page 1 of 1

Set the default AI players

Posted: Mon Mar 05, 2018 12:54 pm
by baltazar
Hi. I'm playing with AI from time to time and I'm getting tired with having to set the nations and AI difficulty levels manually each time I start new game. Is it possible to save the AI players list I preset, so that they appear automatically when I click "Start New Game"? I'm not talking about the number, but AI difficulty (per AI), nations, leaders' names and colors.

Re: Set the default AI players

Posted: Mon Mar 05, 2018 1:10 pm
by cazfi
I don't think you can get the colors set, but for leader names and nations derived from them you could write a set of "create" and difficulty setting server commands to a file and run that with "/read <file>" when ever you want that set of AI players created.
e.g: ai_players.serv:

Code: Select all

create Hammurabi
hard Hammurabi
To client chatline:

Code: Select all

/read ai_players.serv

Re: Set the default AI players

Posted: Mon Mar 05, 2018 2:41 pm
by Arbogast
Hey, that's a good tip.
I agree wholly with baltazar's comments. Now my question of course:
Cazfi: Could you expand a bit on how to go about it? From your "Code" example, you need to include the AI difficulty, but how do add the nations? More AIs?

Re: Set the default AI players

Posted: Mon Mar 05, 2018 7:24 pm
by Alien Valkyrie
I don't think setting the nation is possible via commands. Setting the color, however, is:

Code: Select all

set plrcolormode PLR_SET

create AnAIPlayer
playercolor AnAiPlayer ff0000

Re: Set the default AI players

Posted: Mon Mar 05, 2018 7:34 pm
by cazfi
'Create' command sets the nation based on player's name. 'Hammurabi' is leader of Babylonians.

Re: Set the default AI players

Posted: Tue Mar 06, 2018 6:42 am
by Arbogast
(DUH!) :oops:
What I meant is how to write the list, let's say 7 AI players with 'normal' difficulty and their respective nations and colors.
I figure that using a text editor to write said list, naming it, copying it to chat line with the /read command should do it. That's what I do with the 'my_settings-2.6.0.serv' file, since it has all those inner commands (like 'metapatches' 'cmdlevel', etc.) are already written.
My question is what is the syntax to be used?
I hope I'm making sense...