CommandLineOptions.wiki
author Smasher816@gmail.com
Sat, 15 Dec 2012 23:18:47 +0000
changeset 275 910cde9995b8
parent 274 aae06d0bd175
child 276 5d525c4b0130
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 ==
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    23
{{{$ hwengine [path to hedgewars folder] <path to data folder> <path to replay file>}}}
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    24
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    25
The data folder is where you installed the game, or where you configured it at compile time.
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    26
By default it is contained in the following directory:
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    27
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    28
  * _Windows_: {{{%USERPROFILE%\Hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    29
  * _Linux_: {{{~/.hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    30
  * _Mac OS X_: {{{~/Library/Application Support/Hedgewars}}}
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    31
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    32
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
    33
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    34
== Advanced Use ==
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    35
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
    36
275
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
    37
  * {{{--user-dir [path to hedgewars folder]}}} - Sets the path to game folder
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    38
  * {{{--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
    39
  * {{{--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
    40
  * {{{--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
    41
  * {{{--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
    42
  * {{{--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
    43
  * {{{--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
    44
  * {{{--nomusic}}} - Disables music
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    45
  * {{{--nosound}}} - Disables sound
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    46
  * {{{--fullscreen}}} - Starts in fullscreen
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    47
  * {{{--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
    48
  * {{{--altdmg}}} - Uses an alternative damage indicator
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    49
  * {{{--low-quality}}} - Lowers the game quality
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    50
  * {{{--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
    51
  * {{{--help}}} - Shows this list of command line options
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    52
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    53
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
    54
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    55
== Deprecated Options ==
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    56
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    57
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
    58
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    59
  * {{{--depth [color depth]}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    60
  * {{{--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
    61
  * {{{--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
    62
  * {{{--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
    63
  * {{{--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
    64
  * {{{--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
    65
275
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
    66
== Advanced Quality Options ==
273
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    67
e165ada6aae2 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 6
diff changeset
    68
--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
    69
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
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    86
== Some examples ==
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    87
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
    88
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    89
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    90
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd
274
aae06d0bd175 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 273
diff changeset
    91
$ 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
    92
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    93
}}}
3
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    94
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    95
and some *BAD* examples
ba86e3ce90c3 Ported command line options from http://www.hedgewars.org/node/1465
vittorio.giovara@gmail.com
parents:
diff changeset
    96
4
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    97
{{{
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    98
$ hwengine anywhere/replay.hwd
99b86a2d46d2 fix example section
vittorio.giovara@gmail.com
parents: 3
diff changeset
    99
$ 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
   100
$ hwengine installpath/hedgewars/Data anywhere/replay.hwd --nosound 1
275
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
   101
}}}
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
   102
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
   103
If you want to get your hands dirty and see how the engine interprets commands, you can check out the source code.
910cde9995b8 Edited wiki page CommandLineOptions through web user interface.
Smasher816@gmail.com
parents: 274
diff changeset
   104
[http://code.google.com/p/hedgewars/source/browse/hedgewars/ArgParsers.inc ArgParsers.inc]