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.

Difference between revisions of "40d:Machine component"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
(combining redundant articles. Of the 3, this is the "game term")
Line 1: Line 1:
There are several different types of '''machine component''', all available from the {{K|M}}achine Components screen in the {{K|b}}uild menu. These components can be used to create complex machines.  In order for the machines to operate, you must have a [[power]] source (either wind or [[water]]) of some kind.  Power can be transfered to machine parts which require it by a system of [[axle]]s and [[gear assembly|gear assemblies]].  Some machines, [[screw pump]]s for instance, can be powered by hand or hooked up to a [[lever]].
+
'''Machines''' are an advanced concept in Dwarf Fortress, but although they can be infinitely complex, no one part is very complicated.  There are several different types of '''machine components''', all available from the {{K|M}}achine Components screen in the {{K|b}}uild menu. These components can be used to create custom-designed '''machinery''' of more or less complexity, depending on the situation and the player's design. 
 +
 
 +
In the order listed in the machine components sub-menu, these are:
 +
 
 +
:* [[screw pump]]
 +
:* [[water wheel]]
 +
:* [[windmill]]
 +
:* [[gear assembly]]
 +
:* [[axle|horizontal and vertical axle]]
 +
 
 +
Another important component to most machines are [[trigger]]s, but they are not, technically, "machine components", nor are they needed for many "always on" machine designs(But a way to turn a machine off quickly, "just in case", is often a good plan.)
 +
 
 +
In order for the machines to operate, you must have a [[power]] source (either wind or [[water]]) of some kind.  Power can be transfered to machine parts which require it by a system of [[axle]]s and [[gear assembly|gear assemblies]]. 
 +
 
 +
Currently, machines are very limited in function; their most notable usage is for pumping [[water]] or [[magma]].  However, [[Toady One]] has hinted about using some machines for automatic [[Hauling]] in the (not-so-near) future. [http://www.bay12games.com/dwarves/dev_core_41-60.html Core56]
 +
 
 +
Some complex [[trap design]]s incorporate machine components.  You do ''not'' need machinery of this complexity to operate retractable [[bridge]]s, [[drawbridge]]s, [[link]]ed [[door]]s, [[hatch]]es or [[floodgate]]s, or simple one-tile [[trap]]s, nor to manually operate [[pump]]s.
 +
 
 +
==Nuts and bolts - the basics ==
 +
=== Power generators ===
 +
 
 +
[[Windmill]]s {{k|m}} and [[water wheel]]s {{k|w}} are the machine components that provide power.  Power generators can be chained together using axles to combine power.  Additionally, water wheels can be combined by placing them adjacent to one another in parallel, thereby requiring no extra materials to perform the linkage.
 +
 
 +
=== Uses for power ===
 +
 
 +
Currently, the [[screw pump]] {{k|s}} is the only machine component that consumes power to achieve a purpose.  A [[millstone]] also requires power to operate, although it is classified as a [[workshop]] rather than a machine component.
 +
 
 +
Screw pumps can also be operated using dwarf labor in place of mechanical power.  The millstone likewise has an unpowered alternative, the [[quern]].
 +
 
 +
=== Power conduits ===
 +
 
 +
A [[gear assembly]] {{k|g}} is used to link multiple machine components together.  Additionally, a gear assembly can be linked to [[lever]]s and pressure plates, which can then be used to disengage the gearbox from any linked items.  For example, screw pumps can be switched on and off in this way.
 +
 
 +
[[Axle]]s are used to transport power over a distance.  A horizontal axle ( {{k|h}} ) transports power within a [[z-level]], while a vertical axle ( {{k|v}} ) transports power across z-levels.
  
''For a basic overview of how the different machine parts work and work together, see [[machinery]].''
 
  
 
==Construction==
 
==Construction==
Machine components have two basic states in which they can be built: solid base or hanging. Solid Base is just what it sounds like; the machine component has been built on solid ground, and so it has a solid base on which to rest.  A hanging component is not built on solid ground, and so must be built beside an existing machine or component. Its only support comes from the adjacent component. This can be daisy-chained, so that it is possible to build machines which have only one component on solid ground, with the rest hanging out into empty space.
+
Machine components have two basic states in which they can be built: "solid base" or "hanging". This state is visible when looking at the constructed machine with {{k|q}}.
 +
 
 +
A machine with a "solid base" is just what it sounds like; the machine component has been built on solid ground, and so it has a solid base on which to rest.  A "hanging" component is not built on solid ground, but instead has been built beside or on top of an existing machine or component. Its only support comes from the adjacent component. This can be daisy-chained, so that it is possible to build machines which have only one component on solid ground, with the rest hanging out into empty space.
  
 
Possible advantages to this include protection from destruction by invading enemies (If they can't get to the machine components, they can't destroy them).  However, it can be risky, as the rest of the parts will likely collapse if the component on solid ground is destroyed.
 
Possible advantages to this include protection from destruction by invading enemies (If they can't get to the machine components, they can't destroy them).  However, it can be risky, as the rest of the parts will likely collapse if the component on solid ground is destroyed.
  
Levers can be hooked up to a machine component, causing it to "disconnect" when the lever is pulled. If a component is disconnected in this way, and is serving as the support for other machine components, those hanging components will be exploded into their basic components, as they will no longer have support.
+
Levers can be hooked up to a gear assembly in a power conduit (aka "power train"), causing any power transferred through that  to "disconnect" when the lever is pulled. If a component is disconnected in this way, and is serving as the support for hanging machine components, those hanging components will automatically deconstruct into their basic components, as they will no longer have support. As with any deconstructed building, they can be rebuilt.
 +
 
 +
 
 +
==Machinery overview==
 +
 
 +
''This is an overview of how the different machine parts work and work together, with some basics about each of them.  They all have more details - once you understand the basics, refer to the '''main articles''' for more complete discussions - these links will be listed in '''bold'''.''
 +
 
 +
'''Machinery''' in Dwarf Fortress consists of more than just [[machine component]]s.  It's the systems of triggers (either [[lever]]s or [[pressure plate]]s) that control the [[windmill]]s and [[waterwheel]]s that provide power to it the [[gear assemblies]] and [[axle]]s that transfer that power, and the [[pump]]s and [[millstone]]s that use that power; and let's toss in [[bridge]]s, because they move and will come into the discussion sooner or later.  No one part is very complicated, but combined they can be as complex as your warped little imagination can conceive. You can't do everything with DF machinery, but with creativity you can come close. 
 +
 
 +
===Your friend, the mechanism===
 +
The basic part is the [[mechanism]], the same thing that lets you build stonefall [[trap]]s - that can also become a [[lever]], a [[pressure plate]], or a [[gear assembly]] - as well as all the other various  simple one-tile traps.  Mechanisms are created using the [[mechanic]] labor in a [[mechanic's workshop]], and can only be made of [[stone]].  In version d40, mechanism "quality" makes no observed difference when creating DF machinery, so any mechanism will work as well as others*. 
 +
 
 +
:''(* Except in [[magma]], which requires [[bauxite]] mechanisms - a separate discussion, but that's pretty much the sum of it.)''
 +
 
 +
:Main Articles: '''[[mechanism]]''', [[trap]]
 +
 
 +
===Triggers===
 +
The simplest machine use of a mechanism is the trigger, usually as a lever.  Both levers and pressure plates are "triggers" - they trigger something else to happen.  That "something else" is determined by you when you "link" the two - the trigger and the object to be activated.
 +
 
 +
A mechanism is placed as a lever using {{k|b}}uild {{k|T}}raps/Levers {{k|l}}ever, and then once that's been completed, you go into that "building's" menu ( {{k|q}} ) and link it to something else - this takes 2 more mechanisms, one at the object end (1st chosen), one at the lever end (2nd chosen), for a total of 3 mechanisms used: one lever plus a link at each end. Link the same lever to something else and you need 2 more mechanisms, etc etc.  No limit. One pull, they're all activated.
 +
 
 +
:Main Article: '''[[Lever]]'''
 +
 
 +
=====Pressure plates=====
 +
A pressure plate works like a lever, but is based on either being stepped on, or fluid reaching a certain depth.  The triggering process (and problems) are the same, but you have some variables you can designate when placing the plate - whether friend/foe triggers it and what size they must be (min and max), or fluid depth (1/7, 2/7, 7/7), etc.
 +
 
 +
A pressure plate is placed with {{k|b}}uild {{k|T}}raps/Levers {{k|p}}ressure plate, and is otherwise identical to the lever - one mechanism, two more to link it, etc.
 +
 
 +
:Main Article: '''[[Pressure plate]]'''
 +
 
 +
=====Connection and activation=====
 +
If all you're doing is connecting a lever to an object, then a dwarf pulls the lever to activate that object. If a pressure plate, then it gets stepped on or the fluid reaches the designated depth - it's that simple. 
 +
 
 +
Attached to a [[support]], the support crumbles (and brings down whatever it was supporting, ~IF~ that was in fact the last thing connected to it!)  Attach to a [[cage]], the cage releases the occupants.  These are both 1-use. 
 +
 
 +
Connected to a barrier - a door, a hatch, a floodgate, or a bridge - it becomes the sole activation for those.  Dwarfs cannot open/close doors/hatches that are linked (and cannot open/close floodgates or bridges without one). 
 +
 
 +
:Main Articles: '''[[door]]''', '''[[hatch]], [[floodgate]]'''
 +
 
 +
====On/off, open/close====
 +
Note that a trigger does not just "toggle" a barrier - it doesn't ''always'' work "throw and it's open, throw and it's closed".  The lever has to be in the right "phase", left or right, to open or close, and if the barrier is out of phase, nothing happens.  What this means to you is that you cannot link one door, open it, then link another and have them stay opposite each other, opened/closed - they will get back "in phase" almost right away, both open, then both closed.*  There's a complete list '''[[Trigger#On.2FOff_states|here]].'''
 +
 
 +
:''(* But there are ways to achieve this - read main articles for full discussions.)''
 +
 
 +
=====Activation lag time=====
 +
Also note that a few types of barriers respond "immediately" while others are delayed - (again, see '''[[Trigger#On.2FOff_states|that same list]]''' for full details).  If delayed, and you open/close the trigger quickly, it will get out of phase, missing the second command while waiting for the first.  Also, if ''anything'' - a dwarf, creature or the smallest dropped object - is blocking a door, hatch or floodgate, it won't shut when ordered to, and, again, out of phase. Then the lever must be pulled twice, once to get it back in phase, and once to activate it the way you wanted.  Headache city.
 +
 
 +
===Machine power===
 +
You can run a '''[[pump]]''' manually (or use [[quern]]s instead of [[millstone]]s for [[milling]]), but there are 2 kinds of [[power]] systems that are used to run pumps and millstones: '''[[windmill]]s''' and '''[[waterwheel]]s'''.  Both are buildings - you build them just like a workshop.  There are some limits and considerations - build them wrong (without support) and they'll collapse. 
 +
 
 +
====windmills====
 +
A windmill provides 0, 20 or 40 power - it depends on the "wind" on your map, you either have it or you don't - it's constant across a map and time, and you don't know until you build your first windmill.  <q> shows you the power for that windmill on your map.  Power comes out the bottom, via a gear or axle. Or you can build it directly over the item to be powered - that works too (but there's no way to shut it off then - see below.)
 +
 
 +
:Main Article: '''[[Windmill]]'''
 +
 
 +
====waterwheels====
 +
A waterwheel provides 100 power (but ww's consume 10, including the first one powered up, so call it 90/) if it has "flow" under it, but you can create artificial flow.  Line up several, and you have all the power you want.  Power comes out the side.
 +
 
 +
(Note - too many waterwheels can kill your framerate.  Be careful about getting carried away.)
 +
 
 +
:Main Articles: '''[[Water wheel]]''', '''[[Power]]'''
 +
 
 +
====Power connection - gears & axles====
 +
Connecting is easy, especially if you've ever played with tinkertoys.  If you build your pump or millstone adjacent to the source, touching side-by-side, they're automatically connected.  (Building "over" another, between floors, is tricky - see articles).  If there's distance (horizontal or vertical) between power source and destination, there are axles, and gear assemblies.  Axles are just logs - 1 log can get you up to 3 tiles in a straight line (though 3 logs can extend to 10 tiles) horizontally, or 1 single tile vertically, and can be connected directly to each other.  Placed Gear Assemblies (more mechanisms) allow you to change direction of the axle line, either horizontally or vertically.
 +
 
 +
:Main Articles: '''[[axle]], [[gear assembly]]'''
 +
 
 +
=====Power consumption=====
 +
Pumps and mills consume 10 power each (as do waterwheels, powered or not).  Gear assemblies use 5 power/, and axles 1/tile.  So you can have a windmill that pumps 40 power, and 4 axles over, a gear, 3 axles up, another gear, and a pump and mill adjacent to that gear - that's 4+5+3+5+(10+10) = 38 - no problem.  If you wanted more power, you'd need another windmill or a waterwheel, and connect it in to the grid.
 +
 
 +
Wheels, windmills, pumps, mills, axles and gears will all show the power they have and the power they need when viewed with {{k|q}}.  If no power, you've done something wrong.
 +
 
 +
====Turning powered machinery on/off====
 +
Now, you can also link a trigger to a gear assembly, to disengage that gear in the power train - this is how you turn on/off pumps that are attached to power, and how you create fluid traps that "turn on" automatically when their target is in the desired location.
 +
 
 +
Notes: If powering pumps, build the gear and lever and link them '''first''', then throw the lever to disengage the gear before connecting the power - or you'll find your fluid of choice pumping merrily into your fortress until you find a way to shut off what you just built.)''
 +
 
 +
Also, be aware that disengaging a gear that's directly under a windmill will cause it (the windmill) to collapse, and the same will happen if you disengage a gear assembly connected directly to a water wheel. A "disengaging" gear has to be located later in the power train.
 +
 
 +
If building a gear assembly over a pump or millstone, that will work, but the floor between must be channeled ''first''.
 +
 
 +
:Main Article: '''[[gear assembly]]'''
 +
 
 +
There are also quirks to what are "adjacent" items - sometimes floors get in the way, sometimes they don't, depending on the building - read the wiki for those details.
 +
 
 +
 
 +
None of these are that hard to build or connect, and doing it is the best way to learn. Plan a little, expect it not to be 100% optimal the first try, and you'll get it right the second time.
 +
 
 +
==Building/connection limitations==
 +
 
 +
'''Machinery''' (including [[axle]]s, [[gear assemblies]], and [[screw pump]]s) acts differently from other constructions.  It can be built in one of two states:
 +
:* '''Stable Foundation''' - The machinery is built on top of a floor, either natural or constructed.
 +
:* '''Hanging''' - The machinery is built attached to another piece of machinery, typically on top of a gear assembly (to transfer power further down or out horizontally) or a pump. No additional support is required (except for [[screw pump]]s, which have their own requirements for support - see below). The supporting machinery needs only to have been designated for the hanging machinery to be built - it doesn't have to be completed, but might need to be before the power-connection is complete (depending on your design). If the supporting machinery is canceled, disabled, or removed the hanging machinery will collapse to base materials.
 +
*'''Windmills''' may only connect to machinery directly below their center tile.
 +
:* Windmills built on floors can transfer power through them.
 +
*'''Water wheels''' may only connect to machinery on either side of their center tile.
 +
*'''Screw pumps''' may connect to machinery from any tile in any direction. (However, the walkable tile of the screw pump MUST have a floor under it, so it cannot connect directly below the walkable tile)
 +
*'''Gear assemblies''' connect in all directions.
 +
:* A gear assembly which has been disconnected by a lever does not support machinery.  No machinery can hang on top of it, and anything already hanging on it will fall apart.  In #2 (below), disconnecting the gear assembly would dismantle the windmill and prevent another from being built until it was reconnected.
 +
*'''Horizontal axles''' connect to either end, or a gear assembly or machine.
 +
*'''Vertical axles''' connect directly above and below, or a gear assembly or machine.
 +
 
 +
 
 +
====Unusual windmill behavior examples====
 +
 
 +
In the diagram below, brown is the windmill and the floor it stands on, black is floor from another level, the star is a gear assembly:
 +
 
 +
:* #1 will work fine - it's supported by a floor, and has a gear assembly beneath it.  Windmills transfer power ''through'' solid floor.
 +
:* #2 works as long as dwarves can reach the building site - any tile adjacent to the windmill will do.  It's the same as 1), but is "hanging", the windmill build on the gear assembly. (You cannot "disengage" this gear without causing the windmill to deconstruct.)
 +
:* #3 Is not valid, you cannot build a gear above a windmill.
 +
:* #4 ''Would'' be valid if it were not a windmill.  To place a gear above a machine, the floor must be channeled out.
 +
 
 +
::{|style="border: 1px solid #0b0; background: #dfd"
 +
|+'''Side view'''
 +
|- style="font-family: monospace; font-weight: bold; font-size: 135%"
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|style="color: #970; padding: 0; text-decoration: underline"|=
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|&nbsp;
 +
|style="color: #970; padding: 0"|-
 +
|style="color: #970; padding: 0"|=
 +
|style="color: #970; padding: 0"|-
 +
|&nbsp;
 +
|&nbsp;
 +
|style="text-decoration: underline"|*
 +
|&nbsp;
 +
|&nbsp;
 +
|&nbsp;
 +
|*
 +
|&nbsp;
 +
|- style="font-family: monospace; font-weight: bold; font-size: 135%"
 +
|style="text-decoration: underline"|&nbsp;
 +
|style="text-decoration: underline"|*
 +
|style="text-decoration: underline"|&nbsp;
 +
|
 +
|style="text-decoration: underline"|&nbsp;
 +
|style="text-decoration: underline"|*
 +
|style="text-decoration: underline"|&nbsp;
 +
|
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|style="color: #970; padding: 0; text-decoration: underline"|=
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|style="color: #970; padding: 0; text-decoration: underline"|=
 +
|style="color: #970; padding: 0; text-decoration: underline"|-
 +
|- style="font-family: monospace; font-weight: bold; font-size: 135%"
 +
|
 +
|1
 +
|
 +
|
 +
|
 +
|2
 +
|
 +
|
 +
|
 +
|3
 +
|
 +
|
 +
|
 +
|4
 +
|
 +
|}
 +
 
 +
 
 +
----
 +
 
 +
'''See also:'''
 +
:* [[machine component]]
 +
:* [[trigger]]
 +
:* [[repeater]]
 +
:* [[computing]]
 +
:* [[trap design]]
  
 +
[[Category:Constructions]]
 
[[Category:Buildings]]
 
[[Category:Buildings]]
 
[[Category:Physics]]
 
[[Category:Physics]]
 
[[Category:Machine components| ]]
 
[[Category:Machine components| ]]

Revision as of 23:59, 26 October 2009

Machines are an advanced concept in Dwarf Fortress, but although they can be infinitely complex, no one part is very complicated. There are several different types of machine components, all available from the Machine Components screen in the build menu. These components can be used to create custom-designed machinery of more or less complexity, depending on the situation and the player's design.

In the order listed in the machine components sub-menu, these are:

Another important component to most machines are triggers, but they are not, technically, "machine components", nor are they needed for many "always on" machine designs. (But a way to turn a machine off quickly, "just in case", is often a good plan.)

In order for the machines to operate, you must have a power source (either wind or water) of some kind. Power can be transfered to machine parts which require it by a system of axles and gear assemblies.

Currently, machines are very limited in function; their most notable usage is for pumping water or magma. However, Toady One has hinted about using some machines for automatic Hauling in the (not-so-near) future. Core56

Some complex trap designs incorporate machine components. You do not need machinery of this complexity to operate retractable bridges, drawbridges, linked doors, hatches or floodgates, or simple one-tile traps, nor to manually operate pumps.

Nuts and bolts - the basics

Power generators

Windmills m and water wheels w are the machine components that provide power. Power generators can be chained together using axles to combine power. Additionally, water wheels can be combined by placing them adjacent to one another in parallel, thereby requiring no extra materials to perform the linkage.

Uses for power

Currently, the screw pump s is the only machine component that consumes power to achieve a purpose. A millstone also requires power to operate, although it is classified as a workshop rather than a machine component.

Screw pumps can also be operated using dwarf labor in place of mechanical power. The millstone likewise has an unpowered alternative, the quern.

Power conduits

A gear assembly g is used to link multiple machine components together. Additionally, a gear assembly can be linked to levers and pressure plates, which can then be used to disengage the gearbox from any linked items. For example, screw pumps can be switched on and off in this way.

Axles are used to transport power over a distance. A horizontal axle ( h ) transports power within a z-level, while a vertical axle ( v ) transports power across z-levels.


Construction

Machine components have two basic states in which they can be built: "solid base" or "hanging". This state is visible when looking at the constructed machine with q.

A machine with a "solid base" is just what it sounds like; the machine component has been built on solid ground, and so it has a solid base on which to rest. A "hanging" component is not built on solid ground, but instead has been built beside or on top of an existing machine or component. Its only support comes from the adjacent component. This can be daisy-chained, so that it is possible to build machines which have only one component on solid ground, with the rest hanging out into empty space.

Possible advantages to this include protection from destruction by invading enemies (If they can't get to the machine components, they can't destroy them). However, it can be risky, as the rest of the parts will likely collapse if the component on solid ground is destroyed.

Levers can be hooked up to a gear assembly in a power conduit (aka "power train"), causing any power transferred through that to "disconnect" when the lever is pulled. If a component is disconnected in this way, and is serving as the support for hanging machine components, those hanging components will automatically deconstruct into their basic components, as they will no longer have support. As with any deconstructed building, they can be rebuilt.


Machinery overview

This is an overview of how the different machine parts work and work together, with some basics about each of them. They all have more details - once you understand the basics, refer to the main articles for more complete discussions - these links will be listed in bold.

Machinery in Dwarf Fortress consists of more than just machine components. It's the systems of triggers (either levers or pressure plates) that control the windmills and waterwheels that provide power to it the gear assemblies and axles that transfer that power, and the pumps and millstones that use that power; and let's toss in bridges, because they move and will come into the discussion sooner or later. No one part is very complicated, but combined they can be as complex as your warped little imagination can conceive. You can't do everything with DF machinery, but with creativity you can come close.

Your friend, the mechanism

The basic part is the mechanism, the same thing that lets you build stonefall traps - that can also become a lever, a pressure plate, or a gear assembly - as well as all the other various simple one-tile traps. Mechanisms are created using the mechanic labor in a mechanic's workshop, and can only be made of stone. In version d40, mechanism "quality" makes no observed difference when creating DF machinery, so any mechanism will work as well as others*.

(* Except in magma, which requires bauxite mechanisms - a separate discussion, but that's pretty much the sum of it.)
Main Articles: mechanism, trap

Triggers

The simplest machine use of a mechanism is the trigger, usually as a lever. Both levers and pressure plates are "triggers" - they trigger something else to happen. That "something else" is determined by you when you "link" the two - the trigger and the object to be activated.

A mechanism is placed as a lever using build Traps/Levers lever, and then once that's been completed, you go into that "building's" menu ( q ) and link it to something else - this takes 2 more mechanisms, one at the object end (1st chosen), one at the lever end (2nd chosen), for a total of 3 mechanisms used: one lever plus a link at each end. Link the same lever to something else and you need 2 more mechanisms, etc etc. No limit. One pull, they're all activated.

Main Article: Lever
Pressure plates

A pressure plate works like a lever, but is based on either being stepped on, or fluid reaching a certain depth. The triggering process (and problems) are the same, but you have some variables you can designate when placing the plate - whether friend/foe triggers it and what size they must be (min and max), or fluid depth (1/7, 2/7, 7/7), etc.

A pressure plate is placed with build Traps/Levers pressure plate, and is otherwise identical to the lever - one mechanism, two more to link it, etc.

Main Article: Pressure plate
Connection and activation

If all you're doing is connecting a lever to an object, then a dwarf pulls the lever to activate that object. If a pressure plate, then it gets stepped on or the fluid reaches the designated depth - it's that simple.

Attached to a support, the support crumbles (and brings down whatever it was supporting, ~IF~ that was in fact the last thing connected to it!) Attach to a cage, the cage releases the occupants. These are both 1-use.

Connected to a barrier - a door, a hatch, a floodgate, or a bridge - it becomes the sole activation for those. Dwarfs cannot open/close doors/hatches that are linked (and cannot open/close floodgates or bridges without one).

Main Articles: door, hatch, floodgate

On/off, open/close

Note that a trigger does not just "toggle" a barrier - it doesn't always work "throw and it's open, throw and it's closed". The lever has to be in the right "phase", left or right, to open or close, and if the barrier is out of phase, nothing happens. What this means to you is that you cannot link one door, open it, then link another and have them stay opposite each other, opened/closed - they will get back "in phase" almost right away, both open, then both closed.* There's a complete list here.

(* But there are ways to achieve this - read main articles for full discussions.)
Activation lag time

Also note that a few types of barriers respond "immediately" while others are delayed - (again, see that same list for full details). If delayed, and you open/close the trigger quickly, it will get out of phase, missing the second command while waiting for the first. Also, if anything - a dwarf, creature or the smallest dropped object - is blocking a door, hatch or floodgate, it won't shut when ordered to, and, again, out of phase. Then the lever must be pulled twice, once to get it back in phase, and once to activate it the way you wanted. Headache city.

Machine power

You can run a pump manually (or use querns instead of millstones for milling), but there are 2 kinds of power systems that are used to run pumps and millstones: windmills and waterwheels. Both are buildings - you build them just like a workshop. There are some limits and considerations - build them wrong (without support) and they'll collapse.

windmills

A windmill provides 0, 20 or 40 power - it depends on the "wind" on your map, you either have it or you don't - it's constant across a map and time, and you don't know until you build your first windmill. shows you the power for that windmill on your map. Power comes out the bottom, via a gear or axle. Or you can build it directly over the item to be powered - that works too (but there's no way to shut it off then - see below.)

Main Article: Windmill

waterwheels

A waterwheel provides 100 power (but ww's consume 10, including the first one powered up, so call it 90/) if it has "flow" under it, but you can create artificial flow. Line up several, and you have all the power you want. Power comes out the side.

(Note - too many waterwheels can kill your framerate. Be careful about getting carried away.)

Main Articles: Water wheel, Power

Power connection - gears & axles

Connecting is easy, especially if you've ever played with tinkertoys. If you build your pump or millstone adjacent to the source, touching side-by-side, they're automatically connected. (Building "over" another, between floors, is tricky - see articles). If there's distance (horizontal or vertical) between power source and destination, there are axles, and gear assemblies. Axles are just logs - 1 log can get you up to 3 tiles in a straight line (though 3 logs can extend to 10 tiles) horizontally, or 1 single tile vertically, and can be connected directly to each other. Placed Gear Assemblies (more mechanisms) allow you to change direction of the axle line, either horizontally or vertically.

Main Articles: axle, gear assembly
Power consumption

Pumps and mills consume 10 power each (as do waterwheels, powered or not). Gear assemblies use 5 power/, and axles 1/tile. So you can have a windmill that pumps 40 power, and 4 axles over, a gear, 3 axles up, another gear, and a pump and mill adjacent to that gear - that's 4+5+3+5+(10+10) = 38 - no problem. If you wanted more power, you'd need another windmill or a waterwheel, and connect it in to the grid.

Wheels, windmills, pumps, mills, axles and gears will all show the power they have and the power they need when viewed with q. If no power, you've done something wrong.

Turning powered machinery on/off

Now, you can also link a trigger to a gear assembly, to disengage that gear in the power train - this is how you turn on/off pumps that are attached to power, and how you create fluid traps that "turn on" automatically when their target is in the desired location.

Notes: If powering pumps, build the gear and lever and link them first, then throw the lever to disengage the gear before connecting the power - or you'll find your fluid of choice pumping merrily into your fortress until you find a way to shut off what you just built.)

Also, be aware that disengaging a gear that's directly under a windmill will cause it (the windmill) to collapse, and the same will happen if you disengage a gear assembly connected directly to a water wheel. A "disengaging" gear has to be located later in the power train.

If building a gear assembly over a pump or millstone, that will work, but the floor between must be channeled first.

Main Article: gear assembly

There are also quirks to what are "adjacent" items - sometimes floors get in the way, sometimes they don't, depending on the building - read the wiki for those details.


None of these are that hard to build or connect, and doing it is the best way to learn. Plan a little, expect it not to be 100% optimal the first try, and you'll get it right the second time.

Building/connection limitations

Machinery (including axles, gear assemblies, and screw pumps) acts differently from other constructions. It can be built in one of two states:

  • Stable Foundation - The machinery is built on top of a floor, either natural or constructed.
  • Hanging - The machinery is built attached to another piece of machinery, typically on top of a gear assembly (to transfer power further down or out horizontally) or a pump. No additional support is required (except for screw pumps, which have their own requirements for support - see below). The supporting machinery needs only to have been designated for the hanging machinery to be built - it doesn't have to be completed, but might need to be before the power-connection is complete (depending on your design). If the supporting machinery is canceled, disabled, or removed the hanging machinery will collapse to base materials.
  • Windmills may only connect to machinery directly below their center tile.
  • Windmills built on floors can transfer power through them.
  • Water wheels may only connect to machinery on either side of their center tile.
  • Screw pumps may connect to machinery from any tile in any direction. (However, the walkable tile of the screw pump MUST have a floor under it, so it cannot connect directly below the walkable tile)
  • Gear assemblies connect in all directions.
  • A gear assembly which has been disconnected by a lever does not support machinery. No machinery can hang on top of it, and anything already hanging on it will fall apart. In #2 (below), disconnecting the gear assembly would dismantle the windmill and prevent another from being built until it was reconnected.
  • Horizontal axles connect to either end, or a gear assembly or machine.
  • Vertical axles connect directly above and below, or a gear assembly or machine.


Unusual windmill behavior examples

In the diagram below, brown is the windmill and the floor it stands on, black is floor from another level, the star is a gear assembly:

  • #1 will work fine - it's supported by a floor, and has a gear assembly beneath it. Windmills transfer power through solid floor.
  • #2 works as long as dwarves can reach the building site - any tile adjacent to the windmill will do. It's the same as 1), but is "hanging", the windmill build on the gear assembly. (You cannot "disengage" this gear without causing the windmill to deconstruct.)
  • #3 Is not valid, you cannot build a gear above a windmill.
  • #4 Would be valid if it were not a windmill. To place a gear above a machine, the floor must be channeled out.
Side view
- = -   - = -     *       *  
  *     *   - = - - = -
1 2 3 4



See also: