Difference between revisions of "Command line"
m (3 revisions) |
(No difference)
|
Revision as of 19:03, 12 June 2011
How to specify the patches directly on the command line.
Command Line
How to specify the patches directly on the command line.
The command line is an alternative way of selecting the patches. The format of the command line is
-+TTDPatch <nowiki>[-C cfg-file]</nowiki> <nowiki>[options]</nowiki> <nowiki>[CD Path]</nowiki> <nowiki>[-W cfg-file]</nowiki>+-
The options can start with either a - (dash) or / (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.
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 -+--towngrowthratemin=50+- or -+--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 -+COMMAND.COM+- does, so under Windows 95/98/Me you may have to use an external tool to specify many long switches).
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 `ttdpatch -h|more'.
A few examples to explain how the command line works:
-+ttdpatch -an- -i 90 -v+-
will 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 (-v).
-+ttdpatch -C mycfg.cfg+-
will use the file -+mycfg.cfg+- instead of the default -+ttdpatch.cfg+- to set the patches.
-+ttdpatch -C mycfg.cfg -f- -W mycfg.cfg+-
This will read -+mycfg.cfg+-, disable train refitting, and write the new configuration back to -+mycfg.cfg+- and then run TTD.