Difference between revisions of "Bit switches"

From TTWiki
Jump to navigationJump to search
m (Reverted edits by Orudge (Talk) to last revision by Flamelord)
(Getting confused with multiple tabs open, here)
Line 1: Line 1:
 
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"
'''''Switches with lots of settings'''''
 
  +
|-
 
 
! !!Bit!!Value!!Name!!Meaning
=Bit Switches=
 
  +
|-
 
 
|(a) || 0 || 1 || ctunnel || Tunnels may cross
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):
 
  +
|-
 
 
|(b) || 1 || 2 || oilrefinery || Oil rigs and refineries may be built everywhere, not only near edges of map
|||Bit|Value|name|Meaning
 
  +
|-
 
 
|(c) || 2 || 4 || moreindustries || Allow multiple industries of the same type in one city
(a)|0|1|ctunnel|Tunnels may cross
 
  +
|-
 
 
|(d) || 3 || 8 || removeobjects || Removal of statues, lighthouses and transmitters
(b)|1|2|oilrefinery|Oil rigs and refineries may be built everywhere, not only near edges of map
 
  +
|-
 
 
|(e) || 4 || 16 || removeindustry || Removal of industries
(c)|2|4|moreindustries|Allow multiple industries of the same type in one city
 
  +
|-
 
 
|(f) || 5 || 32 || closeindustries || Allow identical industries very close together
(d)|3|8|removeobjects|Removal of statues, lighthouses and transmitters
 
  +
|-
 
 
|(g) || 6 || 64 || enhancedbuoys || Build buoys that accept and distribute cargo (like docks) with Ctrl
(e)|4|16|removeindustry|Removal of industries
 
  +
|-
 
 
|(h) || 7 || 128 || bulldozesignals || Automatically remove signals when removing track with the bulldozer tool
(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):
 
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.
+
*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. &nbsp;For example, for having morebuildoptions bits (a), (d) and (e), you add their values: 1+8+16=25. &nbsp;Therefore, you would use -+morebuildoptions 25+-.
+
*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~pp~morebuildoptions.ctunnel on
+
*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.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.
morebuildoptions.removeindustry on~/pp~
 
  +
[[Category:Usage]][[Category:TTDPatch]][[Category:TTDPatch Manual]]
 
Note, some switches may have so-called &quot;reserved&quot; bits. These are bits that are unused at the moment. &nbsp;It is best to not set them, and leave them at zero (off) instead.
 

Revision as of 13:42, 13 June 2011

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.