CommandLineOptions.wiki
author Smasher816@gmail.com
Mon, 17 Dec 2012 00:14:18 +0000
changeset 277 718cb9d18147
parent 276 5d525c4b0130
child 290 b681434f3ef9
permissions -rw-r--r--
Edited wiki page CommandLineOptions through web user interface.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     1
#labels Documentation,Engine,Frontend
6
1744484ba5c0 Edited wiki page through web user interface.
kyberneticist
parents: 5
diff changeset
     2
The basic parameters to pass to the Hedgewars frontend and engine control the location of the game data, configuration files and saves.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     4
= Frontend =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     5
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     6
There are two options that enable to load the data directory and the configuration directory in non standard locations.
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     7
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     8
  * {{{--data-dir=[path containing 'hedgewars/Data']}}}
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     9
  * {{{--config-dir=[path containing 'Demos' 'Saves' etc.]}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    10
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    11
You can set up both on the command line. The program exits if either of the folders is not correct; quotes are optional, but needed if your path contains spaces
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    12
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    13
_Example_ 
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    14
{{{
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    15
$ /usr/bin/hedgewars --data-dir="/opt/local/share/" --config-dir=".hedgewars/tesing config/"
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    16
}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    17
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    18
= Engine =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    19
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    20
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
    21
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    22
== Standard Use ==
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    23
{{{$ hwengine <path to replay file> [options]}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    24
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    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.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    26
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    27
The replay file can be stored anywhere.
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    28
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    29
== Advanced Use ==
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    30
It is possible to specify 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
    31
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    32
  * {{{--prefix [path to hedgewars folder]}}} - Sets the path to game folder
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    33
  * {{{--user-prefix [path to hedgewars folder]}}} - Sets a secondary folder to find game content
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    34
  * {{{--locale [path to language file]}}} - Sets the game language
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    35
  * {{{--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
    36
  * {{{--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
    37
  * {{{--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
    38
  * {{{--frame-interval [interval]}}} - Sets minimum timer interval between each frame in milliseconds. Ex: 40 would make the game run at most 25 fps
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    39
  * {{{--raw-quality [flags]}}} - (For advanced users only). Manually specifies the reduced quality flags, see below. 
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    40
  * {{{--nomusic}}} - Disables music
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    41
  * {{{--nosound}}} - Disables sound
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    42
  * {{{--fullscreen}}} - Starts in fullscreen
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    43
  * {{{--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
    44
  * {{{--altdmg}}} - Uses an alternative damage indicator
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    45
  * {{{--low-quality}}} - Lowers the game quality
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    46
  * {{{--stats-only}}} - Outputs the round information without launching the game
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    47
  * {{{--help}}} - Shows this list of command line options
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    48
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    49
Note: any modification to the command line arguments should be reflected in the autostart .desktop file.
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    50
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    51
== Deprecated Options ==
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    52
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    53
These options are outdated and may be removed in the future, please use the above options:
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    54
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    55
  * {{{--depth [color depth]}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    56
  * {{{--set-video [screen width] [screen height] [color dept]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    57
  * {{{--set-audio [volume] [enable music] [enable sounds]}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    58
  * {{{--set-other [language file] [full screen] [show FPS]}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    59
  * {{{--set-multimedia [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    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]}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    61
276
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    62
== Advanced Option Explanations ==
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    63
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    64
--prefix and --user-prefix should refer to an installation folder where the game content can be found (DATA_INSTALL_DIR cmake flag).
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    65
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    66
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
    67
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    68
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    69
  * _Linux_: {{{~/.hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    70
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    71
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    72
--raw-quality value is determined by combining the values of the flags you wish to enable.
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    73
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
    74
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    75
  * {{{qLowRes        = 1}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    76
  * {{{rqBlurryLand   = 2}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    77
  * {{{rqNoBackground = 4}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    78
  * {{{rqSimpleRope   = 8}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    79
  * {{{rq2DWater      = 16}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    80
  * {{{rqAntiBoom     = 32}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    81
  * {{{rqKillFlakes   = 64}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    82
  * {{{rqSlowMenu     = 128}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    83
  * {{{rqPlainSplash  = 256}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    84
  * {{{rqClampLess    = 512}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    85
  * {{{rqTooltipsOff  = 1024}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    86
  * {{{rqDesyncVBlank = 2048}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    87
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    88
Ex: 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
    89
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    90
If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code.
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    91
[http://code.google.com/p/hedgewars/source/browse/hedgewars/ArgParsers.inc ArgParsers.inc]
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    92
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    93
== Some examples ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    94
let's see some *GOOD* examples
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    95
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    96
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    97
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    98
$ hwengine pathtohedgewars/ installpath/hedgewars/Data anywhere/replay.hwd --width 1024 --height 768
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    99
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
   100
}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
   101
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
   102
and some *BAD* examples
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
   103
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
   104
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
   105
$ hwengine anywhere/replay.hwd
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
   106
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --set-video 1024 768
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
   107
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound 1
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
   108
}}}