list of executable switches?
Moderator: Forum Moderators
list of executable switches?
Can someone point me to a list of the wesnoth executable switches?
So far I have found :
--nogui
--multiplayer
--controllerX=ai
--algorithmX=ai1.py
I am unsure how to select a map for the AI's to play on. Also, is there a way to report the faction of each team to stdout?
Thank you.
So far I have found :
--nogui
--multiplayer
--controllerX=ai
--algorithmX=ai1.py
I am unsure how to select a map for the AI's to play on. Also, is there a way to report the faction of each team to stdout?
Thank you.
By starting wesnoth with the "--help" switch:
Not sure about the other questions.
Code: Select all
Battle for Wesnoth v1.3.9+svn
Started on Tue Oct 30 09:48:12 2007
usage: ./src/wesnoth/src/wesnoth [OPTIONS] [DATA-DIRECTORY]
--bpp number sets BitsPerPixel value. Example: --bpp 32
--compress INFILE OUTFILE compresses a savefile (INFILE) that is in text WML
format into binary WML format (OUTFILE).
-d, --debug shows extra debugging information and enables
additional command mode options in-game.
--decompress INFILE OUTFILE decompresses a savefile (INFILE) that is in binary
WML format into text WML format (OUTFILE).
-f, --fullscreen runs the game in full screen mode.
--fps displays the number of frames per second the game
is currently running at, in a corner of the screen.
-h, --help prints this message and exits.
--load SAVEGAME loads the file SAVEGAME from the standard save
game directory.
--log-<level>="domain1,domain2,..."
sets the severity level of the debug domains.
"all" can be used to match any debug domain.
Available levels: error, warning, info, debug.
--logdomains List defined log domains and exit.
--nocache disables caching of game data.
--validcache assume that cache is valid (dangerous)
--nosound runs the game without sounds and music.
--max-fps the maximum fps the game tries to run at the value
should be between the 1 and 1000, the default is 50.
--path prints the name of the game data directory and exits.
--python-api prints the runtime documentation for the python API.
-r, --resolution XxY sets the screen resolution. Example: -r 800x600
-t, --test runs the game in a small test scenario.
-v, --version prints the game's version number and exits.
-w, --windowed runs the game in windowed mode.
--no-delay run the game without any delays.
--multiplayer runs a multiplayer game. There are additional
options that can be used as explained below:
--algorithm<number>=value selects a non-standard algorithm to be used by the
AI controller for this side.
--controller<number>=value selects the controller for this side.
--era=value selects the era to be played in by its id.
--nogui runs the game without the GUI. Must appear before
--multiplayer to have the desired effect.
--parm<number>=name:value sets additional parameters for this side.
--scenario=value selects a multiplayer scenario. The default
scenario is "multiplayer_The_Freelands".
--side<number>=value selects a faction of the current era for this side
by id.
--turns=value sets the number of turns. The default is "50".
--exit-at-end exit Wesnoth at end of scenario.
shadowm@greycore:~>
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
You can, it's just a bit awkward since the output is redirected to stdout/err.txt on windows.dagoi-koi wrote:Ah. Can't do that with windows, or at least I don't know how.
I'm not sure what you're trying to say here but the filesystems windows uses are usually case insensitive.dagoi-koi wrote: Also the map name must be capitalized even on Windows.
Anyway, here's an example command line to let two AIs play against each other:
Code: Select all
wesnoth --nogui --multiplayer --scenario=multiplayer_The_Freelands --controller1=ai --side1="Knalgan Alliance" --controller2=ai --side2="Knalgan Alliance" --algorithm2=python_ai --parm2=python_script:bruteforce.py
"If gameplay requires it, they can be made to live on Venus." -- scott
You could test this from a command shell (btw i don't know if Wesnoth is in the search path).dagoi-koi wrote:Ah. Can't do that with windows, or at least I don't know how.
Also the map name must be capitalized even on Windows.
To invoke a command shell tou can do launch "cmd" from the excute dialog.
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!"
-- xtifr

Windows usually keeps programs isolated in their directories, so that they are not in PATH unless the user manually adds their directories to PATH. Note that Windows' path search is not recursive (i.e., if C:\Foo is in PATH, typing willy won't launch C:\Foo\Bar\Willy.exe unless you add C:\Foo\Bar to PATH too).Noyga wrote:btw i don't know if Wesnoth is in the search path.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
There is a way to add entry like "promt here" to folders. I enabled / installed / hacked it so long back that I don't remember how I did it, but that shouldn't matter. Once you get it working, just right click folder - open prompt - and it starts in the folder. Life without this would be so dull 
Some reference:
Google search "windows context menu on folder prompt here"
First good find from that search

Some reference:
Google search "windows context menu on folder prompt here"
First good find from that search
The one I use is cmdhere, the great thing about it is it is just a registry hack!VS wrote:There is a way to add entry like "promt here" to folders. I enabled / installed / hacked it so long back that I don't remember how I did it, but that shouldn't matter. Once you get it working, just right click folder - open prompt - and it starts in the folder. Life without this would be so dull
Some reference:
Google search "windows context menu on folder prompt here"
First good find from that search
XP's powertoys (pub. by Microsoft) had a cmdlinehere applet or something. It was composed of a DLL, besides the registry hack.elricz wrote:The one I use is cmdhere, the great thing about it is it is just a registry hack!
It is not very comfortable because you have to use your mouse to get there.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Code: Select all
wesnoth --nogui --multiplayer --scenario=multiplayer_The_Freelands --controller1=ai --side1="Knalgan Alliance" --controller2=ai --side2="Knalgan Alliance" --algorithm2=python_ai --parm2=python_script:bruteforce.py
Code: Select all
Battle for Wesnoth v1.2.7
Started on Sat Nov 03 12:22:10 2007
started game: 0
Checking video mode: 1024x746x32...
32
setting mode to 1024x746x32
locale could not be determined; defaulting to system locale
WARNING: setlocale() failed for .
set locale to
found valid cache at 'C:/Program Files/Wesnoth/userdata/cache/game.cfg-cache-v1.2.7-MEDIUM-MULTIPLAYER-NORMAL' using it
loadscreen: filesystem counter = 125
loadscreen: binarywml counter = 22100
loadscreen: setconfig counter = 221
loadscreen: parser counter = 229
started music
4095
counted sides: 1
counted sides: 2
Could not find side '"Knalgan' for side 2
exiting with code 0
Heh, you put the parameter as
when parameters are just some stuff on cmdline with no more structure than space-separated list. If you enclose it correctly - the whole parameter - it will work without any problems.
Code: Select all
--side1="Knalgan Alliance"
Code: Select all
"-side1=Knalgan Alliance"