CommandLineOptions.wiki
author vittorio.giovara@gmail.com
Tue, 29 Jan 2013 23:14:29 +0000
changeset 291 a40772f88335
parent 290 b681434f3ef9
child 292 27c4a3aec2a0
permissions -rw-r--r--
Removed old examples, mentioned presence of internal commands
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 ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    23
{{{$ hwengine [options] <path to replay file>}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    24
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
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 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
    26
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    27
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
    28
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    29
== Advanced Use ==
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    30
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
    31
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    32
  * {{{--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
    33
  * {{{--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
    34
  * {{{--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
    35
  * {{{--nick [string]}}} - Represents the user nickname
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    36
  * {{{--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
    37
  * {{{--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
    38
  * {{{--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
    39
  * {{{--nomusic}}} - Disables music
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    40
  * {{{--nosound}}} - Disables sound effects
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    41
  * {{{--fullscreen}}} - Starts game in fullscreen
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    42
  * {{{--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
    43
  * {{{--altdmg}}} - Uses an alternative damage indicator
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    44
  * {{{--low-quality}}} - Lowers the game quality
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    45
  * {{{--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
    46
  * {{{--help}}} - Shows this list of command line options
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    47
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    48
=== More Advanced use ===
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    49
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
    50
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    51
  * {{{--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
    52
  * {{{--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
    53
  * {{{--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
    54
  * {{{--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
    55
  * {{{--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
    56
290
b681434f3ef9 Updated full command line options, removed deprecated references
vittorio.giovara@gmail.com
parents: 277
diff changeset
    57
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
    58
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    59
--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
    60
277
718cb9d18147 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 276
diff changeset
    61
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
    62
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    63
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    64
  * _Linux_: {{{~/.hedgewars}}}
5d525c4b0130 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 275
diff changeset
    65
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    66
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    67
--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
    68
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    69
  * {{{qLowRes        = 1}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    70
  * {{{rqBlurryLand   = 2}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    71
  * {{{rqNoBackground = 4}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    72
  * {{{rqSimpleRope   = 8}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    73
  * {{{rq2DWater      = 16}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    74
  * {{{rqAntiBoom     = 32}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    75
  * {{{rqKillFlakes   = 64}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    76
  * {{{rqSlowMenu     = 128}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    77
  * {{{rqPlainSplash  = 256}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    78
  * {{{rqClampLess    = 512}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    79
  * {{{rqTooltipsOff  = 1024}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    80
  * {{{rqDesyncVBlank = 2048}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    81
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    82
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
    83
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    84
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
    85
291
a40772f88335 Removed old examples, mentioned presence of internal commands
vittorio.giovara@gmail.com
parents: 290
diff changeset
    86
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
    87
[http://code.google.com/p/hedgewars/source/browse/hedgewars/ArgParsers.inc ArgParsers.inc]