CommandLineOptions.wiki
changeset 760 7d419f65a27d
parent 735 f749a4528835
child 798 30c5f1ebd552
equal deleted inserted replaced
759:357ba2e4ea16 760:7d419f65a27d
     1 #summary Full list of command line switches for hedgewars, hwengine and server
     1 #summary Full list of command line switches for hedgewars, hwengine and server
     2 #labels Documentation,Engine,Frontend
     2 #labels Documentation,Engine,Frontend
     3 
     3 
     4 *Table of Contents*
     4 = Commnd-line options =
       
     5 
     5 <wiki:toc max_depth="2" />
     6 <wiki:toc max_depth="2" />
     6 
     7 
     7 ----
     8 == Frontend ==
     8 
       
     9 = Frontend =
       
    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).
     9 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).
    11 
    10 
    12 Symtax: `hedgewars [OPTION …] [CONNECTSTRING]`
    11 Symtax: `hedgewars [OPTION …] [CONNECTSTRING]`
    13 
    12 
    14 All command-line arguments are optional. When invoked without any command-line arguments, the Hedgewars frontend will start normally with standard directory locations.
    13 All command-line arguments are optional. When invoked without any command-line arguments, the Hedgewars frontend will start normally with standard directory locations.
    21 
    20 
    22 The program exits if either one of the folders is not correct; quotes are optional, but needed if your path contains spaces.
    21 The program exits if either one of the folders is not correct; quotes are optional, but needed if your path contains spaces.
    23 
    22 
    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).
    23 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).
    25 
    24 
    26 == Examples ==
    25 === Examples ===
    27 This is an example on GNU/Linux on a shell (the dollar sign is not part of the input):
    26 This is an example on GNU/Linux on a shell (the dollar sign is not part of the input):
    28 
    27 
    29 {{{
    28 {{{
    30 $ /usr/bin/hedgewars --data-dir="/opt/local/share/" --config-dir=".hedgewars/tesing config/"
    29 $ /usr/bin/hedgewars --data-dir="/opt/local/share/" --config-dir=".hedgewars/tesing config/"
    31 }}}
    30 }}}
    37 $ /usr/bin/hedgewars hwplay://example.org
    36 $ /usr/bin/hedgewars hwplay://example.org
    38 }}}
    37 }}}
    39 
    38 
    40 Makes Hedgewars join an alternative server `example.org` on start.
    39 Makes Hedgewars join an alternative server `example.org` on start.
    41 
    40 
    42 = Engine =
    41 == Engine ==
    43 The engine is the program which runs the actual game.
    42 The engine is the program which runs the actual game.
    44 
    43 
    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. 
    44 It is possible to start a replay or save file directly from the console issuing the standalone {{{hwengine}}} utility with a very simple syntax. 
    46 
    45 
    47 == Standard usage ==
    46 === Standard usage ===
    48 {{{hwengine [options] <path to replay file>}}}
    47 {{{hwengine [options] <path to replay file>}}}
    49 
    48 
    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.
    49 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.
    51 
    50 
    52 The replay file can be stored anywhere. Note that, as always, engine can only load replay files generated from the same Hedgewars version.
    51 The replay file can be stored anywhere. Note that, as always, engine can only load replay files generated from the same Hedgewars version.
    53 
    52 
    54 == Advanced usage ==
    53 === Advanced usage ===
    55 It is possible to specify almost any settings by adding additional arguments:
    54 It is possible to specify almost any settings by adding additional arguments:
    56 
    55 
    57   * {{{--prefix [path to Hedgewars data folder]}}} - Sets the path to the system game data folder
    56   * {{{--prefix [path to Hedgewars data folder]}}} - Sets the path to the system game data folder
    58   * {{{--user-prefix [path to custom Hedgewars folder]}}} - Sets the path to the custom data folder to find game content
    57   * {{{--user-prefix [path to custom Hedgewars folder]}}} - Sets the path to the custom data folder to find game content
    59   * {{{--locale [language file]}}} - Sets the game language (en.txt for sample)
    58   * {{{--locale [language file]}}} - Sets the game language (en.txt for sample)
    68   * {{{--altdmg}}} - Uses an alternative damage indicator
    67   * {{{--altdmg}}} - Uses an alternative damage indicator
    69   * {{{--low-quality}}} - Lowers the game quality
    68   * {{{--low-quality}}} - Lowers the game quality
    70   * {{{--stereo [type]}}} - Sets stereoscopic rendering type (1 to 14)
    69   * {{{--stereo [type]}}} - Sets stereoscopic rendering type (1 to 14)
    71   * {{{--help}}} - Shows a list of command line options and exits the program directly after
    70   * {{{--help}}} - Shows a list of command line options and exits the program directly after
    72 
    71 
    73 === More advanced usage ===
    72 ==== More advanced usage ====
    74 Generally you don't need to set these options but here they are for full documentation:
    73 Generally you don't need to set these options but here they are for full documentation:
    75 
    74 
    76   * {{{--frame-interval [interval]}}} - Sets minimum interval (in ms) between each frame. Eg, 40 would make the game run at most 25 fps
    75   * {{{--frame-interval [interval]}}} - Sets minimum interval (in ms) between each frame. Eg, 40 would make the game run at most 25 fps
    77   * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
    76   * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
    78   * {{{--stats-only}}} - Outputs the round information without launching the game, useful for statistics only
    77   * {{{--stats-only}}} - Outputs the round information without launching the game, useful for statistics only
   109 There are some internal commands, such as `--internal`, `--port [int]`, that are not meant for command-line usage.
   108 There are some internal commands, such as `--internal`, `--port [int]`, that are not meant for command-line usage.
   110 
   109 
   111 If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code:
   110 If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code:
   112 [http://hg.hedgewars.org/hedgewars/file/default/hedgewars/ArgParsers.inc ArgParsers.inc]
   111 [http://hg.hedgewars.org/hedgewars/file/default/hedgewars/ArgParsers.inc ArgParsers.inc]
   113 
   112 
   114 ----
   113 == Server ==
   115 
       
   116 = Server =
       
   117 
   114 
   118 The server can be configured to run on non standard port or to run as separate process.
   115 The server can be configured to run on non standard port or to run as separate process.
   119 
   116 
   120   * {{{--port=PORT}}} or {{{-p PORT}}}: Server listens on `PORT`
   117   * {{{--port=PORT}}} or {{{-p PORT}}}: Server listens on `PORT`
   121   * {{{--dedicated=BOOL}}} or {{{-d BOOL}}}: Spawn a separate process (`BOOL` is either “True” or “False”)
   118   * {{{--dedicated=BOOL}}} or {{{-d BOOL}}}: Spawn a separate process (`BOOL` is either “True” or “False”)