Command-line nogui multiplayer Wesnoth

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

Moderator: Forum Moderators

Post Reply
SeattleDad
Posts: 74
Joined: March 4th, 2012, 6:09 pm

Command-line nogui multiplayer Wesnoth

Post by SeattleDad »

I'm trying to get Wesnoth to run from the command line with no gui so that I can benchmark the AI, but I can't get it it to work. Could someone give me an example currently working command line? What I tried is the following:
./wesnoth --nogui --multiplayer --controller 1:ai --controller 2:ai

This gives the following results:
Battle for Wesnoth v1.11.0-svn
Started on Thu Apr 5 21:10:06 2012
[snip irrelevant stuff]
20120405 21:10:07 error display: loadscreen: Logo image is too big.
counted sides: 1
counted sides: 2
Faction Drakes selected for side 1.
Faction Loyalists selected for side 2.
20120405 21:10:13 error display: loadscreen: Logo image is too big.
20120405 21:10:13 error general: Error while playing the game: game_error: unknown unit type: random

Note that I get the same error message ( unknown unit type: random) when I run without the "--nogui" option.

Thanks!
mattsc
Inactive Developer
Posts: 1217
Joined: October 13th, 2010, 6:14 pm

Re: Command-line nogui multiplayer Wesnoth

Post by mattsc »

SeattleDad: I ran that line using 1.10.0 and had no problems. I get all the same messages as you except for the last one, so that's the fatal problem. Do you have the same issue when you're not using trunk?

EDIT: Oh, just tried it with trunk and got the same error. Maybe it requires an additional option now?
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Command-line nogui multiplayer Wesnoth

Post by Boucman »

that is a known bug due to a patch that has been reverted...

this should be fixed in 1.10.1 and the patch added back once I find out why it doesn't work on command line
Fight key loggers: write some perl using vim
SeattleDad
Posts: 74
Joined: March 4th, 2012, 6:09 pm

Re: Command-line nogui multiplayer Wesnoth

Post by SeattleDad »

So is this going to be reverted in trunk? I'm seeing the same results: no problem in 1.10.1, but fails with this error in v1.11.0-svn.
User avatar
MetalKing
Posts: 197
Joined: July 8th, 2011, 11:34 am

Re: Command-line nogui multiplayer Wesnoth

Post by MetalKing »

Is there a way to use CLI also with guy? Perhaps LUA as Shell?

*edit*
At best with support for these syntaxes:
$ <LUA-Code>;
!@my_unit melee unit_id by melee_id
? list red enemies near [14,26]

$ for system, ? For querry and ! For instruction. strings quoted to distinguish from identier (variable names). GameObjects with # indicate

@Kaleh: move to .12,23!
@kaleh: enemies?

Cndes/abbreviations are fine but natural speech here finer.

objects are optional but no preposition without objects and two objects always with preposition between.
Instruction:
@unit: verb obj1 prep obj2!
@konrad: take sword from delfador!


Querry:
@unit: queral obj1 verb obj2
@kaleh: where is bola? (obj1=none)
exception: queral is "how":
@unit: how attribute obj1 verb
@kaleh: how many gold have you?
"Sir! We are surrounded by our enemies!" - "Excellent ! We can attack in every direction!"
"Make everything as simple as possible, but not simpler." -- Albert Einstein
No Source - No Binary - No Trust!
Map Wesnoth Springs - The great War [200x120],Player=9
SkeletonCrew
Inactive Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: Command-line nogui multiplayer Wesnoth

Post by SkeletonCrew »

Actually the patch [1] was never reverted. I just reverted it locally to test
whether it was really the cause. You can revert it locally and it should work
again.

[1] http://gna.org/patch/?2642
User avatar
MetalKing
Posts: 197
Joined: July 8th, 2011, 11:34 am

Re: Command-line nogui multiplayer Wesnoth

Post by MetalKing »

Thanks. Will try it. IIRC I have to use any xdiff-tool or something like.
"Sir! We are surrounded by our enemies!" - "Excellent ! We can attack in every direction!"
"Make everything as simple as possible, but not simpler." -- Albert Einstein
No Source - No Binary - No Trust!
Map Wesnoth Springs - The great War [200x120],Player=9
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Command-line nogui multiplayer Wesnoth

Post by Boucman »

I reverted the patch, you should be able to start command-line games normally now
Fight key loggers: write some perl using vim
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Command-line nogui multiplayer Wesnoth

Post by AI »

I've fixed the crash and reapplied the patch. As of [rev]53860[/rev], commandline-started games should work properly.
SeattleDad
Posts: 74
Joined: March 4th, 2012, 6:09 pm

Re: Command-line nogui multiplayer Wesnoth

Post by SeattleDad »

Confirmed that it works fine on trunk now.

Thanks!
Post Reply