CommandLineOptions.wiki
author vittorio.giovara@gmail.com
Tue, 29 Jan 2013 23:15:57 +0000
changeset 292 27c4a3aec2a0
parent 291 a40772f88335
child 293 2dc603c7d7e6
permissions -rw-r--r--
summary
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
292
27c4a3aec2a0 summary
vittorio.giovara@gmail.com
parents: 291
diff changeset
     1
#summary Full list of command line switches for hedgewars and hwengine
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
6
1744484ba5c0 Edited wiki page through web user interface.
kyberneticist
parents: 5
diff changeset
     4
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
     5
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     6
= Frontend =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
     7
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
     8
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
     9
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    10
  * {{{--data-dir=[path containing 'hedgewars/Data']}}}
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    11
  * {{{--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
    12
5
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    13
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
    14
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    15
_Example_ 
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    16
{{{
5889169b9459 Added frontend options
vittorio.giovara@gmail.com
parents: 4
diff changeset
    17
$ /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
    18
}}}
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
= Engine =
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    21
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    22
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
    23
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    24
== Standard Use ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    25
{{{$ hwengine [options] <path to replay file>}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    26
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    27
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
    28
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    29
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
    30
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    31
== Advanced Use ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    32
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
    33
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    34
  * {{{--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
    35
  * {{{--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
    36
  * {{{--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
    37
  * {{{--nick [string]}}} - Represents the user nickname
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    38
  * {{{--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
    39
  * {{{--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
    40
  * {{{--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
    41
  * {{{--nomusic}}} - Disables music
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    42
  * {{{--nosound}}} - Disables sound effects
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    43
  * {{{--fullscreen}}} - Starts game in fullscreen
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    44
  * {{{--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
    45
  * {{{--altdmg}}} - Uses an alternative damage indicator
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    46
  * {{{--low-quality}}} - Lowers the game quality
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    47
  * {{{--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
    48
  * {{{--help}}} - Shows this list of command line options
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    49
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    50
=== More Advanced use ===
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    51
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
    52
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    53
  * {{{--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
    54
  * {{{--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
    55
  * {{{--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
    56
  * {{{--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
    57
  * {{{--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
    58
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    59
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
    60
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    61
--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
    62
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    63
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
    64
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    65
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    66
  * _Linux_: {{{~/.hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    67
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    68
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    69
--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
    70
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    71
  * {{{qLowRes        = 1}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    72
  * {{{rqBlurryLand   = 2}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    73
  * {{{rqNoBackground = 4}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    74
  * {{{rqSimpleRope   = 8}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    75
  * {{{rq2DWater      = 16}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    76
  * {{{rqAntiBoom     = 32}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    77
  * {{{rqKillFlakes   = 64}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    78
  * {{{rqSlowMenu     = 128}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    79
  * {{{rqPlainSplash  = 256}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    80
  * {{{rqClampLess    = 512}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    81
  * {{{rqTooltipsOff  = 1024}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    82
  * {{{rqDesyncVBlank = 2048}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    83
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    84
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
    85
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    86
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
    87
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    88
If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code.
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    89
[http://code.google.com/p/hedgewars/source/browse/hedgewars/ArgParsers.inc ArgParsers.inc]