Difference between revisions of "Command line"
m (3 revisions) |
(Reformat and update) |
||
Line 1: | Line 1: | ||
⚫ | |||
⚫ | |||
− | '''''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. |
||
− | |||
⚫ | |||
− | |||
⚫ | |||
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.) |
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 |
+ | Some switches don't have associated short command line switches, for example the many switches that control town growth rate calculation (see [[NewTownGrowthSwitches|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 <tt>--towngrowthratemin=50</tt> or <tt>--trainrefit on</tt>. 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 <tt>COMMAND.COM</tt> 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 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:<pre> |
+ | A few examples to explain how the command line works:<pre>ttdpatch -an- -i 90 -v</pre> |
− | will start TTDPatch will all switches enabled (a) except for the new non-stop handling (n-) which is turned off. |
+ | 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).<pre>ttdpatch -C mycfg.cfg</pre> |
− | will use the file |
+ | will use the file <tt>mycfg.cfg</tt> instead of the default <tt>ttdpatch.cfg</tt> to set the patches.<pre>ttdpatch -C mycfg.cfg -f- -W mycfg.cfg</pre> |
− | This will read |
+ | This will read <tt>mycfg.cfg</tt>, disable train refitting, and write the new configuration back to <tt>mycfg.cfg</tt> and then run TTD. |
+ | [[Category:Usage]][[Category:TTDPatch]][[Category:TTDPatch Manual]] |
Revision as of 13:36, 13 June 2011
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 - (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.