Starting wesnoth from the command line with AI sides

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Starting wesnoth from the command line with AI sides

Post by Pentarctagon »

I'm trying to start wesnoth via the command line with this:

Code: Select all

./wesnoth -m --exit-at-end --controller 1:ai_default_rca --controller 2:ai_default_rca --era era_default
which based on my reading of --help should have it start on the Freelands with boths sides as AIs, however both sides are still human controlled. What am I doing wrong?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Starting wesnoth from the command line with AI sides

Post by GunChleoc »

The blank space in --controller 1:ai_default_rca looks suspicious to me.
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Starting wesnoth from the command line with AI sides

Post by Pentarctagon »

Removing the space causes the error:

Code: Select all

Error in command line: unrecognised option '--controller1:ai_default_rca'
The --help description also has it with the space:

Code: Select all

--controller arg         selects the controller for this side. <arg> should have format side:value
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Starting wesnoth from the command line with AI sides

Post by iceiceice »

There is some part of the

Code: Select all

travis.yml
script that run freelands with two ai sides this each time someone makes a commit, but I can't remember exactly what the syntax is...
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Starting wesnoth from the command line with AI sides

Post by Pentarctagon »

It looks like it's in play_test_executor.sh, which has:

Code: Select all

--controller 1:ai --controller 2:ai
Specifying a particular ai would probably be with --ai-config or --algorithm then.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply