Help:CommandLineArgs

From Spring
Revision as of 18:22, 11 October 2014 by Flozi (talk | contribs) (page to document command-line args)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Spring Command-line Arguments

Spring has several command-line arguments which have various uses from setting window size, choosing the starting map & game (as of 98.0 these can be specified as a rapid tag) and various developer debugging tools.

spring://

In Spring 97.0 a new syntax was added which should in the long term replace Script.txt for clients, so that it is only needed for hosts, without the need to create a file to start Spring as a client. Spring links spring:// URL scheme in the OS, so you can start such URLs from browser (as UT99 did). E.g. you can place a spectator link on your website to join your autohosts and/or you can use it for weblobbies.

The syntax is as follows: spring spring://username:passwd@hostname:port

All except hostname are optional, i.e. spring://localhost will work fine.

How to display possible arguments

Linux: ./spring --help

Windows: spring --help > out.txt

Possible Arguments

As of 98.0:

Usage: spring [options] [path_to_script.txt or demo.sdf]
Allowed options:

  -h [ --help ]            This help message
  -V [ --version ]         Display program version
  --sync-version           Display program sync version (for online gaming)
  -f [ --fullscreen ]      Run in fullscreen mode
  -w [ --window ]          Run in windowed mode
  -x [ --xresolution ] arg Set X resolution
  -y [ --yresolution ] arg Set Y resolution
  -b [ --minimise ]        Start in background (minimised)
  --nocolor                Disables colorized stdout
  -q [ --quiet ]           Ignore unrecognized arguments
  -s [ --server ] arg      Run as a server
  -t [ --textureatlas ]    Dump each finalized textureatlas in 
                           textureatlasN.tga
  --benchmark arg          Enable benchmark mode (writes a benchmark.data 
                           file). The given number specifies the timespan to 
                           test.
  --benchmarkstart arg     Benchmark start time in minutes.
  --list-ai-interfaces     Dump a list of available AI Interfaces to stdout
  --list-skirmish-ais      Dump a list of available Skirmish AIs to stdout
  --list-config-vars       Dump a list of config vars and meta data to stdout
  --list-def-tags          Dump a list of all unitdef-, weapondef-, ... tags 
                           and meta data to stdout
  --list-ceg-classes       Dump a list of available projectile classes to 
                           stdout
  --test-creg              Test if all CREG classes are completed
  --safemode               Turns off many things that are known to cause 
                           problems (i.e. on PC/Mac's with lower-end graphic 
                           cards)
  -C [ --config ] arg      Exclusive configuration file
  -i [ --isolation ]       Limit the data-dir (games & maps) scanner to one 
                           directory
  --isolation-dir arg      Specify the isolation-mode data-dir (see 
                           --isolation)
  -d [ --write-dir ] arg   Specify where Spring writes to.
  -g [ --game ] arg        Specify the game that will be instantly loaded
  -m [ --map ] arg         Specify the map that will be instantly loaded
  -n [ --name ] arg        Set your player name

Spring 98.0
This program is licensed under the GNU General Public License