CommandLineOptions.wiki
author Wuzzy
Sun, 17 Jan 2016 12:52:30 +0000
changeset 751 d9b0213fc1a3
parent 735 f749a4528835
child 760 7d419f65a27d
permissions -rw-r--r--
Translations: Add title, fix header levels
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
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
     9
= Frontend =
734
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    10
The frontend in Hedgewars refers to the main and all the other menus before an actual game has started. It does *not* refer to the part where the actual game takes place (see “Engine” for this).
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    11
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    12
Symtax: `hedgewars [OPTION …] [CONNECTSTRING]`
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    13
734
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    14
All command-line arguments are optional. When invoked without any command-line arguments, the Hedgewars frontend will start normally with standard directory locations.
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    15
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    16
`OPTION` is a sequence of one or more options (seperated by spaces. There are options that enable to load the data directory and the configuration directory in non-standard locations. The following options are available:
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    17
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    18
  * {{{--data-dir=[path containing 'hedgewars/Data']}}}: Data directory
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    19
  * {{{--config-dir=[path containing 'Demos' 'Saves' etc.]}}}: Configuration directory
735
f749a4528835 CommandLineOptions: clarify --help
Wuzzy
parents: 734
diff changeset
    20
  * {{{--help:}}}: Display help about command-line arguments and exit the program thereafter
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    21
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    22
The program exits if either one of the folders is not correct; quotes are optional, but needed if your path contains spaces.
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    23
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    24
Specify `CONNECTSTRING` if you want Hedgewars to join a server and possibly even a room on start. This must be a `hwplay` URL (see [HWPlaySchemeSyntax] to learn more about this).
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    25
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    26
== Examples ==
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    27
This is an example on GNU/Linux on a shell (the dollar sign is not part of the input):
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    28
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    29
{{{
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    30
$ /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
    31
}}}
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    32
733
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    33
This starts Hedgewars with the data directory `/opt/local/share/` and the configuration directory `.hedgewars/testing config/` (relative to the current working directory).
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    34
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    35
Another example:
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    36
{{{
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    37
$ /usr/bin/hedgewars hwplay://example.org
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    38
}}}
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    39
5e67a58c1361 CommandLineOptions: Update command-line arguments of frontend
Wuzzy
parents: 587
diff changeset
    40
Makes Hedgewars join an alternative server `example.org` on start.
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
    41
734
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    42
= Engine =
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    43
The engine is the program which runs the actual game.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    44
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    45
It is possible to start a replay or save file directly from the console issuing the standalone {{{hwengine}}} utility with a very simple syntax. 
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    46
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    47
== Standard usage ==
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    48
{{{hwengine [options] <path to replay file>}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    49
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    50
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` options. See below for even more commands.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    51
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    52
The replay file can be stored anywhere. Note that, as always, engine can only load replay files generated from the same Hedgewars version.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    53
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    54
== Advanced usage ==
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    55
It is possible to specify almost any settings by adding additional arguments:
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    56
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    57
  * {{{--prefix [path to Hedgewars data folder]}}} - Sets the path to the system game data folder
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    58
  * {{{--user-prefix [path to custom Hedgewars folder]}}} - Sets the path to the custom data folder to find game content
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    59
  * {{{--locale [language file]}}} - Sets the game language (en.txt for sample)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    60
  * {{{--nick [string]}}} - Represents the user nickname
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    61
  * {{{--width [size]}}} - Starts the game with the given width (in pixels)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    62
  * {{{--height [size]}}} - Starts the game with the given height (in pixels)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    63
  * {{{--volume [level]}}} - Sets the volume level, possible values range from 0-100 (negative is muted)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    64
  * {{{--nomusic}}} - Disables music
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    65
  * {{{--nosound}}} - Disables sound effects
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    66
  * {{{--fullscreen}}} - Starts game in fullscreen
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    67
  * {{{--showfps}}} - Shows a fps counter in the top right
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    68
  * {{{--altdmg}}} - Uses an alternative damage indicator
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    69
  * {{{--low-quality}}} - Lowers the game quality
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    70
  * {{{--stereo [type]}}} - Sets stereoscopic rendering type (1 to 14)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    71
  * {{{--help}}} - Shows a list of command line options and exits the program directly after
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    72
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    73
=== More advanced usage ===
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    74
Generally you don't need to set these options but here they are for full documentation:
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    75
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    76
  * {{{--frame-interval [interval]}}} - Sets minimum interval (in ms) between each frame. Eg, 40 would make the game run at most 25 fps
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    77
  * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    78
  * {{{--stats-only}}} - Outputs the round information without launching the game, useful for statistics only
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    79
  * {{{--fullscreen-width [size]}}} - Starts the game with the given width (in pixels) when fullscreen
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    80
  * {{{--fullscreen-height [size]}}} - Starts the game with the given height (in pixels) when fullscreen
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    81
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    82
Note: any modification to the command line arguments should be reflected in the autostart `.desktop` file, `game.cpp`, `GameInterfaceBridge.m`.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    83
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    84
`--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`.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    85
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    86
Personal game data is by default contained in one of the following directories:
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    87
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    88
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    89
  * _GNU/Linux_: {{{~/.hedgewars}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    90
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    91
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    92
`--raw-quality value` is determined by combining the values of the flags you wish to enable. Up-to-date variables (in hexadecimal) are online here: [http://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas#l62 uConsts.pas]
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    93
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    94
  * {{{qLowRes        = 1}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    95
  * {{{rqBlurryLand   = 2}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    96
  * {{{rqNoBackground = 4}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    97
  * {{{rqSimpleRope   = 8}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    98
  * {{{rq2DWater      = 16}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
    99
  * {{{rqAntiBoom     = 32}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   100
  * {{{rqKillFlakes   = 64}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   101
  * {{{rqSlowMenu     = 128}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   102
  * {{{rqPlainSplash  = 256}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   103
  * {{{rqClampLess    = 512}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   104
  * {{{rqTooltipsOff  = 1024}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   105
  * {{{rqDesyncVBlank = 2048}}}
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   106
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   107
E.g., to have blurry land and simple rope, you would use the number 10 (2+8).
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   108
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   109
There are some internal commands, such as `--internal`, `--port [int]`, that are not meant for command-line usage.
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   110
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   111
If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code:
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   112
[http://hg.hedgewars.org/hedgewars/file/default/hedgewars/ArgParsers.inc ArgParsers.inc]
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   113
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   114
----
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   115
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   116
= Server =
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   117
734
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   118
The server can be configured to run on non standard port or to run as separate process.
293
2dc603c7d7e6 added server options and table of contents
vittorio.giovara@gmail.com
parents: 292
diff changeset
   119
734
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   120
  * {{{--port=PORT}}} or {{{-p PORT}}}: Server listens on `PORT`
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   121
  * {{{--dedicated=BOOL}}} or {{{-d BOOL}}}: Spawn a separate process (`BOOL` is either “True” or “False”)
63cad3d4a62b CommandLineOptions: Reorder text and simple copy-editing
Wuzzy
parents: 733
diff changeset
   122
  * {{{--help}}}: Shows a short text explaining the command-line arguments and exists the program thereafter.