Difference between revisions of "Bit switches"
From TTWiki
Jump to navigationJump to search (Reformat and update) |
(Add sidebar) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Manual/Usage}} |
||
− | 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" |
||
|- |
|- |
||
− | ! |
+ | ! !!Bit!!Value!!Name!!Meaning |
|- |
|- |
||
+ | |(a) || 0 || 1 || ctunnel || Tunnels may cross |
||
− | | -a || all on || Turn on all patch switches, except those marked as "off by default". |
||
|- |
|- |
||
+ | |(b) || 1 || 2 || oilrefinery || Oil rigs and refineries may be built everywhere, not only near edges of map |
||
− | | -h || --- || Show a brief help summarizing all available options. Run "<tt>ttdpatch -h | more</tt>" if it scrolls by too fast. |
||
|- |
|- |
||
+ | |(c) || 2 || 4 || moreindustries || Allow multiple industries of the same type in one city |
||
− | | -v || verbose on/off || Before running TTD, display a brief summary of what switches are active |
||
|- |
|- |
||
+ | |(d) || 3 || 8 || removeobjects || Removal of statues, lighthouses and transmitters |
||
− | | -y || alwaysyes on/off || Do not wait for a keypress before starting TTDPatch if the TTD version is not recognized |
||
|- |
|- |
||
+ | |(e) || 4 || 16 || removeindustry || Removal of industries |
||
− | | -C <file> || include <file> || Read a different [[ConfigurationFile|configuration file]]. |
||
|- |
|- |
||
+ | |(f) || 5 || 32 || closeindustries || Allow identical industries very close together |
||
− | | -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. |
||
|- |
|- |
||
+ | |(g) || 6 || 64 || enhancedbuoys || Build buoys that accept and distribute cargo (like docks) with Ctrl |
||
− | | -Xn <file> || newgrfcfg <file> || Read the given file as new graphics configuration file, instead of <tt>newgrf(w).cfg</tt>. |
||
+ | |- |
||
+ | |(h) || 7 || 128 || bulldozesignals || Automatically remove signals when removing track with the bulldozer tool |
||
|} |
|} |
||
+ | To find out how you specify the value for the `morebuildoptions' switch, you have two choices (three since alpha 38): |
||
− | 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. |
||
+ | *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. |
||
− | |||
+ | *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>. |
||
− | 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. |
||
+ | *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> |
||
+ | 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. |
||
− | Just for completeness, there are also a number of [[DebugSwitches|debug switches]], but they are not meant to be useful for most people. |
||
− | [[Category:Usage]][[Category:TTDPatch]][[Category:TTDPatch Manual]] |
Latest revision as of 13:53, 31 July 2011
Introduction
Usage
Patches
Additional Reading
Additional Reading
Switches with bit settings allow you to choose various settings of that switch. An example is the `morebuildoptions' switch. It has the following options, labeled (a) to (f):
Bit | Value | Name | Meaning | |
---|---|---|---|---|
(a) | 0 | 1 | ctunnel | Tunnels may cross |
(b) | 1 | 2 | oilrefinery | Oil rigs and refineries may be built everywhere, not only near edges of map |
(c) | 2 | 4 | moreindustries | Allow multiple industries of the same type in one city |
(d) | 3 | 8 | removeobjects | Removal of statues, lighthouses and transmitters |
(e) | 4 | 16 | removeindustry | Removal of industries |
(f) | 5 | 32 | closeindustries | Allow identical industries very close together |
(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 |
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 morebuildoptions #011001. The leading 0 is optional.
- 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 morebuildoptions 25.
- 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
morebuildoptions.ctunnel on morebuildoptions.removeobjects on morebuildoptions.removeindustry on
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.