CommandLineOptions.wiki
changeset 290 b681434f3ef9
parent 277 718cb9d18147
child 291 a40772f88335
equal deleted inserted replaced
289:531bc8c83742 290:b681434f3ef9
    18 = Engine =
    18 = Engine =
    19 
    19 
    20 It is possible to start a replay or save file directly from the terminal issuing the standalone {{{hwengine}}} utility with very simple syntax. 
    20 It is possible to start a replay or save file directly from the terminal issuing the standalone {{{hwengine}}} utility with very simple syntax. 
    21 
    21 
    22 == Standard Use ==
    22 == Standard Use ==
    23 {{{$ hwengine <path to replay file> [options]}}}
    23 {{{$ hwengine [options] <path to replay file>}}}
    24 
    24 
    25 By default hwengine will look in the current folder for game assets, if you wish to use another directory you should set the --prefix option.
    25 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.
    26 
    26 
    27 The replay file can be stored anywhere.
    27 The replay file can be stored anywhere. Note that, as always, engine can only load replay files generated from the same Hedgewars version.
    28 
    28 
    29 == Advanced Use ==
    29 == Advanced Use ==
    30 It is possible to specify settings by adding additional arguments:
    30 It is possible to specify almost any settings by adding additional arguments:
    31 
    31 
    32   * {{{--prefix [path to hedgewars folder]}}} - Sets the path to game folder
    32   * {{{--prefix [path to Hedgewars data folder]}}} - Sets the path to the system game data folder
    33   * {{{--user-prefix [path to hedgewars folder]}}} - Sets a secondary folder to find game content
    33   * {{{--user-prefix [path to custom Hedgewars folder]}}} - Sets the path to the custom data folder to find game content
    34   * {{{--locale [path to language file]}}} - Sets the game language
    34   * {{{--locale [language file]}}} - Sets the game language (en.txt for sample)
       
    35   * {{{--nick [string]}}} - Represents the user nickname
    35   * {{{--width [size]}}} - Starts the game with the given width (in pixels)
    36   * {{{--width [size]}}} - Starts the game with the given width (in pixels)
    36   * {{{--height [size]}}} - Starts the game with the given height (in pixels)
    37   * {{{--height [size]}}} - Starts the game with the given height (in pixels)
    37   * {{{--volume [level]}}} - Sets the volume level, possible values range from 0-100 (negative is muted)
    38   * {{{--volume [level]}}} - Sets the volume level, possible values range from 0-100 (negative is muted)
    38   * {{{--frame-interval [interval]}}} - Sets minimum timer interval between each frame in milliseconds. Ex: 40 would make the game run at most 25 fps
       
    39   * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
       
    40   * {{{--nomusic}}} - Disables music
    39   * {{{--nomusic}}} - Disables music
    41   * {{{--nosound}}} - Disables sound
    40   * {{{--nosound}}} - Disables sound effects
    42   * {{{--fullscreen}}} - Starts in fullscreen
    41   * {{{--fullscreen}}} - Starts game in fullscreen
    43   * {{{--showfps}}} - Shows a fps counter in the top right
    42   * {{{--showfps}}} - Shows a fps counter in the top right
    44   * {{{--altdmg}}} - Uses an alternative damage indicator
    43   * {{{--altdmg}}} - Uses an alternative damage indicator
    45   * {{{--low-quality}}} - Lowers the game quality
    44   * {{{--low-quality}}} - Lowers the game quality
    46   * {{{--stats-only}}} - Outputs the round information without launching the game
    45   * {{{--stereo [type]}}} - Sets stereoscopic rendering type (1 to 14)
    47   * {{{--help}}} - Shows this list of command line options
    46   * {{{--help}}} - Shows this list of command line options
    48 
    47 
    49 Note: any modification to the command line arguments should be reflected in the autostart .desktop file.
    48 === More Advanced use ===
       
    49 Generally you don't need such options but here they are for full documentation:
    50 
    50 
    51 == Deprecated Options ==
    51   * {{{--frame-interval [interval]}}} - Sets minimum timer interval between each frame in milliseconds. Ex: 40 would make the game run at most 25 fps
       
    52   * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
       
    53   * {{{--stats-only}}} - Outputs the round information without launching the game
       
    54   * {{{--fullscreen-width [size]}}} - Starts the game with the given width (in pixels) when fullscreen
       
    55   * {{{--fullscreen-height [size]}}} - Starts the game with the given height (in pixels) when fullscreen
    52 
    56 
    53 These options are outdated and may be removed in the future, please use the above options:
    57 Note: any modification to the command line arguments should be reflected in the autostart .desktop file, game.cpp, GameInterfaceBridge.m.
    54 
    58 
    55   * {{{--depth [color depth]}}}
    59 --prefix location is usually hardcoded at compile time, but should you changed the installation directory you can use this flag to override it; alternatively you can just specify --user-prefix.
    56   * {{{--set-video [screen width] [screen height] [color dept]}}}
       
    57   * {{{--set-audio [volume] [enable music] [enable sounds]}}}
       
    58   * {{{--set-other [language file] [full screen] [show FPS]}}}
       
    59   * {{{--set-multimedia [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]}}}
       
    60   * {{{--set-everything [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]}}}
       
    61 
       
    62 == Advanced Option Explanations ==
       
    63 
       
    64 --prefix and --user-prefix should refer to an installation folder where the game content can be found (DATA_INSTALL_DIR cmake flag).
       
    65 
    60 
    66 Personal game data is by default contained in the following directory:
    61 Personal game data is by default contained in the following directory:
    67 
    62 
    68   * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
    63   * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
    69   * _Linux_: {{{~/.hedgewars}}}
    64   * _Linux_: {{{~/.hedgewars}}}
    96 {{{
    91 {{{
    97 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd
    92 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd
    98 $ hwengine pathtohedgewars/ installpath/hedgewars/Data anywhere/replay.hwd --width 1024 --height 768
    93 $ hwengine pathtohedgewars/ installpath/hedgewars/Data anywhere/replay.hwd --width 1024 --height 768
    99 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound
    94 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound
   100 }}}
    95 }}}
   101 
       
   102 and some *BAD* examples
       
   103 
       
   104 {{{
       
   105 $ hwengine anywhere/replay.hwd
       
   106 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-video 1024 768
       
   107 $ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound 1
       
   108 }}}