wesnoth6
Battle for wesnoth, a turn-based fantasy strategy game
Usage
wesnoth [OPTIONS]
[PATH_TO_DATA]
Overview
Battle for Wesnoth is a turn-based fantasy strategy game.
Defeat all enemy leaders using a well-chosen cadre of troops, taking care to manage your resources of gold and villages. All units have their own strengths and weaknesses; to win, deploy your forces to their best advantage while denying your foes the chance to do the same. As units gain experience, they acquire new abilities and become more powerful. Play in your own language and test your skill against a smart computer opponent, or join Wesnoth's large community of online players. Create your own custom units, scenarios or campaigns, and share them with others.
Options
-
--all-translations -
Show all translations in the in-game language selection list, even if they are deemed insufficiently complete.
--bunzip2infile.bz2-
decompresses a file which should be in bzip2 format and stores it without the .bz2 suffix. The infile.bz2 will be removed.
--bzip2infile-
compresses a file in bzip2 format, stores it as infile.bz2 and removes infile.
-
-c[id_campaign], --campaign[=id_campaign] -
goes directly to the campaign with id id_campaign. A selection menu will appear if no id was specified.
-
--campaign-difficulty[=difficulty] -
The difficulty of the specified campaign (1 to max). If none specified, the campaign difficulty selection widget will appear.
--campaign-scenarioid_scenario-
The id of the scenario from the specified campaign. The default is the first scenario.
-
--campaign-skip-story -
Skip [story] screens and dialog through the end of the
startevent.
-
--clock -
Adds the option to show a clock for testing the drawing timer.
--config-dirname-
Deprecated, use
--userdata-dir.
-
--config-path -
Deprecated, use
--userdata-path.
|
overrides the loaded core with the one whose id is specified. |
|---|---|
|
overrides the data directory with the one specified |
-
--data-path -
prints the path of the data directory and exits.
-
-d, --debug -
enables additional command mode options in-game (see the wiki page at https://www.wesnoth.org/wiki/CommandMode for more information about command mode).
-
--debug-lua -
enables some Lua debugging mechanisms
-
--strict-lua -
disallow deprecated Lua API calls
-D,--diffleft-file right-file-
diffs the two WML files; does not preprocess them first (to do that, run them through
-pfirst). Outputs the diff as DiffWML on standard output or to the file indicated by --output.
-
-e[file], --editor[=file] -
start the in-game map editor directly. If file is specified, equivalent to
-l--load.
-
--fps -
displays the number of frames per second the game is currently running at in a corner of the screen as well as writes these values to a file in the userdata directory.
-
-f, --fullscreen -
runs the game in full screen mode.
--gunzipinfile.gz-
decompresses a file which should be in gzip format and stores it without the .gz suffix. The infile.gz will be removed.
--gzipinfile-
compresses a file in gzip format, stores it as infile.gz and removes infile.
-
-h, --help -
displays a summary of command line options to standard output, and exits.
- -l, --load file
-
loads the savegame file from the standard save game directory. If the
-eor--editoroption is used as well, starts the editor with the map from file open. If it is a directory, the editor will start with a load map dialog opened there.
- -L, --language lang
-
uses language lang (symbol) this session. Example: --language ang_GB@latin
-
--log-level=domain1,domain2,... -
sets the severity level of the log domains.
allcan be used to match any log domain. Available levels:error,warning,info,debug,none. By default thewarninglevel is used for most domains, butdeprecationdefaults tononeunless combined with the-doption.
-
--log-precise -
shows the timestamps in log output with more precision.
-
--log-strict -
sets the strict level of the logger. Any messages sent to log domains of this level or more severe will cause the unit test to fail regardless of the victory result. Only relevant when used with
-u.
-
--logdomains[=filter] -
lists defined log domains (only the ones containing filter if used) and exits
-
--no-log-to-file -
prevents redirecting logged output to a file. Log files are created in the logs directory under the userdata folder.
-
--log-to-file -
log output is written to a file. Cancels the effect of --no-log-to-file whether implicit or explicit.
-
--wnoconsole -
For Windows, when used with --no-log-to-file, results in output being written to cerr/cout instead of CONOUT. Otherwise, does nothing.
--max-fpsfps-
the number of frames per second the game can show, the value should be between
1and1000, the default is the monitor's refresh rate.
-
-m, --multiplayer -
runs a multiplayer game. There are additional options that can be used together with
--multiplayeras explained below.
-
--mp-test -
load the test mp scenarios.
-
--new-widgets -
there is a new WIP widget toolkit, this option enables it. This is very experimental, don't fill bug reports since most are known. Parts of the library are deemed stable and will work without this switch.
-
--nodelay -
runs the game without any delays for graphic benchmarking. This is automatically enabled by
--nogui.
-
--noaddons -
disables loading of user addons.
-
--nocache -
disables caching of game data.
-
--nogui -
runs the game without the GUI. Only available in combination with
--multiplayeror--screenshotor--plugin.
-
--nobanner -
suppress the startup banner.
-
--nomusic -
runs the game without music.
-
--noreplaycheck -
don't try to validate replay of unit test. Only relevant when used with
-u.
-
--nosound -
runs the game without sounds and music.
--outputfile-
output to the specified file. Applicable to diffing operations.
--passwordpassword-
uses password when connecting to a server, ignoring other preferences. Unsafe.
--pluginscript-
(experimental) load a script which defines a Wesnoth plugin. Similar to
--script, but Lua file should return a function which will be run as a coroutine and periodically woken up with updates.
-P,--patchbase-file patch-file-
applies a DiffWML patch to a WML file; does not preprocess either of the files. Outputs the patched WML to standard output or to the file indicated by --output.
- -p, --preprocess source-file/folder target-directory
-
preprocesses a specified file/folder. For each file(s) a plain .cfg file and a processed .cfg file will be written in specified target directory. If a folder is specified, it will be preprocessed recursively based on the known preprocessor rules. The common macros from the "data/core/macros" directory will be preprocessed before the specified resources. Example: -p ~/wesnoth/data/campaigns/tutorial ~/result. For details regarding the preprocessor visit: https://wiki.wesnoth.org/PreprocessorRef#Command-line_preprocessor.
-
--preprocess-defines=DEFINE1,DEFINE2,... -
comma separated list of defines to be used by the
--preprocesscommand. IfSKIP_COREis in the define list the "data/core" directory won't be preprocessed.
--preprocess-input-macrossource-file-
used only by the
--preprocesscommand. Specifies a file that contains[preproc_define]s to be included before preprocessing.
-
--preprocess-output-macros[=target-file] -
used only by the
--preprocesscommand. Will output all preprocessed macros in the target file. If the file is not specified the output will be file '_MACROS_.cfg' in the target directory of preprocess's command. The output file can be passed to--preprocess-input-macros. This switch should be typed before the--preprocesscommand.
-
-r XxY, --resolution XxY -
sets the screen resolution. Example:
-r800x600.
--render-imageimage output-
takes a valid wesnoth 'image path string' with image path functions, and outputs to a .png file. Image path functions are documented at https://wiki.wesnoth.org/ImagePathFunctionWML.
-
-R, --report -
initializes game directories, prints build information suitable for use in bug reports, and exits.
|
seeds the random number generator with number. Example: |
|---|---|
|
saves a screenshot of map to output without initializing a screen. |
|
(experimental) file containing a Lua script to control the client. |
-
-s[host], --server[=host] -
connects to the specified host if any, otherwise connect to the first server in preferences. Example:
--serverserver.wesnoth.org.
-
--showgui -
runs the game with the GUI, overriding any implicit
--nogui.
-
--strict-validation -
validation errors are treated as fatal errors.
-
-t[scenario_id], --test[=scenario_id] -
runs the game in a small test scenario. The scenario should be one defined with a
[test]WML tag. The default istest. A demonstration of the[micro_ai]feature can be started withmicro_ai_test.
--translations-overpercent-
Set the standard for deeming a translation is complete enough to show in the in-game language list to percent. Valid values are 0 to 100.
- -u, --unit scenario-id
-
runs the specified test scenario as a unit test. Implies
--nogui.
-
--unsafe-scripts -
makes the
packagepackage available to lua scripts, so that they can load arbitrary packages. Do not do this with untrusted scripts! This action gives lua the same permissions as the wesnoth executable.
-S,--use-schemapath-
sets the WML schema for use with
-V,--validate.
--userconfig-dirname-
sets the user configuration directory to name under $HOME or "My Documents\My Games" for windows. You can also specify an absolute path for the configuration directory outside the $HOME or "My Documents\My Games". On Windows it is also possible to specify a directory relative to the process working directory by using path starting with ".\" or "..\". Under X11 this defaults to $XDG_CONFIG_HOME or $HOME/.config/wesnoth, on other systems to the userdata path.
-
--userconfig-path -
prints the path of the user configuration directory and exits.
--userdata-dirname-
sets the userdata directory to name under $HOME or "My Documents\My Games" for windows. You can also specify an absolute path for the userdata directory outside the $HOME or "My Documents\My Games". On Windows it is also possible to specify a directory relative to the process working directory by using path starting with ".\" or "..\".
-
--userdata-path -
prints the path of the userdata directory and exits.
|
uses username when connecting to a server, ignoring other preferences. |
|---|---|
|
validates a file against the WML schema. |
|
validates the WML of the given addon as you play. |
-
--validate-core -
validates the core WML as you play.
-
--validate-schema path -
validates a file as a WML schema.
-
--validcache -
assumes that the cache is valid. (dangerous)
-
-v, --version -
shows the version number and exits.
-
--simple-version -
shows the version number and nothing else, then exits.
-
-w, --windowed -
runs the game in windowed mode.
-
--with-replay -
replays the game loaded with the
--loadoption.
Options for --multiplayer
The side-specific multiplayer options are marked with number. number has to be replaced by a side number. It usually is 1 or 2 but depends on the number of players possible in the chosen scenario.
--ai-confignumber:value-
selects a configuration file to load for the AI controller for this side.
--algorithmnumber:value-
selects a non-standard algorithm to be used by the AI controller for this side. The algorithm is defined by an
[ai]tag, which can be a core one either in "data/ai/ais" or "data/ai/dev" or an algorithm defined by an addon. Available values include:idle_aiandexperimental_ai.
--controllernumber:value-
selects the controller for this side. Available values:
human,aiandnull.
--eravalue-
use this option to play in the selected era instead of the
Defaultera. The era is chosen by an id. Eras are described in thedata/multiplayer/eras.cfgfile.
--exit-at-end-
exits once the scenario is over, without displaying victory/defeat dialog which normally requires the user to click End Scenario. This is also used for scriptable benchmarking.
--ignore-map-settings-
do not use map settings, use default values instead.
--labellabel-
sets the label for AIs.
--multiplayer-repeatvalue-
repeats a multiplayer game value times. Best to use with
--noguifor scriptable benchmarking.
--parmnumber:name:value-
sets additional parameters for this side. This parameter depends on the options used with
--controllerand--algorithm. It should only be useful for people designing their own AI. (not yet documented completely)
--scenariovalue-
selects a multiplayer scenario by id. The default scenario id is
multiplayer_The_Freelands.
--sidenumber:value-
selects a faction of the current era for this side. The faction is chosen by an id. Factions are described in the data/multiplayer.cfg file.
--turnsvalue-
sets the number of turns for the chosen scenario. By default no turn limit is set.
Exit status
Normal exit status is 0. An exit status of 1 indicates an (SDL, video, fonts, etc) initialization error. An exit status of 2 indicates an error with the command line options.
When running unit tests (with -u), the exit status is different. An exit status of 0 indicates that the test passed, and 1 indicates that the test failed. An exit status of 3 indicates that the test passed, but produced an invalid replay file. An exit status of 4 indicates that the test passed, but the replay produced errors. These latter two are only returned if --noreplaycheck is not passed.
Releases
4 releases since Debian 3.1 (Sarge); the text changed 3 times.
--all-translations since Arch Linux 2026-11-01;
--campaign since Arch Linux 2026-11-01;
--campaign-difficulty since Arch Linux 2026-11-01;
--campaign-skip-story since Arch Linux 2026-11-01;
--clock since Arch Linux 2026-11-01;
--config-path since Arch Linux 2026-11-01;
--data-path since Arch Linux 2026-11-01;
--debug-lua since Arch Linux 2026-11-01;
--editor since Arch Linux 2026-11-01;
--log-level since Debian 5.0 (Lenny);
--log-precise since Arch Linux 2026-11-01;
--log-strict since Arch Linux 2026-11-01;
--log-to-file since Arch Linux 2026-11-01;
--logdomains since Debian 5.0 (Lenny);
--mp-test since Arch Linux 2026-11-01;
--new-widgets since Arch Linux 2026-11-01;
--no-log-to-file since Arch Linux 2026-11-01;
--noaddons since Arch Linux 2026-11-01;
--nobanner since Arch Linux 2026-11-01;
--nodelay since Arch Linux 2026-11-01;
--nogui since Debian 5.0 (Lenny);
--nomusic since Arch Linux 2026-11-01;
--noreplaycheck since Arch Linux 2026-11-01;
--preprocess-defines since Arch Linux 2026-11-01;
--preprocess-output-macros since Arch Linux 2026-11-01;
--report since Arch Linux 2026-11-01;
--server since Arch Linux 2026-11-01;
--showgui since Arch Linux 2026-11-01;
--simple-version since Arch Linux 2026-11-01;
--strict-lua since Arch Linux 2026-11-01;
--strict-validation since Arch Linux 2026-11-01;
--unsafe-scripts since Arch Linux 2026-11-01;
--userconfig-path since Arch Linux 2026-11-01;
--userdata-path since Arch Linux 2026-11-01;
--validate-core since Arch Linux 2026-11-01;
--validate-schema since Arch Linux 2026-11-01;
--validcache since Arch Linux 2026-11-01;
--with-replay since Arch Linux 2026-11-01;
--wnoconsole since Arch Linux 2026-11-01;
-R since Arch Linux 2026-11-01;
-c since Arch Linux 2026-11-01;
-e since Arch Linux 2026-11-01;
-m since Arch Linux 2026-11-01;
-s since Arch Linux 2026-11-01.
--bpp until Debian 3.1 (Sarge);
--exit-at-end until Debian 5.0 (Lenny);
--log-error until Debian 4.0 (Etch);
--log-info until Debian 4.0 (Etch);
--log-warning until Debian 4.0 (Etch);
--max-fps until Debian 5.0 (Lenny);
--no-delay until Debian 5.0 (Lenny);
--path until Debian 5.0 (Lenny).