- 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.
Difference between revisions of "User:Kami/Logic gates"
m |
m |
||
(8 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | ''ToDo'' | + | '''''ToDo''''' |
+ | == 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 == | ||
{| style="border-spacing:0; padding:0;" | {| style="border-spacing:0; padding:0;" | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#FFF}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|any tile | |any tile | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#DDD}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|floor | |floor | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#BBB}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|no floor | |no floor | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#222}} |
− | | | + | |{{RTL|#FFF}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |solid | ||
+ | |- | ||
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|- | |- | ||
− | | | + | |{{RTL|#840|║|#FFF}} |
− | | | + | |{{RTL|#FFF}} |
− | | | + | |{{RTL|#840|o|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |[[axle]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#222|·|#BBB}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[channel]] | |[[channel]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#AAA|┼|#444}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[door]] | |[[door]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#AAA|X|#444}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[flood gate]] | |[[flood gate]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#444|*}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[gear assembly]] | |[[gear assembly]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#FFF||||||1|#F88|left}} |
− | | | + | |{{RTL|#FFF||||||…|#F88|left}} |
− | |[[ | + | |{{RTL|#FFF||||||7|#F88|left}} |
+ | |{{RTL|#FFF}} | ||
+ | |[[magma]] depth | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#222|▲|#DDD}} |
− | | | + | |{{RTL|#FFF}} |
− | |[[ramp]] | + | |{{RTL|#222|▼|#BBB}} |
+ | |{{RTL|#FFF}} | ||
+ | |[[ramp]] | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#00A|^|#DDD}} |
− | | | + | |{{RTL|#FFF}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[pressure plate]] (reacting on water) | |[[pressure plate]] (reacting on water) | ||
|- | |- | ||
− | |{{RTL|÷| | + | |{{RTL|#444|÷|#DDD}} |
− | |{{ | + | |{{RTL|#444|÷||►|#00A|center|►|#00A|center}} |
+ | |{{RTL|#FFF}} | ||
+ | |{{RTL|#FFF}} | ||
|[[screw pump]] (pumping right) | |[[screw pump]] (pumping right) | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#FFF||||||1|#88F|left}} |
− | | | + | |{{RTL|#FFF||||||…|#88F|left}} |
− | |[[water]] | + | |{{RTL|#FFF||||||7|#88F|left}} |
+ | |{{RTL|#FFF}} | ||
+ | |[[water]] depth | ||
|} | |} | ||
− | == | + | == Logic gates == |
− | <div style="position:relative; float: | + | === Power to signal 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. | ||
+ | <div style="position:relative; float:left;"> | ||
'''Z 0''' | '''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|#DDD}} |
− | |{{ | + | |{{RTL|#DDD}} |
− | |{{RTL | + | |{{RTL|#DDD}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |||
|- | |- | ||
− | |{{ | + | |{{RTL|#DDD}} |
− | |{{ | + | |{{RTL|#222|·|#BBB}} |
− | |{{RTL | + | |{{RTL|#444|÷|#DDD}} |
− | |{{ | + | |{{RTL|#444|÷|#DDD|►|#00A|center|►|#00A|center}} |
− | | | + | |{{RTL|#222|·|#BBB}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#DDD}} |
− | |{{ | + | |{{RTL|#DDD}} |
− | |{{ | + | |{{RTL|#DDD}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | + | |{{RTL|#222}} | |
− | |{{ | ||
|} | |} | ||
|} | |} | ||
</div> | </div> | ||
− | <div style="float: | + | <div style="float:left;"> </div> |
− | <div style="position:relative; float: | + | <div style="position:relative; float:left;"> |
'''Z-1''' | '''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; border-style:solid; border-width:thin; border-color:#000000;" | ||
| | | | ||
− | {| cellpadding="0" cellspacing="0" style="border-spacing:0;" | + | {| 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|^|#DDD||||7|#88F|left}} |
− | |{{ | + | |{{RTL|#DDD||||||7|#88F|left}} |
− | |{{ | + | |{{RTL|#DDD||||||7|#88F|left}} |
− | |{{ | + | |{{RTL|#DDD||||||7|#88F|left}} |
− | | | + | |{{RTL|#222}} |
− | |{{ | ||
|- | |- | ||
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |{{ | + | |{{RTL|#222}} |
− | |||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
|} | |} | ||
</div> | </div> | ||
− | + | <div style="clear:left;"> | |
+ | <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…3 water. You can invert it to get an off signal instead setting it to 4…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]]. | ||
+ | </div> | ||
+ | === Logic gates === | ||
+ | |||
− | + | [[Category:Guides]] | |
− | + | [[Category:Computing]] |
Latest revision as of 17:46, 8 December 2011
ToDo
General[edit]
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 people who want to create their own dwarfputer. It does not stick to a special (mechanical, fluid, ...) logic but tries to measure the adventages, disadventages and best practices from all disciplines. This guide adresses to people who are familar with the concept of binary logic and have a basic understanding of computing in dwarf fortress.
Key[edit]
█
|
█
|
█
|
█
|
any tile |
█
|
█
|
█
|
█
|
floor |
█
|
█
|
█
|
█
|
no floor |
█
|
█
|
█
|
█
|
solid |
█
|
█
|
█
|
█
|
█
|
║
|
█
|
o
|
█
|
axle |
·
|
█
|
█
|
█
|
channel |
┼
|
█
|
█
|
█
|
door |
X
|
█
|
█
|
█
|
flood gate |
*
|
█
|
█
|
█
|
gear assembly |
█
1 |
█
… |
█
7 |
█
|
magma depth |
▲
|
█
|
▼
|
█
|
ramp |
^
|
█
|
█
|
█
|
pressure plate (reacting on water) |
÷
|
÷
► ► |
█
|
█
|
screw pump (pumping right) |
█
1 |
█
… |
█
7 |
█
|
water depth |
Logic gates[edit]
Power to signal converter[edit]
When you are dealing with 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.
Z 0
|
Z-1
|
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…3 water. You can invert it to get an off signal instead setting it to 4…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 evaporation.