CommandLineOptions.wiki
author almikes@aol.com
Fri, 19 Dec 2014 23:42:18 +0000
changeset 522 2b6da59e5489
parent 293 2dc603c7d7e6
child 587 8105e95297e3
permissions -rw-r--r--
Add SVG template.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
     1
#summary Full list of command line switches for hedgewars, hwengine and server
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     2
#labels Documentation,Engine,Frontend
292
27c4a3aec2a0 summary
vittorio.giovara@gmail.com
parents: 291
diff changeset
     3
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
     4
*Table of Contents*
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
     5
<wiki:toc max_depth="2" />
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     6
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
     7
----
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     8
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     9
= Engine =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    10
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    11
It is possible to start a replay or save file directly from the terminal issuing the standalone {{{hwengine}}} utility with very simple syntax. 
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    12
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    13
== Standard Use ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    14
{{{$ hwengine [options] <path to replay file>}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    15
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    16
By default hwengine will look in the current folder for game assets, if you wish to use another directory you should set the --prefix and --user-prefix option. See below for even more commands.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    17
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    18
The replay file can be stored anywhere. Note that, as always, engine can only load replay files generated from the same Hedgewars version.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    19
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    20
== Advanced Use ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    21
It is possible to specify almost any settings by adding additional arguments:
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    22
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    23
  * {{{--prefix [path to Hedgewars data folder]}}} - Sets the path to the system game data folder
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    24
  * {{{--user-prefix [path to custom Hedgewars folder]}}} - Sets the path to the custom data folder to find game content
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    25
  * {{{--locale [language file]}}} - Sets the game language (en.txt for sample)
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    26
  * {{{--nick [string]}}} - Represents the user nickname
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    27
  * {{{--width [size]}}} - Starts the game with the given width (in pixels)
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    28
  * {{{--height [size]}}} - Starts the game with the given height (in pixels)
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    29
  * {{{--volume [level]}}} - Sets the volume level, possible values range from 0-100 (negative is muted)
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    30
  * {{{--nomusic}}} - Disables music
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    31
  * {{{--nosound}}} - Disables sound effects
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    32
  * {{{--fullscreen}}} - Starts game in fullscreen
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    33
  * {{{--showfps}}} - Shows a fps counter in the top right
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    34
  * {{{--altdmg}}} - Uses an alternative damage indicator
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    35
  * {{{--low-quality}}} - Lowers the game quality
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    36
  * {{{--stereo [type]}}} - Sets stereoscopic rendering type (1 to 14)
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    37
  * {{{--help}}} - Shows this list of command line options
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    38
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    39
=== More Advanced use ===
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    40
Generally you don't need to set these options but here they are for full documentation:
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    41
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    42
  * {{{--frame-interval [interval]}}} - Sets minimum interval (in ms) between each frame. Eg, 40 would make the game run at most 25 fps
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    43
  * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    44
  * {{{--stats-only}}} - Outputs the round information without launching the game, useful for statistics only
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    45
  * {{{--fullscreen-width [size]}}} - Starts the game with the given width (in pixels) when fullscreen
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    46
  * {{{--fullscreen-height [size]}}} - Starts the game with the given height (in pixels) when fullscreen
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    47
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    48
Note: any modification to the command line arguments should be reflected in the autostart .desktop file, game.cpp, GameInterfaceBridge.m.
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    49
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    50
--prefix location is usually hardcoded at compile time, but should you changed the installation directory, then you can use this flag to override it; alternatively you can just specify --user-prefix.
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    51
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    52
Personal game data is by default contained in the following directory:
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    53
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    54
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    55
  * _Linux_: {{{~/.hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    56
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    57
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    58
--raw-quality value is determined by combining the values of the flags you wish to enable. Up to date variables (in hex) are online. [http://code.google.com/p/hedgewars/source/browse/hedgewars/uConsts.pas#62 uConsts.pas]
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    59
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    60
  * {{{qLowRes        = 1}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    61
  * {{{rqBlurryLand   = 2}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    62
  * {{{rqNoBackground = 4}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    63
  * {{{rqSimpleRope   = 8}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    64
  * {{{rq2DWater      = 16}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    65
  * {{{rqAntiBoom     = 32}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    66
  * {{{rqKillFlakes   = 64}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    67
  * {{{rqSlowMenu     = 128}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    68
  * {{{rqPlainSplash  = 256}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    69
  * {{{rqClampLess    = 512}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    70
  * {{{rqTooltipsOff  = 1024}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    71
  * {{{rqDesyncVBlank = 2048}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    72
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    73
Eg: to have blurry land and simple rope, you would use the number 10 (2+8)
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    74
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    75
There are some internal commands, such as --internal, --port [int], that are not meant for command line usage.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    76
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    77
If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code.
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    78
[http://code.google.com/p/hedgewars/source/browse/hedgewars/ArgParsers.inc ArgParsers.inc]
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    79
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    80
----
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    81
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    82
= Frontend =
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    83
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    84
There are two options that enable to load the data directory and the configuration directory in non standard locations.
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    85
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    86
  * {{{--data-dir=[path containing 'hedgewars/Data']}}}
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    87
  * {{{--config-dir=[path containing 'Demos' 'Saves' etc.]}}}
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    88
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    89
You can set up both on the command line. The program exits if either one of the folders is not correct; quotes are optional, but needed if your path contains spaces.
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    90
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    91
_Example_ 
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    92
{{{
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    93
$ /usr/bin/hedgewars --data-dir="/opt/local/share/" --config-dir=".hedgewars/tesing config/"
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    94
}}}
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    95
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    96
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    97
----
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    98
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    99
= Server =
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   100
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   101
Server can be configured to run on non standard port or to run as separate process.
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   102
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   103
  * {{{--port=PORT}}} - Server listens on PORT (-p)
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   104
  * {{{--dedicated=BOOL}}} - Spawn a separate process (-d)