v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Kami/Logic gates

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
'''''ToDo'''''
 
'''''ToDo'''''
 
== General ==
 
== General ==
[[Computing]] in dwarf fortress is the practice of setting up complex constructions to perform logical operations and calculations, ideally to control some functionality of your fortress.
 
This is a guide leading deep into the topic, giving advanced assistance for [[Dwarf|people]] who want to create their own dwarfputer. It does not stick to a special ([[Mechanical logic|mechanical]], [[Fluid logic|fluid]], ...) logic but tries to measure the adventages, disadventages and best practices from all [[Computing#Disciplines|disciplines]]. This guide adresses to people who are familar with the concept of [[Computing#Binary logic|binary logic]] and have a basic understanding of computing in dwarf fortress.
 
  
 
== Key ==
 
== Key ==
Line 13: Line 11:
 
|any tile
 
|any tile
 
|-
 
|-
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 19: Line 17:
 
|floor
 
|floor
 
|-
 
|-
|{{RTL|#BBB}}
+
|{{RTL|#888}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 29: Line 27:
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
|solid
+
|wall
 
|-
 
|-
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 37: Line 35:
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|-
 
|-
|{{RTL|#840|║|#FFF}}
+
|{{RTL|#222|·|#888}}
|{{RTL|#FFF}}
 
|{{RTL|#840|o|#FFF}}
 
|{{RTL|#FFF}}
 
|[[axle]]
 
|-
 
|{{RTL|#222|·|#BBB}}
 
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 67: Line 59:
 
|[[gear assembly]]
 
|[[gear assembly]]
 
|-
 
|-
|{{RTL|#FFF||||||1|#F88|left}}
+
|{{RTL|#222|▲|#CCC}}
|{{RTL|#FFF||||||…|#F88|left}}
 
|{{RTL|#FFF||||||7|#F88|left}}
 
|{{RTL|#FFF}}
 
|[[magma]] depth
 
|-
 
|{{RTL|#222|▲|#DDD}}
 
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
|{{RTL|#222|▼|#BBB}}
+
|{{RTL|#222|▼|#888}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|[[ramp]]
 
|[[ramp]]
 
|-
 
|-
|{{RTL|#00A|^|#DDD}}
+
|{{RTL|#00A|^|#CCC}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 85: Line 71:
 
|[[pressure plate]] (reacting on water)
 
|[[pressure plate]] (reacting on water)
 
|-
 
|-
|{{RTL|#444|÷|#DDD}}
+
|{{RTL|#444|÷|#CCC}}
 
|{{RTL|#444|÷||►|#00A|center|►|#00A|center}}
 
|{{RTL|#444|÷||►|#00A|center|►|#00A|center}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
Line 91: Line 77:
 
|[[screw pump]] (pumping right)
 
|[[screw pump]] (pumping right)
 
|-
 
|-
|{{RTL|#FFF||||||1|#88F|left}}
+
|{{RTL|#AAF|≈|#CCC}}
|{{RTL|#FFF||||||…|#88F|left}}
+
|{{RTL|#FFF}}
|{{RTL|#FFF||||||7|#88F|left}}
+
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|[[water]]
 +
|-
 +
|{{RTL|#AAF|≈|#CCC||||1|#00A|left}}
 +
|{{RTL|#AAF||#CCC||||…|#00A|left}}
 +
|{{RTL|#AAF||#CCC||||7|#00A|left}}
 
|{{RTL|#FFF}}
 
|{{RTL|#FFF}}
 
|[[water]] depth
 
|[[water]] depth
 
|}
 
|}
 
== Logic gates ==
 
== Logic gates ==
=== Power to signal converter ===
+
=== Power2trigger - converter ===
When you are dealing with [[Mechanical logic|mechanical logic]], you'll finally want or have to trigger something else than machine components, like doors or bridges. Currently, there doesn't exist any trigger in dwarf fortress that reacts on the working state of machine components, thus power on/off. So, you'll have to convert power via pressure plates, screw pumps and fluid into an on/off signal.
+
If you are dealing with [[mechanical logic]], you'll want to trigger something else but machine components. Currently there doesn't exist any trigger in dwarf fortress that reacts on the working state of machine components, thus power. So you'll have to convert it via pressure plates, screw pumps and fluid.
 
<div style="position:relative; float:left;">
 
<div style="position:relative; float:left;">
 
'''Z 0'''
 
'''Z 0'''
Line 106: Line 98:
 
{| cellpadding="0" cellspacing="0" style="border-spacing:0; padding:0; margin:0; vertical-align:middle;"
 
{| cellpadding="0" cellspacing="0" style="border-spacing:0; padding:0; margin:0; vertical-align:middle;"
 
|-
 
|-
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
 +
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|-
 
|-
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
|{{RTL|#222|·|#BBB}}
+
|{{RTL|#00A|·|#888}}
|{{RTL|#444|÷|#DDD}}
+
|{{RTL|#444|÷|#CCC}}
|{{RTL|#444|÷|#DDD|►|#00A|center|►|#00A|center}}
+
|{{RTL|#444|÷|#CCC|►|#00A|center|►|#00A|center}}
|{{RTL|#222|·|#BBB}}
+
|{{RTL|#00A|^|#CCC}}
 +
|{{RTL|#00A|·|#888}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|-
 
|-
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
|{{RTL|#DDD}}
+
|{{RTL|#CCC}}
 +
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
Line 141: Line 136:
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|-
 +
|{{RTL|#222}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 +
|{{RTL|#222}}
 +
|-
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|-
 +
|}
 +
|}
 +
</div>
 +
<div style="clear:left;">
 +
<br />
 +
When power is on, the pump will suck water from the left and pump it to the right onto the pressure plate. The plate has to be set to react on 4&hellip;7 water. You can invert it to 0&hellip;2 to get an off signal instead. The pump is fast enough not to let the water level fall noteworthy below 7 while pumping. In both cases the off signal will have a delay of 100 steps. When power is off, there will be 1 unit of water left behind on the pressure plate that could evaporate eventually. So you'll make sure you can refill the water somehow.
 +
</div>
 +
<div style="position:relative; float:left;">
 +
'''Z 0'''
 +
{| cellpadding="0" cellspacing="0" style="border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;"
 +
|
 +
{| cellpadding="0" cellspacing="0" style="border-spacing:0; padding:0; margin:0; vertical-align:middle;"
 +
|-
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|-
 +
|{{RTL|#222}}
 +
|{{RTL|#00A|·|#888||||3|#00A|left}}
 +
|{{RTL|#444|÷|#CCC||||3|#00A|left}}
 +
|{{RTL|#444|÷|#CCC|►|#00A|center|►|#00A|center}}
 +
|{{RTL|#00A|^|#CCC||||3|#00A|left}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|-
 
|-
 
|{{RTL|#222}}
 
|{{RTL|#222}}
|{{RTL|#00A|^|#DDD||||7|#88F|left}}
+
|{{RTL|#222}}
|{{RTL|#DDD||||||7|#88F|left}}
+
|{{RTL|#AAF||#CCC||||3|#00A|left}}
|{{RTL|#DDD||||||7|#88F|left}}
+
|{{RTL|#AAF||#CCC||||3|#00A|left}}
|{{RTL|#DDD||||||7|#88F|left}}
+
|{{RTL|#AAF||#CCC||||3|#00A|left}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|-
 
|-
 +
|{{RTL|#FFF}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|}
 +
|}
 +
</div>
 +
<div style="float:left;">&nbsp;</div>
 +
<div style="position:relative; float:left;">
 +
'''Z-1'''
 +
{| cellpadding="0" cellspacing="0" style="border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;"
 +
|
 +
{| cellpadding="0" cellspacing="0" style="border-spacing:0; padding:0; margin:0; vertical-align:middle;"
 +
|-
 +
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|-
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 +
|{{RTL|#AAF|≈|#CCC||||7|#00A|left}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|-
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 
|{{RTL|#222}}
 +
|{{RTL|#222}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|-
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 +
|{{RTL|#FFF}}
 
|-
 
|-
 
|}
 
|}
Line 162: Line 238:
 
<div style="clear:left;">
 
<div style="clear:left;">
 
<br />
 
<br />
When the pump is connected to power, it will suck water from the pressure plate and pump it to the right. The water level on the pressure plate will fall to 0. The plate can be constructed to react on 0&hellip;3 water. You can invert it to get an off signal instead setting it to 4&hellip;7. In both cases the ''off signal'' will have a delay of 100 steps.{{verify}} This gate is fluid conserving, what means you will neither need internal [[flow]] nor have to refill it because of [[Water#Evaporation|evaporation]].
+
If you have no access to unlimited water, you'll have to avoid evaporation. This one is harder to create. You have to fill it to the exact water level. Set the plate to 5&hellip;7 respectively 0&hellip;3.
 
</div>
 
</div>
=== Logic gates ===
 
 
 
[[Category:Guides]]
 
[[Category:Computing]]
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: