Node:Command Line, Next:Multiplayer Games, Previous:Configuration File, Up:Usage
The command line is an alternative way of selecting the patches.
The format of the command line is
TTDPatch [-C cfg-file] [options] [CD Path] [-W cfg-file]
The options can start with either a
/ (slash), followed by the
list of options. All options can have another
- after them to
turn them off, and if there's an option that takes a parameter, the next option
will be used as that value.
Each option is given by either a single letter, or by a capital "X" or "Y" followed by a letter, e.g. -abcXaXbYc. Note that all switches are case sensitive, and distinguish between upper case and lower case. Therefore, -g and -G are different switches.
In addition to all the patch switches (see The Patches), the following options control operation of TTDPatch:
-C option is given, the specified configuration file will be
read instead of the default
ttdpatch.cfg. You can use several
configuration files by having multiple
-C switches, they will be
read in the order you supply them.
In addition, if you have given a CD Path, if will be passed to TTD and tell it where it should go looking for the CD. (This only applies to the DOS version.)
Some switches don't have associated short command line switches, for example the many switches that control
town growth rate calculation (see New Town Growth Switches). However,
you can use a so-called `long switch', which is two dashes followed by the full
switch name, for example
--trainrefit on. This is
not as useful for the DOS version, which has a limit of 127 characters for the command
line, but the Windows version has no such limit (although the command interpreter
so under Windows 95/98/Me you may have to use an external tool to specify many long switches).
And finally, after you have set all your switches the way you like them, you
can tell TTDPatch to write them to your own configuration file (or
ttdpatch.cfg for that matter) by using the
-W switch. With
this, TTDPatch will create a commented file that has all the switches set as
they are when the
-W is encountered on the command line.
If you need a short reminder of all options, run
ttdpatch -h which will
show a short summary of all command line switches. If it's too much to fit
on your screen, try
A few examples to explain how the command line works:
ttdpatch -an- -i 90 -vwill start TTDPatch will all switches enabled (
a) except for the new non-stop handling (
n-) which is turned off. The default service interval is set to 90 days (
-i 90), and before running TTD, all switches will be displayed to verify they are the way you want (
ttdpatch -C mycfg.cfgwill use the file
mycfg.cfginstead of the default
ttdpatch.cfgto set the patches.
ttdpatch -C mycfg.cfg -f- -W mycfg.cfgThis will read
mycfg.cfg, disable train refitting, and write the new configuration back to
mycfg.cfgand then run TTD.