Difference between revisions of "Bit switches"
(Reformat and update) |
(Reformat and update) |
||
Line 1: | Line 1: | ||
+ | In addition to all the [[ManualThePatches|patch switches]], the following switches control the operation of TTDPatch itself: |
||
− | Switches with bit settings allow you to choose various settings of that switch. An example is the `[[MoreBuildOptions|morebuildoptions]]' switch. It has the following options, labeled (a) to (f): |
||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
− | ! !! |
+ | !Command line!!Configuration file!!Meaning |
|- |
|- |
||
+ | | -a || all on || Turn on all patch switches, except those marked as "off by default". |
||
− | |(a) || 0 || 1 || ctunnel || Tunnels may cross |
||
|- |
|- |
||
+ | | -h || --- || Show a brief help summarizing all available options. Run "<tt>ttdpatch -h | more</tt>" if it scrolls by too fast. |
||
− | |(b) || 1 || 2 || oilrefinery || Oil rigs and refineries may be built everywhere, not only near edges of map |
||
|- |
|- |
||
+ | | -v || verbose on/off || Before running TTD, display a brief summary of what switches are active |
||
− | |(c) || 2 || 4 || moreindustries || Allow multiple industries of the same type in one city |
||
|- |
|- |
||
+ | | -y || alwaysyes on/off || Do not wait for a keypress before starting TTDPatch if the TTD version is not recognized |
||
− | |(d) || 3 || 8 || removeobjects || Removal of statues, lighthouses and transmitters |
||
|- |
|- |
||
+ | | -C <file> || include <file> || Read a different [[ConfigurationFile|configuration file]]. |
||
− | |(e) || 4 || 16 || removeindustry || Removal of industries |
||
|- |
|- |
||
+ | | -W <file> || writecfg <file> || Write current configuration to this file. '''Note:''' Do not write to the file that contains this directive (i.e. in ttdpatch.cfg, do not put "writecfg ttdpatch.cfg"), because it will overwrite the file and discard all settings after the writecfg directive. |
||
− | |(f) || 5 || 32 || closeindustries || Allow identical industries very close together |
||
|- |
|- |
||
+ | | -Xn <file> || newgrfcfg <file> || Read the given file as new graphics configuration file, instead of <tt>newgrf(w).cfg</tt>. |
||
− | |(g) || 6 || 64 || enhancedbuoys || Build buoys that accept and distribute cargo (like docks) with Ctrl |
||
− | |- |
||
− | |(h) || 7 || 128 || bulldozesignals || Automatically remove signals when removing track with the bulldozer tool |
||
|} |
|} |
||
+ | If the -C option is given, the specified configuration file will be read instead of the default <tt>ttdpatch.cfg</tt>. (This does not apply to the "include <file>" option, obviously.) You can use several configuration files by having multiple -C switches, they will be read in the order you supply them. |
||
− | To find out how you specify the value for the `morebuildoptions' switch, you have two choices (three since alpha 38): |
||
+ | |||
− | *Use the "#101001" notation. Each number represents a bit, 1 meaning it is turned on, 0 meaning it is turned off. Note that it starts from the ''highest'' bit. For morebuildoptions, it would be "#fedcba" for the six options (f) down to (a). For example, to turn on (a), (d) and (e), you would use <tt>morebuildoptions #011001</tt>. The leading 0 is optional. |
||
+ | 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 <tt>ttdpatch.cfg</tt> for that matter) by using the -W switch or writecfg config file directive. 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. |
||
− | *Add all the values you want, and use that for the option. For example, for having morebuildoptions bits (a), (d) and (e), you add their values: 1+8+16=25. Therefore, you would use <tt>morebuildoptions 25</tt>. |
||
− | *As of TTDPatch 2.0.1 alpha 38, you also have a third option; the bit names. These work like on/off switches except that 1 and 0 may not be used. on/yes/y and off/no/n are all acceptable. For example, to turn on morebuildoptions bits (a), (d), and (e), you would use |
||
− | <pre>morebuildoptions.ctunnel on |
||
− | morebuildoptions.removeobjects on |
||
− | morebuildoptions.removeindustry on</pre> |
||
+ | Just for completeness, there are also a number of [[DebugSwitches|debug switches]], but they are not meant to be useful for most people. |
||
− | Note, some switches may have so-called "reserved" bits. These are bits that are unused at the moment. It is best to not set them, and leave them at zero (off) instead. |
||
[[Category:Usage]][[Category:TTDPatch]][[Category:TTDPatch Manual]] |
[[Category:Usage]][[Category:TTDPatch]][[Category:TTDPatch Manual]] |
Revision as of 13:40, 13 June 2011
In addition to all the patch switches, the following switches control the operation of TTDPatch itself:
Command line | Configuration file | Meaning |
---|---|---|
-a | all on | Turn on all patch switches, except those marked as "off by default". |
-h | --- | more" if it scrolls by too fast. |
-v | verbose on/off | Before running TTD, display a brief summary of what switches are active |
-y | alwaysyes on/off | Do not wait for a keypress before starting TTDPatch if the TTD version is not recognized |
-C <file> | include <file> | Read a different configuration file. |
-W <file> | writecfg <file> | Write current configuration to this file. Note: Do not write to the file that contains this directive (i.e. in ttdpatch.cfg, do not put "writecfg ttdpatch.cfg"), because it will overwrite the file and discard all settings after the writecfg directive. |
-Xn <file> | newgrfcfg <file> | Read the given file as new graphics configuration file, instead of newgrf(w).cfg. |
If the -C option is given, the specified configuration file will be read instead of the default ttdpatch.cfg. (This does not apply to the "include <file>" option, obviously.) You can use several configuration files by having multiple -C switches, they will be read in the order you supply them.
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 or writecfg config file directive. 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.
Just for completeness, there are also a number of debug switches, but they are not meant to be useful for most people.