1WESNOTH(6) Battle for Wesnoth WESNOTH(6)
2
3
4
6 wesnoth - Battle for Wesnoth, a turn-based fantasy strategy game
7
9 wesnoth [OPTIONS] [PATH_TO_DATA]
10
12 Battle for Wesnoth is a turn-based fantasy strategy game.
13
14 Defeat all enemy leaders using a well-chosen cadre of troops, taking
15 care to manage your resources of gold and villages. All units have
16 their own strengths and weaknesses; to win, deploy your forces to their
17 best advantage while denying your foes the chance to do the same. As
18 units gain experience, they acquire new abilities and become more pow‐
19 erful. Play in your own language and test your skill against a smart
20 computer opponent, or join Wesnoth's large community of online players.
21 Create your own custom units, scenarios or campaigns, and share them
22 with others.
23
25 --all-translations
26 Show all translations in the in-game language selection list,
27 even if they are deemed insufficiently complete.
28
29 --bunzip2 infile.bz2
30 decompresses a file which should be in bzip2 format and stores
31 it without the .bz2 suffix. The infile.bz2 will be removed.
32
33 --bzip2 infile
34 compresses a file in bzip2 format, stores it as infile.bz2 and
35 removes infile.
36
37 -c[id_campaign], --campaign[=id_campaign]
38 goes directly to the campaign with id id_campaign. A selection
39 menu will appear if no id was specified.
40
41 --campaign-difficulty[=difficulty]
42 The difficulty of the specified campaign (1 to max). If none
43 specified, the campaign difficulty selection widget will appear.
44
45 --campaign-scenario id_scenario
46 The id of the scenario from the specified campaign. The default
47 is the first scenario.
48
49 --campaign-skip-story
50 Skip [story] screens and dialog through the end of the start
51 event.
52
53 --clock
54 Adds the option to show a clock for testing the drawing timer.
55
56 --config-dir name
57 Deprecated, use --userdata-dir.
58
59 --config-path
60 Deprecated, use --userdata-path.
61
62 --core id_core
63 overrides the loaded core with the one whose id is specified.
64
65 --data-dir directory
66 overrides the data directory with the one specified
67
68 --data-path
69 prints the path of the data directory and exits.
70
71 -d, --debug
72 enables additional command mode options in-game (see the wiki
73 page at https://www.wesnoth.org/wiki/CommandMode for more infor‐
74 mation about command mode).
75
76 --debug-lua
77 enables some Lua debugging mechanisms
78
79 --strict-lua
80 disallow deprecated Lua API calls
81
82 -D,--diff left-file right-file
83 diffs the two WML files; does not preprocess them first (to do
84 that, run them through -p first). Outputs the diff as DiffWML on
85 standard output or to the file indicated by --output.
86
87 -e[file], --editor[=file]
88 start the in-game map editor directly. If file is specified,
89 equivalent to -l --load.
90
91 --fps displays the number of frames per second the game is currently
92 running at in a corner of the screen as well as writes these
93 values to a file in the userdata directory.
94
95 -f, --fullscreen
96 runs the game in full screen mode.
97
98 --gunzip infile.gz
99 decompresses a file which should be in gzip format and stores it
100 without the .gz suffix. The infile.gz will be removed.
101
102 --gzip infile
103 compresses a file in gzip format, stores it as infile.gz and re‐
104 moves infile.
105
106 -h, --help
107 displays a summary of command line options to standard output,
108 and exits.
109
110 -l, --load file
111 loads the savegame file from the standard save game directory.
112 If the -e or --editor option is used as well, starts the editor
113 with the map from file open. If it is a directory, the editor
114 will start with a load map dialog opened there.
115
116 -L, --language lang
117 uses language lang (symbol) this session. Example: --language
118 ang_GB@latin
119
120 --log-level=domain1,domain2,...
121 sets the severity level of the log domains. all can be used to
122 match any log domain. Available levels: error, warn‐
123 ing, info, debug, none. By default the warning level is used
124 for most domains, but deprecation defaults to none unless com‐
125 bined with the -d option.
126
127 --log-precise
128 shows the timestamps in log output with more precision.
129
130 --log-strict
131 sets the strict level of the logger. Any messages sent to log
132 domains of this level or more severe will cause the unit test to
133 fail regardless of the victory result. Only relevant when used
134 with -u.
135
136 --logdomains[=filter]
137 lists defined log domains (only the ones containing filter if
138 used) and exits
139
140 --no-log-to-file
141 prevents redirecting logged output to a file. Log files are cre‐
142 ated in the logs directory under the userdata folder.
143
144 --log-to-file
145 log output is written to a file in addition to standard out‐
146 put/error. Cancels the effect of --no-log-to-file whether im‐
147 plicit or explicit.
148
149 --wnoconsole
150 For Windows, when used with --no-log-to-file, results in output
151 being written to cerr/cout instead of CONOUT. Otherwise, does
152 nothing.
153
154 --max-fps fps
155 the number of frames per second the game can show, the value
156 should be between 1 and 1000, the default is the monitor's re‐
157 fresh rate.
158
159 -m, --multiplayer
160 runs a multiplayer game. There are additional options that can
161 be used together with --multiplayer as explained below.
162
163 --mp-test
164 load the test mp scenarios.
165
166 --new-widgets
167 there is a new WIP widget toolkit, this option enables it. This
168 is very experimental, don't fill bug reports since most are
169 known. Parts of the library are deemed stable and will work
170 without this switch.
171
172 --nodelay
173 runs the game without any delays for graphic benchmarking. This
174 is automatically enabled by --nogui.
175
176 --noaddons
177 disables loading of user addons.
178
179 --nocache
180 disables caching of game data.
181
182 --nogui
183 runs the game without the GUI. Only available in combination
184 with --multiplayer or --screenshot or --plugin.
185
186 --nobanner
187 suppress the startup banner.
188
189 --nomusic
190 runs the game without music.
191
192 --noreplaycheck
193 don't try to validate replay of unit test. Only relevant when
194 used with -u.
195
196 --nosound
197 runs the game without sounds and music.
198
199 --output file
200 output to the specified file. Applicable to diffing operations.
201
202 --password password
203 uses password when connecting to a server, ignoring other pref‐
204 erences. Unsafe.
205
206 --plugin script
207 (experimental) load a script which defines a Wesnoth plugin.
208 Similar to --script, but Lua file should return a function which
209 will be run as a coroutine and periodically woken up with up‐
210 dates.
211
212 -P,--patch base-file patch-file
213 applies a DiffWML patch to a WML file; does not preprocess ei‐
214 ther of the files. Outputs the patched WML to standard output
215 or to the file indicated by --output.
216
217 -p, --preprocess source-file/folder target-directory
218 preprocesses a specified file/folder. For each file(s) a plain
219 .cfg file and a processed .cfg file will be written in specified
220 target directory. If a folder is specified, it will be prepro‐
221 cessed recursively based on the known preprocessor rules. The
222 common macros from the "data/core/macros" directory will be pre‐
223 processed before the specified resources. Example: -p ~/wes‐
224 noth/data/campaigns/tutorial ~/result. For details regarding
225 the preprocessor visit: https://wiki.wesnoth.org/Preprocessor‐
226 Ref#Command-line_preprocessor.
227
228 --preprocess-defines=DEFINE1,DEFINE2,...
229 comma separated list of defines to be used by the --preprocess
230 command. If SKIP_CORE is in the define list the "data/core" di‐
231 rectory won't be preprocessed.
232
233 --preprocess-input-macros source-file
234 used only by the --preprocess command. Specifies a file that
235 contains [preproc_define]s to be included before preprocessing.
236
237 --preprocess-output-macros[=target-file]
238 used only by the --preprocess command. Will output all prepro‐
239 cessed macros in the target file. If the file is not specified
240 the output will be file '_MACROS_.cfg' in the target directory
241 of preprocess's command. The output file can be passed to --pre‐
242 process-input-macros. This switch should be typed before the
243 --preprocess command.
244
245 -r XxY, --resolution XxY
246 sets the screen resolution. Example: -r 800x600.
247
248 --render-image image output
249 takes a valid wesnoth 'image path string' with image path func‐
250 tions, and outputs to a .png file. Image path functions are doc‐
251 umented at https://wiki.wesnoth.org/ImagePathFunctionWML.
252
253 -R, --report
254 initializes game directories, prints build information suitable
255 for use in bug reports, and exits.
256
257 --rng-seed number
258 seeds the random number generator with number. Example: --rng-
259 seed 0.
260
261 --screenshot map output
262 saves a screenshot of map to output without initializing a
263 screen.
264
265 --script file
266 (experimental) file containing a Lua script to control the
267 client.
268
269 -s[host], --server[=host]
270 connects to the specified host if any, otherwise connect to the
271 first server in preferences. Example: --server server.wes‐
272 noth.org.
273
274 --showgui
275 runs the game with the GUI, overriding any implicit --nogui.
276
277 --strict-validation
278 validation errors are treated as fatal errors.
279
280 -t[scenario_id], --test[=scenario_id]
281 runs the game in a small test scenario. The scenario should be
282 one defined with a [test] WML tag. The default is test. A
283 demonstration of the [micro_ai] feature can be started with mi‐
284 cro_ai_test.
285
286 --translations-over percent
287 Set the standard for deeming a translation is complete enough to
288 show in the in-game language list to percent. Valid values are
289 0 to 100.
290
291 -u, --unit scenario-id
292 runs the specified test scenario as a unit test. Implies
293 --nogui.
294
295 --unsafe-scripts
296 makes the package package available to lua scripts, so that they
297 can load arbitrary packages. Do not do this with untrusted
298 scripts! This action gives lua the same permissions as the wes‐
299 noth executable.
300
301 -S,--use-schema path
302 sets the WML schema for use with -V,--validate.
303
304 --userconfig-dir name
305 sets the user configuration directory to name under $HOME or "My
306 Documents\My Games" for windows. You can also specify an abso‐
307 lute path for the configuration directory outside the $HOME or
308 "My Documents\My Games". On Windows it is also possible to spec‐
309 ify a directory relative to the process working directory by us‐
310 ing path starting with ".\" or "..\". Under X11 this defaults
311 to $XDG_CONFIG_HOME or $HOME/.config/wesnoth, on other systems
312 to the userdata path.
313
314 --userconfig-path
315 prints the path of the user configuration directory and exits.
316
317 --userdata-dir name
318 sets the userdata directory to name under $HOME or "My Docu‐
319 ments\My Games" for windows. You can also specify an absolute
320 path for the userdata directory outside the $HOME or "My Docu‐
321 ments\My Games". On Windows it is also possible to specify a di‐
322 rectory relative to the process working directory by using path
323 starting with ".\" or "..\".
324
325 --userdata-path
326 prints the path of the userdata directory and exits.
327
328 --username username
329 uses username when connecting to a server, ignoring other pref‐
330 erences.
331
332 --validate path
333 validates a file against the WML schema.
334
335 --validate-addon addon_id
336 validates the WML of the given addon as you play.
337
338 --validate-core
339 validates the core WML as you play.
340
341 --validate-schema path
342 validates a file as a WML schema.
343
344 --validcache
345 assumes that the cache is valid. (dangerous)
346
347 -v, --version
348 shows the version number and exits.
349
350 --simple-version
351 shows the version number and nothing else, then exits.
352
353 -w, --windowed
354 runs the game in windowed mode.
355
356 --with-replay
357 replays the game loaded with the --load option.
358
360 The side-specific multiplayer options are marked with number. number
361 has to be replaced by a side number. It usually is 1 or 2 but depends
362 on the number of players possible in the chosen scenario.
363
364 --ai-config number:value
365 selects a configuration file to load for the AI controller for
366 this side.
367
368 --algorithm number:value
369 selects a non-standard algorithm to be used by the AI controller
370 for this side. The algorithm is defined by an [ai] tag, which
371 can be a core one either in "data/ai/ais" or "data/ai/dev" or an
372 algorithm defined by an addon. Available values include: idle_ai
373 and experimental_ai.
374
375 --controller number:value
376 selects the controller for this side. Available values: human,
377 ai and null.
378
379 --era value
380 use this option to play in the selected era instead of the De‐
381 fault era. The era is chosen by an id. Eras are described in the
382 data/multiplayer/eras.cfg file.
383
384 --exit-at-end
385 exits once the scenario is over, without displaying victory/de‐
386 feat dialog which normally requires the user to click End Sce‐
387 nario. This is also used for scriptable benchmarking.
388
389 --ignore-map-settings
390 do not use map settings, use default values instead.
391
392 --label label
393 sets the label for AIs.
394
395 --multiplayer-repeat value
396 repeats a multiplayer game value times. Best to use with --nogui
397 for scriptable benchmarking.
398
399 --parm number:name:value
400 sets additional parameters for this side. This parameter depends
401 on the options used with --controller and --algorithm. It
402 should only be useful for people designing their own AI. (not
403 yet documented completely)
404
405 --scenario value
406 selects a multiplayer scenario by id. The default scenario id is
407 multiplayer_The_Freelands.
408
409 --side number:value
410 selects a faction of the current era for this side. The faction
411 is chosen by an id. Factions are described in the data/multi‐
412 player.cfg file.
413
414 --turns value
415 sets the number of turns for the chosen scenario. By default no
416 turn limit is set.
417
419 Normal exit status is 0. An exit status of 1 indicates an (SDL, video,
420 fonts, etc) initialization error. An exit status of 2 indicates an er‐
421 ror with the command line options.
422 When running unit tests (with -u), the exit status is different. An
423 exit status of 0 indicates that the test passed, and 1 indicates that
424 the test failed. An exit status of 3 indicates that the test passed,
425 but produced an invalid replay file. An exit status of 4 indicates that
426 the test passed, but the replay produced errors. These latter two are
427 only returned if --noreplaycheck is not passed.
428
430 Written by David White <davidnwhite@verizon.net>.
431 Edited by Nils Kneuper <crazy-ivanovic@gmx.net>, ott <ott@gaon.net> and
432 Soliton <soliton.de@gmail.com>.
433 This manual page was originally written by Cyril Bouthors
434 <cyril@bouthors.org>.
435 Visit the official homepage: https://www.wesnoth.org/
436
438 Copyright © 2003-2023 David White <davidnwhite@verizon.net>
439 This is Free Software; this software is licensed under the GPL version
440 2, as published by the Free Software Foundation. There is NO warranty;
441 not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
442
444 wesnothd(6)
445
446
447
448wesnoth 2022 WESNOTH(6)