<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Taptap</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Taptap"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Taptap"/>
	<updated>2026-06-10T15:33:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Blizzard_man&amp;diff=227290</id>
		<title>Blizzard man</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Blizzard_man&amp;diff=227290"/>
		<updated>2016-10-09T08:49:45Z</updated>

		<summary type="html">&lt;p&gt;Taptap: have taken down blizzard men with low skill, no metal equipment dwarves -&amp;gt; reduced hyperbole&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Exceptional|09:15, 18 May 2015 (UTC)}}&lt;br /&gt;
{{Creaturelookup/0&lt;br /&gt;
|vary=no&lt;br /&gt;
|contrib=yes&lt;br /&gt;
}}&lt;br /&gt;
{{av}}&lt;br /&gt;
{{creaturedesc}}&lt;br /&gt;
&lt;br /&gt;
Blizzard men are creatures found in [[evil]] sections of the [[glacier]] and [[tundra]] [[biome]]s. Despite the name and description, they are not currently made of ice, and are just as vulnerable to the cold as most other creatures. Unlike [[magma man|other]] [[amethyst man|&amp;quot;man&amp;quot;]] [[gabbro man|creatures]], they lack the [[building destroyer]] tag. Goblins have been seen to bring these along with them for sieges.&lt;br /&gt;
&lt;br /&gt;
In general, it's best to either build an [[ice]] wall around where you're settling (since ice is easy to get on glaciers and won't melt in that environment) with a door to the outside that is usually locked, or keep unarmed workers underground while your guards stay close to the surface. One or two starting dwarves selected as either a [[swordsman|swordsdwarf]] or an [[axeman|axedwarf]] and given proper equipment will take down invading Blizzard men and will protect your workers, letting you focus on more important matters, such as building your fortress and getting needed resources.&lt;br /&gt;
&lt;br /&gt;
[[File:BlizzardMan.jpg|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
{{gamedata}}&lt;br /&gt;
{{Creatures}}&lt;br /&gt;
{{Category|Humanoids}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Silk_farming&amp;diff=222642</id>
		<title>Silk farming</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Silk_farming&amp;diff=222642"/>
		<updated>2016-01-02T12:48:54Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Cave spider silk farm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Exceptional|23:22, 4 February 2015 (UTC)}}&lt;br /&gt;
{{projects}}{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Silk farming''' is the process of harvesting large quantities of silk from [[web]]slinging creatures like [[giant cave spider]]s. Several setups have been devised to farm silk quickly and safely, but successful silk farms have a few traits in common:&lt;br /&gt;
&lt;br /&gt;
# The webslinging creature must be aggressive toward the bait, and willing to web it.  Tame giant cave spiders are not willing to web invaders{{verify}}, while wild spiders appear to only be willing to web ''active military'' dwarves. [[forgotten beast|Various other untamable creatures]] remain willing to web most tame animals (with [[cat]]s being a possible exception). Tame spiders are not aggressive toward animals on restraints.&lt;br /&gt;
# The webslinging creature must not be able to reach its bait; if it can, the bait (or creature) will die and no further silk will be generated. Spiders can destroy wooden doors but not stone or metal doors. They cannot pass through forbidden doors or doors that have been &amp;quot;tightly closed&amp;quot;. Other silk-spewing creatures can destroy all non-[[artifact]] doors, requiring drawbridges or walls for containment&lt;br /&gt;
# Web collection cannot occur in sight of wild webslingers or invaders serving as bait; either  will cause dwarves to interrupt collection.  Drawbridges work well to block line of sight in either case, as webs will not prevent them from raising.&lt;br /&gt;
&lt;br /&gt;
==Cave spider silk farm==&lt;br /&gt;
&lt;br /&gt;
Cave spider silk farms are probably the easiest silk farms to set up since the spiders are so small, that they don't represent a serious danger to your dwarves. &lt;br /&gt;
&lt;br /&gt;
# Trap a dozen or more cave spiders via kennel.&lt;br /&gt;
# Release them into an enclosed area - mined out vein does the job - with access through a hatch from above. Precaution is necessary to prevent vermin hunters like cats from entering the area.&lt;br /&gt;
# Place a loom close to the access and assign it to a single weaver. Let it collect webs on repeat.&lt;br /&gt;
&lt;br /&gt;
Since occasional bites are unavoidable, assigning the loom to a single weaver is important. Best use a dwarf already bitten by a cave spider and affected by the resulting dizzyness. Despite the slowing effect of cave spider dizzyness this farm will produce a steady stream of silk.&lt;br /&gt;
&lt;br /&gt;
==Simple silk farm==&lt;br /&gt;
{{diagram|spaces=yes|color=#888|\&lt;br /&gt;
╔═════════╗&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++╠═╗&lt;br /&gt;
║+++++++++┼+║&lt;br /&gt;
┼++++++++[#080]╥║[#0F0]^║&lt;br /&gt;
║++++++++[#080]║[#F00]╬┼╣&lt;br /&gt;
║++++++++[#080]║[#F00]╬S║&lt;br /&gt;
║++++++++[#080]║[#F00]╬═╝&lt;br /&gt;
┼++++++++[#080]╨║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
╚═════════╝&lt;br /&gt;
}}&lt;br /&gt;
# Dig out (and optionally smooth) a sufficiently large room (example shown is 9x11)&lt;br /&gt;
# Build a [[cage]] containing an *untamed* spider at the gray &amp;quot;S&amp;quot;, and link it to a lever&lt;br /&gt;
# Build a '''non-wooden''' [[door]] above the spider cage, and mark it forbidden and pet-inaccessible&lt;br /&gt;
# Recommended: build a [[cage trap]] on the green &amp;quot;^&amp;quot; to recapture your spider later&lt;br /&gt;
# [[Construction|Construct]] all of the red [[fortification]]s&lt;br /&gt;
# Build the green [[bridge]], raising lengthwise to form a long wall.&lt;br /&gt;
# Build a [[lever]] somewhere convenient in your fortress and link it to the green bridge&lt;br /&gt;
# Pull the lever to release the spider &lt;br /&gt;
# Order a *non-ranged* military dwarf to station or patrol in the room (but *not* on the green bridge)&lt;br /&gt;
# Raise the green bridge periodically to allow your bait dwarf to escape, then lower it again to resume production&lt;br /&gt;
# Your weavers *may* collect webs during production if they have sufficient discipline; if not, leave the green bridge raised while they collect the webs&lt;br /&gt;
# Set pull lever on repeat to have automatic production and collection&lt;br /&gt;
&lt;br /&gt;
==High-volume silk farm==&lt;br /&gt;
&lt;br /&gt;
{{diagram|spaces=yes|color=#888|\&lt;br /&gt;
     z             z-1        z-2  &lt;br /&gt;
 ╔═════╦┼══╗   ╔═════╗      ╔═════╗ &lt;br /&gt;
 ║[#080]╔[#080]═[#080]═[#080]═[#080]╗┼+++║   ║[#0AA]╔[#0AA]═[#0AA]═[#0AA]═[#0AA]╗┼      ║+++++┼ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+║[#0F0]^║   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║╠═┼╗   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+╠[#888]┼╣   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬[#FF0]H[#F00]╬[#CCC]S║   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+╠═╝   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+║     ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║╠══╝   ║+++++║ &lt;br /&gt;
 ║[#080]╚[#080]═[#080]═[#080]═[#080]╝║[#59F]!║     ║[#0AA]╚[#0AA]═[#0AA]═[#0AA]═[#0AA]╝║      ║+++++║ &lt;br /&gt;
 ╚═════╩═╝     ╚═════╝      ╚═════╝ &lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
# Dig out the three chambers as shown.&lt;br /&gt;
# Smooth and carve the red [[fortification]]s.&lt;br /&gt;
# [[Channel]] out the areas in green and cyan, linking all three levels&lt;br /&gt;
# Build the large green [[bridge]] (retracting) and large cyan bridge (retracting)&lt;br /&gt;
# Construct a [[pressure plate]] in a well-traveled area (or a [[repeater]]) and link it to the green bridge&lt;br /&gt;
# Build a [[lever]] and link it to the cyan bridge&lt;br /&gt;
# Build a [[cage]] containing an *untamed* spider at the gray &amp;quot;S&amp;quot;, and link it to a lever&lt;br /&gt;
# Build a '''non-wooden''' [[door]] above the spider cage, and mark it forbidden and pet-inaccessible&lt;br /&gt;
# Channel the yellow &amp;quot;H&amp;quot;, build a [[hatch cover]] there, and link it to a lever. This will allow you to remove the bait dwarf and stop production.&lt;br /&gt;
# Recommended: build a [[cage trap]] on the green &amp;quot;^&amp;quot; to recapture your spider later&lt;br /&gt;
# Evacuate the upper two chambers and forbid the bridge-access doors&lt;br /&gt;
# Pull the lever linked to the cage to release the spider&lt;br /&gt;
# Station or order a melee dwarf to patrol to the blue '!'; lock the door after he enters the chamber&lt;br /&gt;
# The spider will blast the bait with webs. When the green bridge automatically retracts, the webs will fall and stack on the cyan bridge&lt;br /&gt;
# Pull the lever linked to the cyan bridge to drop the stacked webs to the bottom level for collection&lt;br /&gt;
# Remember to release your bait dwarf periodically&lt;br /&gt;
&lt;br /&gt;
Note that a simple pit in the harvesting chamber will not work--the bridge is required to cause the &amp;quot;web objects&amp;quot; to drop to the next level (and stack). Because falling items are deadly (a falling web managed to break the spine of one of my aspiring weavers), it is necessary to collect the webs on the &amp;quot;holding&amp;quot; bridge and only drop them into the collection chamber when your weavers are clear. Also, webs &amp;quot;tossed&amp;quot; by the retracting bridge can injure anything they hit, so your bait dwarf may require occasional replacement. One spider can easily keep several weavers busy, and collecting all the webs provides a great opportunity for [[cross-training]].&lt;br /&gt;
&lt;br /&gt;
'''Extra automisation of the silk farm'''&lt;br /&gt;
#Station an weredwarf or vampire as spiderbait. Now your melee dwarf does not need to be replaced and can be totaly locked in.&lt;br /&gt;
&lt;br /&gt;
==Notes on exotic webslingers==&lt;br /&gt;
&lt;br /&gt;
Farming silk from other [[forgotten beast|procedurally]] [[titan|generated]] creatures is somewhat more difficult and less rewarding. As level 2 [[building destroyer]]s, these creatures can only be contained by [[bridge]]s or [[artifact]] [[door]]ways. They are also immune to [[trap]]s, making positioning in the farm rather more complicated. Finally, without a value modifier, the collected silk will be equivalent in [[value]] to common [[cave spider]] silk. They do still provide a nearly-inexhaustible source of silk thread, and with some effort their webs can also be used to [[cage trap|cage]] other trap immune creatures. Also, webslingers with modified material properties (e.g. IGNITE_POINT) can produce webs that retain those properties (e.g. fire-safe or magma-safe silk).&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Silk_farming&amp;diff=222641</id>
		<title>Silk farming</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Silk_farming&amp;diff=222641"/>
		<updated>2016-01-02T12:46:08Z</updated>

		<summary type="html">&lt;p&gt;Taptap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Exceptional|23:22, 4 February 2015 (UTC)}}&lt;br /&gt;
{{projects}}{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Silk farming''' is the process of harvesting large quantities of silk from [[web]]slinging creatures like [[giant cave spider]]s. Several setups have been devised to farm silk quickly and safely, but successful silk farms have a few traits in common:&lt;br /&gt;
&lt;br /&gt;
# The webslinging creature must be aggressive toward the bait, and willing to web it.  Tame giant cave spiders are not willing to web invaders{{verify}}, while wild spiders appear to only be willing to web ''active military'' dwarves. [[forgotten beast|Various other untamable creatures]] remain willing to web most tame animals (with [[cat]]s being a possible exception). Tame spiders are not aggressive toward animals on restraints.&lt;br /&gt;
# The webslinging creature must not be able to reach its bait; if it can, the bait (or creature) will die and no further silk will be generated. Spiders can destroy wooden doors but not stone or metal doors. They cannot pass through forbidden doors or doors that have been &amp;quot;tightly closed&amp;quot;. Other silk-spewing creatures can destroy all non-[[artifact]] doors, requiring drawbridges or walls for containment&lt;br /&gt;
# Web collection cannot occur in sight of wild webslingers or invaders serving as bait; either  will cause dwarves to interrupt collection.  Drawbridges work well to block line of sight in either case, as webs will not prevent them from raising.&lt;br /&gt;
&lt;br /&gt;
==Cave spider silk farm==&lt;br /&gt;
&lt;br /&gt;
Cave spider silk farms are probably the easiest silk farms to set up since the spiders are so small, that they don't represent a serious danger to your dwarves. &lt;br /&gt;
&lt;br /&gt;
# Trap a dozen or more cave spiders via kennel.&lt;br /&gt;
# Release them into an enclosed area - mined out vein does the job - with access through a hatch from above. Precaution is necessary to prevent vermin hunters like cats from entering the area.&lt;br /&gt;
# Place a loom close to the access and assign it to a single weaver. Let it collect webs on repeat.&lt;br /&gt;
&lt;br /&gt;
Since occasional bites are unavoidable, assigning the loom to a single weaver is important. Best use a dwarf already bitten by a cave spider and affected by the resulting dizzyness. Despite the slowing affect of cave spider dizzyness this farm will produce a steady stream of silk. &lt;br /&gt;
&lt;br /&gt;
==Simple silk farm==&lt;br /&gt;
{{diagram|spaces=yes|color=#888|\&lt;br /&gt;
╔═════════╗&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++╠═╗&lt;br /&gt;
║+++++++++┼+║&lt;br /&gt;
┼++++++++[#080]╥║[#0F0]^║&lt;br /&gt;
║++++++++[#080]║[#F00]╬┼╣&lt;br /&gt;
║++++++++[#080]║[#F00]╬S║&lt;br /&gt;
║++++++++[#080]║[#F00]╬═╝&lt;br /&gt;
┼++++++++[#080]╨║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
║+++++++++║&lt;br /&gt;
╚═════════╝&lt;br /&gt;
}}&lt;br /&gt;
# Dig out (and optionally smooth) a sufficiently large room (example shown is 9x11)&lt;br /&gt;
# Build a [[cage]] containing an *untamed* spider at the gray &amp;quot;S&amp;quot;, and link it to a lever&lt;br /&gt;
# Build a '''non-wooden''' [[door]] above the spider cage, and mark it forbidden and pet-inaccessible&lt;br /&gt;
# Recommended: build a [[cage trap]] on the green &amp;quot;^&amp;quot; to recapture your spider later&lt;br /&gt;
# [[Construction|Construct]] all of the red [[fortification]]s&lt;br /&gt;
# Build the green [[bridge]], raising lengthwise to form a long wall.&lt;br /&gt;
# Build a [[lever]] somewhere convenient in your fortress and link it to the green bridge&lt;br /&gt;
# Pull the lever to release the spider &lt;br /&gt;
# Order a *non-ranged* military dwarf to station or patrol in the room (but *not* on the green bridge)&lt;br /&gt;
# Raise the green bridge periodically to allow your bait dwarf to escape, then lower it again to resume production&lt;br /&gt;
# Your weavers *may* collect webs during production if they have sufficient discipline; if not, leave the green bridge raised while they collect the webs&lt;br /&gt;
# Set pull lever on repeat to have automatic production and collection&lt;br /&gt;
&lt;br /&gt;
==High-volume silk farm==&lt;br /&gt;
&lt;br /&gt;
{{diagram|spaces=yes|color=#888|\&lt;br /&gt;
     z             z-1        z-2  &lt;br /&gt;
 ╔═════╦┼══╗   ╔═════╗      ╔═════╗ &lt;br /&gt;
 ║[#080]╔[#080]═[#080]═[#080]═[#080]╗┼+++║   ║[#0AA]╔[#0AA]═[#0AA]═[#0AA]═[#0AA]╗┼      ║+++++┼ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+║[#0F0]^║   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║╠═┼╗   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+╠[#888]┼╣   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬[#FF0]H[#F00]╬[#CCC]S║   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+╠═╝   ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║║++║   ║+++++║ &lt;br /&gt;
 ║[#080]║[#080]+[#080]+[#080]+[#080]║[#F00]╬+║     ║[#0AA]║[#0AA]+[#0AA]+[#0AA]+[#0AA]║╠══╝   ║+++++║ &lt;br /&gt;
 ║[#080]╚[#080]═[#080]═[#080]═[#080]╝║[#59F]!║     ║[#0AA]╚[#0AA]═[#0AA]═[#0AA]═[#0AA]╝║      ║+++++║ &lt;br /&gt;
 ╚═════╩═╝     ╚═════╝      ╚═════╝ &lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
# Dig out the three chambers as shown.&lt;br /&gt;
# Smooth and carve the red [[fortification]]s.&lt;br /&gt;
# [[Channel]] out the areas in green and cyan, linking all three levels&lt;br /&gt;
# Build the large green [[bridge]] (retracting) and large cyan bridge (retracting)&lt;br /&gt;
# Construct a [[pressure plate]] in a well-traveled area (or a [[repeater]]) and link it to the green bridge&lt;br /&gt;
# Build a [[lever]] and link it to the cyan bridge&lt;br /&gt;
# Build a [[cage]] containing an *untamed* spider at the gray &amp;quot;S&amp;quot;, and link it to a lever&lt;br /&gt;
# Build a '''non-wooden''' [[door]] above the spider cage, and mark it forbidden and pet-inaccessible&lt;br /&gt;
# Channel the yellow &amp;quot;H&amp;quot;, build a [[hatch cover]] there, and link it to a lever. This will allow you to remove the bait dwarf and stop production.&lt;br /&gt;
# Recommended: build a [[cage trap]] on the green &amp;quot;^&amp;quot; to recapture your spider later&lt;br /&gt;
# Evacuate the upper two chambers and forbid the bridge-access doors&lt;br /&gt;
# Pull the lever linked to the cage to release the spider&lt;br /&gt;
# Station or order a melee dwarf to patrol to the blue '!'; lock the door after he enters the chamber&lt;br /&gt;
# The spider will blast the bait with webs. When the green bridge automatically retracts, the webs will fall and stack on the cyan bridge&lt;br /&gt;
# Pull the lever linked to the cyan bridge to drop the stacked webs to the bottom level for collection&lt;br /&gt;
# Remember to release your bait dwarf periodically&lt;br /&gt;
&lt;br /&gt;
Note that a simple pit in the harvesting chamber will not work--the bridge is required to cause the &amp;quot;web objects&amp;quot; to drop to the next level (and stack). Because falling items are deadly (a falling web managed to break the spine of one of my aspiring weavers), it is necessary to collect the webs on the &amp;quot;holding&amp;quot; bridge and only drop them into the collection chamber when your weavers are clear. Also, webs &amp;quot;tossed&amp;quot; by the retracting bridge can injure anything they hit, so your bait dwarf may require occasional replacement. One spider can easily keep several weavers busy, and collecting all the webs provides a great opportunity for [[cross-training]].&lt;br /&gt;
&lt;br /&gt;
'''Extra automisation of the silk farm'''&lt;br /&gt;
#Station an weredwarf or vampire as spiderbait. Now your melee dwarf does not need to be replaced and can be totaly locked in.&lt;br /&gt;
&lt;br /&gt;
==Notes on exotic webslingers==&lt;br /&gt;
&lt;br /&gt;
Farming silk from other [[forgotten beast|procedurally]] [[titan|generated]] creatures is somewhat more difficult and less rewarding. As level 2 [[building destroyer]]s, these creatures can only be contained by [[bridge]]s or [[artifact]] [[door]]ways. They are also immune to [[trap]]s, making positioning in the farm rather more complicated. Finally, without a value modifier, the collected silk will be equivalent in [[value]] to common [[cave spider]] silk. They do still provide a nearly-inexhaustible source of silk thread, and with some effort their webs can also be used to [[cage trap|cage]] other trap immune creatures. Also, webslingers with modified material properties (e.g. IGNITE_POINT) can produce webs that retain those properties (e.g. fire-safe or magma-safe silk).&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Drowning_chamber&amp;diff=219669</id>
		<title>Drowning chamber</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Drowning_chamber&amp;diff=219669"/>
		<updated>2015-07-04T17:42:18Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Order of construction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|21:50, 11 May 2015 (UTC)}}&lt;br /&gt;
{{projects}}{{av}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Drowning chambers''' are multipurpose rooms (basically advanced [[pit trap]]s) that can rapidly fill up with and be drained of [[water]]. An effectively built drowning chamber linked up to a [[dam]]med [[river]] or open to the [[ocean]] can be used to drown and dispose of [[ambush|invader]]s, [[elf|hippies]], [[noble|loudmouth]]s, [[Trading#Caravans|rich tourists]] and [[megabeast|other]] [[titan|above-ground]] [[night creature|nuisances]], as long as they have a need to breathe and cannot breathe underwater. It is thus an effective [[defense guide|defensive strategy]], acting like a [[stupid dwarf trick|megaproject]] [[trap design|trap]] that can dispose of almost anything that threatens you from the surface. A more powerful and noticeably more dwarven variation of a drowning chamber (using [[magma]] of course) is a melting chamber, which is truly 100% effective against surface-based threats.&lt;br /&gt;
&lt;br /&gt;
Smaller-scale drowning chambers can be turned into large fishing traps as part of your [[fishing industry]], to capture large [[fish]] for [[butcher]]ing that cannot be otherwise easily caught. This is done by filtering a water source through a room lined with cage traps; fish will inevitably go in to explore and be caught in them, allowing you to drain the room and then mark the trapped animal for butchering. If you manage to capture a [[sperm whale]] or two, this will be enormously, enormously profitable.&lt;br /&gt;
&lt;br /&gt;
Note that military drowning chambers can be relatively easily converted into fish-catching chambers when needed, but the reverse is not necessarily true.&lt;br /&gt;
&lt;br /&gt;
== Construction ==&lt;br /&gt;
=== Water flow ===&lt;br /&gt;
The first prerequisite of a drowning chamber is a large source of water that can be easily rerouted, be it a river, a natural body of water, or a constructed [[reservoir]]. This can be achieved in a few ways.&lt;br /&gt;
&lt;br /&gt;
* [[Floodgate]]s leading into an [[ocean]] or [[lake]], if one is on the map; simply dig a channel through to one tile away from the body of water, put a floodgate there, link it to a lever, pull the lever, dig a hole, and then pull the lever again to plug the hole for when it's needed. Repeat for increasing amounts of flow.&lt;br /&gt;
* If you have a [[river]] on the map, you can [[dam]] the river to redirect its flow into your chamber. The difficultly of this is trivial if your river freezes over in the winter, but generally quite challenging otherwise, requiring either magma tricks or a lot of idle hands and a large collapsible chamber underneath; see [[dam]] for more information on that.&lt;br /&gt;
* You can always build a series of one-tile floodgates into the river wall as well, although this tends to have decreased flow.&lt;br /&gt;
* Enough small lakes (quite common) can be drained to form a cistern that can be cycled in and out of the chamber as a closed system.&lt;br /&gt;
* A [[pump stack]] can bring water from a [[cavern]] lake up to the surface for use, although this would require a [[cistern]] to be effective.&lt;br /&gt;
* An even larger pump stack can bring [[magma]] up to the surface, and allow you to convert your drowning chambers into melting chambers. After all, who needs water when you can turn your enemies into carbon fumes? *Simply* build a magma reservoir, link it to your chamber, and marvel at how quickly it disposes of anything foolish enough to enter. Note that if you build a magma death chamber you will need to do so with [[magma-safe]] materials unless you are heading straight for [[Fun]].&lt;br /&gt;
* With a [[volcano]], melting chambers are trivial to construct - just use your natural lava source.&lt;br /&gt;
* If you have an [[aquifer]] on the map, you can use a screw pump to bring the water up from even closer to the surface than a cavern lake; simply dig into the aquifer and use the water-producing tile as your pump input.&lt;br /&gt;
&lt;br /&gt;
=== Trapping ===&lt;br /&gt;
Once you have worked out your water supply, you need to work out the room. A military drowning chamber can be a simple [[sally port]] (a secondary hallway leading into your fortress with [[bridge]]s on both sides). Upon seeing the enemy, close down your main entrance while leaving the secondary open. Enemies will path to your fortress using the shortest route possible and walk in, at which point you can close the bridges, trapping them inside for the ensuing flood. [[Building destroyer]]s like [[titan]]s and [[werebeast]]s are unable to destroy the walls created by erect bridges, so this design works against most everything, even otherwise unassailable megabeasts.&lt;br /&gt;
&lt;br /&gt;
Note that ambushes sneak onto the map and must be spotted first. Leaving an entrance wide open to them into the heart of your fortress unwatched can spell your doom. Keep a sacrificial animal or watchtower or something near the entrance, to keep eyes on enemy ambushes.&lt;br /&gt;
&lt;br /&gt;
A fishing drowning chamber is much easier; simply cover the room in cage traps and open it up to your water flow. Once you have trapped some fish, drain the room and let your dwarves come in and haul them away for butchering. Note that a military death chamber can easily be adapted into a fishing chamber, but the reverse is not necessarily true.&lt;br /&gt;
&lt;br /&gt;
=== Drainage ===&lt;br /&gt;
The final piece of a drowning chamber is its pumping mechanisms. You want to be able to empty out a drowning chamber for reuse and for claiming what the unfortunate victims were carrying. What's the point of a trap that only works once?&lt;br /&gt;
&lt;br /&gt;
* The most practical way to pump off excess water is a battery of wind-powered [[screw pump]]s. Simply build a [[windmill]] one tile above your pump to power it. Since it's going to be off most of the time (or not, if it's for catching fish), build a floor hatch over the input tile and attach it to a lever for easy on/off commands. If you don't have any wind on your map, a [[water wheel]] can be substituted instead, but if there is no running water on your map, this can be quite complicated.&lt;br /&gt;
&lt;br /&gt;
* If you can spare a lot of mining labor, you can always opt to build a room big enough for the water to [[evaporate]] out of. This will require a room several times larger than the drowning chamber itself, and will not get rid of the water as quickly, but requires much less fiddling to get right.&lt;br /&gt;
&lt;br /&gt;
* If you have a strong computer and wouldn't mind a fps drop, you can simply dump the water down several levels into the nearest [[cavern]] and flow it off the map edge. A simple hole will suffice, but a more advanced &amp;quot;guided&amp;quot; system (ae. [[wall]]s) will work faster, although it will require dangerous cavern work first.&lt;br /&gt;
&lt;br /&gt;
Where the screw pumps drain off to is your decision. If you are using a cistern, run the water back into your water supply. You can dig a tunnel through to the map edge and funnel it out of your game. You can build a small waterfall and drop it back into the water source it had come from in the first place, although this will probably require more screw pumps, as they do not create any [[pressure]].&lt;br /&gt;
&lt;br /&gt;
When draining the pit, items and corpses will be pushed through fortifications or wall grates by moving water. This could get them stuck into an inaccessible location on the wrong side of the filters. Instead of draining the water on the same Z-level as the drowning chamber, drain the water downward through floor grates or stairs to a lower Z-level, because items cannot be pushed downward through floor grates or stairs by moving water.&lt;br /&gt;
&lt;br /&gt;
When used for fishing, the object is to filter water through, not fill and drain it all at once, although you will want to be able to drain it completely as well too, to carry the fishies out.&lt;br /&gt;
&lt;br /&gt;
== Order of construction ==&lt;br /&gt;
# Dig out the drowning chamber itself. It is recommended you make it three tiles wide, so that you can &amp;quot;test&amp;quot; it on human caravans if you feel like it. It should be at least 15 units in length, and probably more, to allow leeway in lever pulling.&lt;br /&gt;
# Construct the entrance and exit bridges, and link them to levers to keep nasties out while the chamber is still under construction. You can also convert it into a pit trap in this way, but only if you really really have to.&lt;br /&gt;
# Dig out and fit your water source. You may have done this already, and this may be the most difficult step.&lt;br /&gt;
# Dig out the pump housing. Channel off in three-square spaces (less means slower draining, more means faster) and then build an upwards ramp to behind the wall of the chamber. Dig a two-tile space for the actual screw pump, and then link the screw pump outputs together so the water can be syphoned away to your water dump, whatever that happens to be.&lt;br /&gt;
# Remove the upwards ramps you dug out from the far side of the pump housing, as this will prevent you from building the necessary floor hatches.&lt;br /&gt;
# Place some floor hatches over the new hole you created. This will be your screw pump input and control; link the hatches to levers so you can turn drainage on/off when needed. A floodgate below will also work.&lt;br /&gt;
# Place some floor bars over the input ramp. Unlike hatches, floor bars are unaffected by ramps.&lt;br /&gt;
# Build your power sources. The easiest way to do this is to place a [[windmill]] directly over where the screw pump will be &amp;amp;mdash; the power will magically siphon through the ground with no problem, but only if the windmill is built first.&lt;br /&gt;
# If your screw pumps are located more than one tile beneath your windmills (or water wheels), you will have to dig out and channel down to them from the z-level above in order to fit a mechanism there, and will have to reverse the order of the previous and next step - mechanisms must be hung from screw pumps, and windmills in turn must be hung from the mechanisms.&lt;br /&gt;
# Finally, build the screw pumps. Lock off the entrance to the pressure tunnel with a levered floodgate, so you can access it later if needed.&lt;br /&gt;
&lt;br /&gt;
Each screw pump assembly requires one screw pump, one floor [[hatch]], one set of floor [[bar]], and one windmill; in terms of raw materials this is one [[block]], one [[enormous corkscrew]], one grate, one hatch, one [[pipe section]], and four [[log]]s per unit of drainage. &lt;br /&gt;
&lt;br /&gt;
{{D for Dwarf}}&lt;br /&gt;
Or you were looking for [[Trade depot|trade depot]] or [[Cross-training#Swimming_Pool|swimming pool]] instead?&lt;br /&gt;
&lt;br /&gt;
{{Category|Guides}}&lt;br /&gt;
{{Category|Fortress defense}}&lt;br /&gt;
{{Category|Design}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Computing&amp;diff=216626</id>
		<title>Computing</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Computing&amp;diff=216626"/>
		<updated>2015-02-20T12:02:46Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Examples of things you could do with logic gates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Exceptional}}&lt;br /&gt;
{{Computing}}&lt;br /&gt;
{{av}}&lt;br /&gt;
&lt;br /&gt;
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. Even if it isn't a young concept anymore, there is still much room for improvement and development. One reason is that there are many ways to solve one problem. Innovation and invention are encouraged.&lt;br /&gt;
=== Binary information ===&lt;br /&gt;
Binary information can have one of two possible states: true or false, respectively 1 or 0. In dwarf fortress they can be represented by different entities:&lt;br /&gt;
* on/off state or signal of a trigger ([[pressure plate]] or [[lever]])&lt;br /&gt;
* power or connection state of a [[machine component]]&lt;br /&gt;
* open or closed state of a [[door]] or similar buildings&lt;br /&gt;
* [[pressure plate|low/high]] or [[flow|flowing/standing]] [[water|fluid]]&lt;br /&gt;
* present [[creature]]s and [[dwarf|borgs]]&lt;br /&gt;
* present [[minecart]]s on track&lt;br /&gt;
&lt;br /&gt;
Electronic devices and computers base on this elementary form of information, and if you want to go into computing, you’ll have to familiarize yourself with it. [http://en.wikipedia.org/wiki/Propositional_calculus propositional calculus]&lt;br /&gt;
=== Input/Output ===&lt;br /&gt;
Input can be any device which can be linked to another device with mechanisms, such as [[lever|levers]] or [[pressure plate|pressure plates]]. Pressure plates can measure water or magma depth, or creature or minecart weight, and can be set to react to your own dwarves if measuring creature weight. If measuring water or magma you specify the minimum and maximum levels at which it should output 'on', and at all other levels it will output an 'off' signal. Regardless of the actual amount of water or magma or the exact weight of a creature or cart on your pressure plate, the plate can only output an 'on' or 'off' signal (1 or 0) to whatever devices it is linked to. So everything you build will have a binary base.&lt;br /&gt;
&lt;br /&gt;
====Input elements====&lt;br /&gt;
* manual: [[lever]] -&amp;gt; binary on/off signal&lt;br /&gt;
* triggered: [[pressure plate]] -&amp;gt; binary on/off signal&lt;br /&gt;
&lt;br /&gt;
According to input, output can be anything that is able to react to an on/off signal. This can be doors, bridges, floodgates allowing or stopping flow, gears controlling pumps and much more. In some special configurations - when [[mechanical logic]] is involved - output may not be an on/off signal but power, thus running or not running a machine component.&lt;br /&gt;
&lt;br /&gt;
Currently to convert from power to an on/off signal, the only way is to use a kind of [[Mechanical_logic#Power_to_signal_converter|power to signal converter]]. This can be a screw pump connected to that power source, and a pressure plate to measure whether water is being pumped, or a minecart moved by a roller over a closed track with a pressure plate activated by its passage.&lt;br /&gt;
&amp;lt;!-- ...screw pump connected to that power source &amp;lt;s&amp;gt;with an unlimited amount of water and drainage at the output&amp;lt;/s&amp;gt;, and a pressure plate to measure whether water is being pumped&amp;lt;s&amp;gt; out by the pump&amp;lt;/s&amp;gt;. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Output elements====&lt;br /&gt;
* signal: [[pressure plate]] -&amp;gt; binary on/off signal -&amp;gt; linkable Object(s)&lt;br /&gt;
* power: [[gear assembly]] -&amp;gt; binary power on/power off -&amp;gt; machine&lt;br /&gt;
&lt;br /&gt;
=== Binary logic ===&lt;br /&gt;
Basic binary logic takes one or two input bits and creates an output based on them. The devices that perform these operations are commonly called '''logic gates'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
* NOT - takes one input and returns the opposite of the input&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=1&lt;br /&gt;
|-&lt;br /&gt;
! input A &lt;br /&gt;
! NOT&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
* AND - takes two inputs and returns true if both inputs are true&lt;br /&gt;
* OR - takes two inputs and returns true if at least one input is true&lt;br /&gt;
* XOR - takes two inputs and returns true if exactly one input is true&lt;br /&gt;
* NAND - takes two inputs and returns true if either input is false&lt;br /&gt;
* NOR - takes two inputs and returns true if both inputs are false&lt;br /&gt;
* XNOR - takes two inputs and returns true if both inputs are identical&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=1&lt;br /&gt;
|-&lt;br /&gt;
! input A&lt;br /&gt;
! input B&lt;br /&gt;
! AND&lt;br /&gt;
! OR&lt;br /&gt;
! XOR&lt;br /&gt;
! NAND&lt;br /&gt;
! NOR&lt;br /&gt;
! NXOR&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
The most human-understandable logic system requires NOT, AND and OR gates, but having a design for either a NAND or a NOR gate is enough to build any of the other gates. Some gates are easier to create or need fewer components than others depending on what discipline your logic relies on. Designing each individual gate that you will need (or using designs that had each individual gate designed) rather than building a gate out of multiple NAND gates or the like will generally result in your dorfputer reacting faster and using less resources (power, water, kittens, construction materials, what-have-you).&lt;br /&gt;
&lt;br /&gt;
=== Complex gates ===&lt;br /&gt;
* [[Latch]] - storing and reading a single binary value&lt;br /&gt;
* [[Repeater]] - sending a repeating signal&lt;br /&gt;
* [[Adder (Computing)|Counter/Adder]] - binary calculation&lt;br /&gt;
&lt;br /&gt;
== Disciplines ==&lt;br /&gt;
There are 4 main disciplines of dwarfputing, depending on what would drive the dwarfputer. Each of them has its assets and drawbacks.&lt;br /&gt;
&lt;br /&gt;
The four disciplines are:&lt;br /&gt;
=== Fluid logic ===&lt;br /&gt;
[[Fluid logic]] is controlling the ''flow of fluid'' over different pressure plates. Fluid logic can be easily constructed and every known logic gate in dwarf fortress has already been built with it. On the other hand this discipline depends on a somehow unlimited source of the used fluid to deal with its [[evaporation]] and [[Water#Water in Fortress Mode|destruction]].&lt;br /&gt;
&lt;br /&gt;
=== Mechanical logic ===&lt;br /&gt;
[[Mechanical logic]] uses systems of axles and [[gear assembly|gear assemblies]] to build logical gates. Mechanical logic reacts very fast and can be easily constructed. Since every gear can itself be linked to a trigger (or multiple triggers), and automatically connects to adjacent gears for transferring either power or load, mechanical logic gates are very flexible and don't require anywhere near the number of different devices that tend to be used in fluid logic gates. On the negative side, this discipline uses a LOT of mechanical power and basic mechanic gates output no signals but power. If you need a signal as output, either to control signal-operated buildings like doors or bridges or to perform further logical operations, you will need power-&amp;gt;signal converters.   There is, however, a fully functional fluid preserving &amp;quot;rotation sensor&amp;quot; design. With the advent of [[Minecart]]s, compact fluid-less power-&amp;gt;signal converters have become available, making [[Minecart logic]] an attractive alternative for deploying mechanical logic in your fortress. Along with advanced techniques to construct logic gates by &amp;quot;pre-toggling&amp;quot; a gear assembly (see [[Pre-Toggled Mechanical Logic]]), any logical circuit can be built, given enough space in the game to do it. &lt;br /&gt;
&lt;br /&gt;
=== Creature logic ===&lt;br /&gt;
[[Creature logic]] uses pressure plates and constraints on creatures' movement through buildings such as doors and [[hatch cover|hatches]], in conjunction with their [[path]]ing behavior, to build logical gates.  Creature logic is very space intensive, but requires no power, fluid, or valuable materials.  Every kind of logical circuit can built with creature logic.&lt;br /&gt;
&lt;br /&gt;
[[Animal logic]] is a special kind of creature logic that relies on animals attempting to path through tightly closed doors. Animal logic circuits can be much more space efficient than other forms of creature logic, but are somewhat unreliable.&lt;br /&gt;
&lt;br /&gt;
=== Minecart Logic ===&lt;br /&gt;
[[Minecart logic]] involves the control of the paths of [[minecart]]s over pressure plates to build logical gates.  Minecart integrates easily with mechanical logic.  Power, perhaps surprisingly, is optional.  Minecart logic is complete and compact.  It lacks the brute speed of which mechanical circuits are capable, but minecart circuit design may be much simpler and more intuitive to some architects.&lt;br /&gt;
&lt;br /&gt;
===Examples of things you could do with logic gates===&lt;br /&gt;
* Repeater: Repeatedly toggling hatches open and closed, or spikes up and down.&lt;br /&gt;
* Latch: Making resettable one-use pressure plates which are reset by a lever.&lt;br /&gt;
* NOT gate: Reversing the effect of a switch or creature-sensing pressure plate, generally linked to a latch device.&lt;br /&gt;
* AND gate: Requiring more than one condition to be true for something to occur. For instance, you could have a group of AND gates, with a system on/off switch, and other triggers, with each trigger linked to a different AND gate with the system on/off switch linked to the second input on all the AND gates, so that when the system on/off switch is OFF the output will be OFF on all the AND gates.&lt;br /&gt;
* OR gate: You could link two 1-7 water sensors to an OR gate, and link that to a NOT gate, and link that to some floodgates or doors which act as emergency bulkheads, closing when water is detected in the area. Or, link the OR gate to bridges which raise instead (but you may crush things, and bridges are slower than doors).&lt;br /&gt;
* XOR gate: You could use pressure plates hooked to latches at different points in your fort to detect enemy intrusion, and set them up to seal off the area with both an interior and exterior bulkhead when the intrusion occurs, but hook your latches up with an XOR gate and hook the output to the interior bulkhead to unseal that one if your pressure plates have detected that the enemy has gotten past it.&lt;br /&gt;
* NOR gate: A NOR gate returns TRUE (ON) only if both inputs are FALSE. Instead of using the OR gate example with a NOT gate, you could use a NOR gate linked to two 1-7 water sensors, whose output goes to doors or floodgates. When the pressure plates are both waterless, the floodgates will be open. When one detects water, the floodgates close. (If you used 0-0 pressure plates with an OR, you would get an OFF signal if both plates detected water, or an ON signal otherwise (which is the same as 1-7 NAND 1-7))&lt;br /&gt;
* NAND gate: A NAND gate returns TRUE (ON) whenever both inputs are not both TRUE (e.g. ON NAND ON is OFF, but every other combination is ON). Instead of the OR NOT or NOR example, you could link two 0-0 water sensors to a NAND gate, and link the NAND gate's output to raising bridges. 0-0 NAND 0-0 is the same as 1-7 OR 1-7. If there is no water on both pressure plates, the NAND gate will output an OFF signal. If, however, either has water, it will output an ON signal.&lt;br /&gt;
&lt;br /&gt;
* And here's a more complicated example, omitting the details of what gates to use: An automated swimming training room, where you pull a lever to close exit doors and open hatches to drop water into it, then pressure plates detect when there's enough water and close the hatches, and after a certain amount of time (using a very slow repeater, for instance), drains and exit doors open and the system resets until you pull the lever again. Or, the lever could be taken out entirely and the system could be made fully automatic (with dwarves set to train in the room, for instance) using the repeater.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
There are few examples of a really useful dwarfputer and some concepts which have the potential to become useful for others. But in most cases they are made just for fun. What doesn't mean to diminish their designers achievements, because these are in general the more complex ones.&amp;lt;br /&amp;gt;At the moment there are no known examples of animal or borg logic.&lt;br /&gt;
=== Useful ===&lt;br /&gt;
* Magma trap&lt;br /&gt;
** This is an example of a useful dwarfputer controlling a magma trap. It automatically floods an area with lava, cleans up and resets afterwards. The timing is perfectly adjusted to let the victims vanish only leaving their valuable metal behind.&amp;lt;br /&amp;gt;video: http://mkv25.net/dfma/movie-1808-perfectmagmatrap&amp;lt;br /&amp;gt;design: http://i576.photobucket.com/albums/ss208/kanddak/magmatrap.png&lt;br /&gt;
&lt;br /&gt;
=== Concepts ===&lt;br /&gt;
* repeater&lt;br /&gt;
** mechanical logic http://mkv25.net/dfma/movie-1370-pump-basedautorepeater&lt;br /&gt;
* adding machine&lt;br /&gt;
** mechanical logic, 6-bit: http://mkv25.net/dfma/movie-1561-addingmachine&lt;br /&gt;
** fluid logic, 8-bit: http://mkv25.net/dfma/movie-1084-numberabbeydemonstration&lt;br /&gt;
=== Such a doddle ===&lt;br /&gt;
* decimal display for 4-bit binary input&lt;br /&gt;
** mechanical logic, decimal with overflow-bit: http://mkv25.net/dfma/movie-1745-dwarfputerv01&lt;br /&gt;
** probably fluid logic: http://mkv25.net/dfma/movie-1657-7segmentlcddisplay&lt;br /&gt;
** fluid logic, hexadecimal: http://mkv25.net/dfma/movie-1092-7-segmentdisplaydemonstration&lt;br /&gt;
* tic tac toe&lt;br /&gt;
** mechanical logic http://mkv25.net/dfma/movie-1813-tictactoev10simple&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related user pages ==&lt;br /&gt;
*[[User:BaronW]] - The Almighty Dwarven Calculator&lt;br /&gt;
*[[User:Jong/Dwarven_Computer]] - The first fully programmable digital Dwarven Computer&lt;br /&gt;
*[[User:SL/Logic Gates]] - These use mechanisms for connecting gates and devices and so forth, but fluid for logic. They're built on top of a body of water, and require power (for a pump or two per gate).&lt;br /&gt;
*[[User:Kyace/Adder]] - A full adder built using fluid logic, with a video of a rough prototype. Trivial to combine 8 of these to make a fluid device capable of adding two 8 bit numbers together.&lt;br /&gt;
*[[User:Soundandfury#Logic_Gates]] - These have a water supply reservoir above and a drain below.  The drained water can be pumped back to the supply reservoir.&lt;br /&gt;
*[[User:Bidok]] - Animal logic with all gates, memory, repeater and counter. All powered by kittens.&lt;br /&gt;
*[[User:LordOOTFD#Animal_Logic]] - Animal logic with fast complex gates, building upon Bidok's kitten powered systems.&lt;br /&gt;
*[[User:Hussell#Assorted_Devices]] - Fluid logic&lt;br /&gt;
*[[User:Gammon]] - Fluid logic. Very detailed CMOS gates.&lt;br /&gt;
*[[User:Root Infinity]] - Misc. logic gates.&lt;br /&gt;
*[[User:Vasiln/Goblin Logic 1]] - Theory and practice of invader-based creature logic.&lt;br /&gt;
*[[User:Larix/MPL]] - A thorough treatment of minecart logic from first principles.&lt;br /&gt;
&lt;br /&gt;
{{buildings}}&lt;br /&gt;
{{Category|Computing}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Children&amp;diff=216468</id>
		<title>Children</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Children&amp;diff=216468"/>
		<updated>2015-02-15T10:46:46Z</updated>

		<summary type="html">&lt;p&gt;Taptap: they don't anymore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|22:51, 11 September 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
Most creatures, including [[dwarf|dwarves]], start out as infants, then after a certain number of years become children, and then finally become adults. For dwarves, childhood starts after reaching one year of age, and continues until age twelve.&lt;br /&gt;
&lt;br /&gt;
In fortress mode, some migrant dwarves are [[marriage|married]] and may bring children. Children who immigrate to your [[fortress]] might be any age from two to twelve. You can determine the age of any child by viewing their thoughts screen, which will give you the child's exact age as well as their date of birth. This information is visible regardless of whether or not the child was born in your fortress.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Resident&amp;quot; heterosexually [[marriage|married]] female dwarves may also give birth to children. This can be stopped or reduced by editing the BABY_CHILD_CAP or the STRICT_POPULATION_CAP setting in [[d_init.txt]]. Dwarves can even have [[miscarriage]]s (if they become dehydrated, starving, or are subjected to certain types of physical trauma), which causes an unhappy thought for the mother but not for the father. Talking to a child causes a good thought. Children are liable to start parties, being idle much of the time.&lt;br /&gt;
&lt;br /&gt;
Much of [[goblin]] society is centered around [[thief|stealing the children]] of other races. The appropriate response to a baby-snatcher appearing on the map is the judicious use of [[military|dwarven diplomacy]].&lt;br /&gt;
&lt;br /&gt;
==Babies==&lt;br /&gt;
&lt;br /&gt;
Babies do not have to be born in [[bed]]s, but are born wherever the mother happens to be. The birth will interrupt most current actions of the mother. The game will pause and [[announcement|announce]] the arrival of the baby. The mother will cancel whatever task she was in the middle of to seek her infant, and then will ''usually'' resume whatever task she was doing before the child was born.&lt;br /&gt;
&lt;br /&gt;
Dwarven mothers can also give birth to twins or triplets. Babies are looked after by their mother, who will continue working while carrying the babies.&lt;br /&gt;
&lt;br /&gt;
[[Unconscious]] mothers will not wake up when they give birth - [[sleep]]ing and resting in a [[hospital]] will not be interrupted. Dwarves in a [[strange mood]] will also not interrupt their mood when giving birth - cancelling a mood forces instant insanity, so that may be a deliberate coding choice to protect mothers (and children). Imprisoned mothers can grab their child if they give birth while on a chain, but cannot retrieve an infant that is out of their reach, which can cause massive problems, since a mother carrying a child is forced to drop it before being brought to prison.&lt;br /&gt;
&lt;br /&gt;
If the mother is sleeping or otherwise prevented from collecting her infant, the baby will be free to roam as it pleases. An emancipated baby acts in a similar manner to a [[insanity|raving mad]] adult, wandering freely over the map without any sense of self-preservation, gravitating to [[Activity_zone#Meeting_area|meeting zone]]s. It may be fed and watered by other dwarves, but the priority of these jobs is still being determined. As long as a baby is not within reach of a hostile creature, no harm will be done to it. &amp;quot;Job cancellation spam&amp;quot; can be generated as the baby is seen by the game to be &amp;quot;insane&amp;quot; (example: &amp;quot;Urist McBabyname, Dwarven baby, cancels Clean Self: Too Insane&amp;quot;), but once it reaches childhood (at 12 months), that will stop, and they shall go about their business like any other dwarven child.&lt;br /&gt;
&lt;br /&gt;
The sex of a baby is determined upon birth. [[Cheating#Savescumming|Reloading a save]] might get a baby of the other sex.&lt;br /&gt;
&lt;br /&gt;
After giving birth, it is possible for the mother to become pregnant again immediately and give birth to another child nine months later.&lt;br /&gt;
&lt;br /&gt;
==Labor==&lt;br /&gt;
&lt;br /&gt;
In [[fortress mode]], children cannot be assigned any labor, but they will perform a few simple tasks on their own:&lt;br /&gt;
&lt;br /&gt;
* Socializing, like starting [[party|parties]].&lt;br /&gt;
* Picking out, and wearing, their own [[clothing]].&lt;br /&gt;
* Eating, drinking, and sleeping as necessary.&lt;br /&gt;
* [[Farming|Harvesting]] [[crops]], if the &amp;quot;All dwarves harvest&amp;quot; [[standing orders|order]] is on. This will also increase their [[grower]] skill. In fortresses that farm crops, most children will grow up with significant grower skill. They will also store the harvested food in a stockpile, fetching a barrel if needed. This storage job can also task food produced by other workers and other jobs, like plants gathered by nearby [[herbalist]]s.{{verify}}&lt;br /&gt;
* When they want to, storing their items.{{verify}}  Yelling at them to clean their room has no effect.&lt;br /&gt;
* Children can enter [[strange mood]]s.&lt;br /&gt;
&lt;br /&gt;
Children may not be assigned to the [[noble|nobility]]. However, they ''can'' be assigned bedrooms.&lt;br /&gt;
&lt;br /&gt;
If no tasks are available, they will gladly loiter in meeting areas, like [[dining room]]s for example, for the duration of their youth. Children born in the fort tend to follow their mother by preference, even (especially?) if their mother is a soldier and is currently going into battle. &lt;br /&gt;
&lt;br /&gt;
The game will create an [[announcement]] when children reach adulthood and can be assigned labors. This announcement will not pause and/or center the screen by default.&lt;br /&gt;
&lt;br /&gt;
==Dwarven parenthood==&lt;br /&gt;
&lt;br /&gt;
In the eighth [http://www.bay12games.com/dwarves/df_talk.html DFTalk], it was mentioned that, due to a programming oversight, children's parents can become so preoccupied with finding their children that they can die of thirst.&lt;br /&gt;
&lt;br /&gt;
==Too many children==&lt;br /&gt;
&lt;br /&gt;
If there are too many children in the fort, [[FPS]] may suffer. [[Unfortunate accident|Removing]] children is difficult, as doing so may quickly lead to [[tantrum spiral]]s. One possibility is to [[burrow]] children outside to aid [[thief|snatchers]].&lt;br /&gt;
&lt;br /&gt;
To prevent a large population of children in the first place, it is preferred to set the BABY_CHILD_CAP and/or the STRICT_POPULATION_CAP in the [[d_init.txt]] file.&lt;br /&gt;
&lt;br /&gt;
In the longer running forts, when a parent has more than 10 children of one gender, the 11th onward will merely be referred to as 'son' or 'daughter'.  The exception to this is that the youngest will always be referred to as 'youngest son' or 'youngest daughter'.&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Attribute&amp;diff=216325</id>
		<title>DF2014 Talk:Attribute</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Attribute&amp;diff=216325"/>
		<updated>2015-02-09T21:30:47Z</updated>

		<summary type="html">&lt;p&gt;Taptap: sorry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Attribute&amp;diff=216324</id>
		<title>DF2014 Talk:Attribute</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=DF2014_Talk:Attribute&amp;diff=216324"/>
		<updated>2015-02-09T21:28:27Z</updated>

		<summary type="html">&lt;p&gt;Taptap: Created page with &amp;quot;Spinner does increase Agility, Kin. Sense, Spat. Sense. - didn't spin enough yet to see more. :) ~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Spinner does increase Agility, Kin. Sense, Spat. Sense. - didn't spin enough yet to see more. :) [[User:Taptap|Taptap]] ([[User talk:Taptap|talk]]) 21:28, 9 February 2015 (UTC)&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=215966</id>
		<title>Fluid logic</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=215966"/>
		<updated>2015-02-06T22:44:25Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Edge Detector */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quality|fine}}&lt;br /&gt;
{{av}}&lt;br /&gt;
Fluid logic is a form of [[computing]] which uses a fluid (generally [[water]]), controlled by various means, to trigger [[pressure plate]]s and hopefully accomplish some desirable result.&lt;br /&gt;
&lt;br /&gt;
==Infinite Flow Gates==&lt;br /&gt;
&amp;lt;!--[[Talk:Fluid_logic#Image_improvement]]--&amp;gt;&lt;br /&gt;
These logic gates are relatively simple and cheap to make, but require an infinite amount of [[flow]] and infinite drainage to operate. You can build a circuit system to prevent the loss of water, but closing constructions like [[floodgate]]s will always destroy water, so you'll always have to replace it somehow. The following examples use raising [[bridge]]s and floodgates, as they have the same delay of 100 steps when reacting to on/off signals. The bridges work as inverted input as they block passage when receiving an on signal while floodgates open in that case. The channel in the gates stands for the drainage.&lt;br /&gt;
&lt;br /&gt;
There are two versions of these gates here.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''AND'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An AND gate is simply created by putting two floodgates ''in a row'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When both floodgates receive an on signal, they will open and let the water from the left side pass. The [[pressure plate]] behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
* You can use a single floodgate and a 0-3 pressure plate to get a NOT gate.&lt;br /&gt;
* You can use a single 1x1 raising bridges and a 4-7 pressure plate to get a NOT gate, too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''OR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An OR gate is simply created by putting two floodgates in ''parallel'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When one of the floodgates receives an on signal, it will open and let the water from the left side pass. The pressure plate behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NAND operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''XOR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|╬|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|╬|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
A XOR gate is created by putting 1x1 raising bridges and floodgates together. The red bridge and floodgate {{Raw Tile|X|#A00|#444}}{{Raw Tile|╬|#A00|#444}} are linked to the same input and the green bridge and floodgate {{Raw Tile|X|#0A0|#444}}{{Raw Tile|╬|#0A0|#444}} are both linked to the other input. When one of the inputs sends an on signal, the bridge will raise/close and the appropriate door will be opened. Only when the floodgate and the bridge at one passage are open, what happens when exactly one input signal is on, the water will flow to the right. The pressure plate behind the bridges has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you exchange bridge and floodgate for one of the two inputs, you'll get a XNOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time&lt;br /&gt;
* Processing more input signals is possible but requires an exponentially increasing number of bridges, floodgates, and mechanisms. It is easier to link the output to another XOR gate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As mentioned, you can just add more floodgates and bridges and even pressure plates to expand your gates to process more input signals and process more complex operations at once. You can combine floodgates and bridges as you need them. Putting them in a row will connect them as AND. Every time you add a new parallel passage with floodgates and bridges this will work as an OR for each other passage. The XOR gate for example is nothing else than combined logic: A XOR B = (A AND NOT B) OR (NOT A AND B).&lt;br /&gt;
But sometimes it is easier to use more but simpler gates.&lt;br /&gt;
&lt;br /&gt;
==Fluid Preserving Gates==&lt;br /&gt;
At the moment there doesn't exist a full concept of a fluid-preserving fluid logic gate. Each design working with floodgates or equivalent components in the gates will have to deal with the destruction of the fluid. A way to handle this can be the usage of [[Hatch cover|hatches]]. [[Evaporation]] is another known problem.&lt;br /&gt;
&lt;br /&gt;
==CMOS Transmission Gate and Inverter Logic==&lt;br /&gt;
Perhaps the closest to utilizing water as a stand-in for electricity, transmission gate logic can be accomplished by simply having an infinite water source in place of all +Vs, and infinite drainage for all grounds.  Simple floodgates behave as standard transmission gates, while bridges are inverted gates.  However, unlike the other forms of fluid logic, but as with real world electrical circuits, a dedicated inverter is required, which must be hooked up to +V and ground.&lt;br /&gt;
&lt;br /&gt;
==Advanced Complementary fluid logic Gates==&lt;br /&gt;
This type of logic uses the different behaviour of raising bridges and floodgates when switched to minimise water consumption and remove the need of a drain. The use of (typically) two buildings for every input, one of which is always open while the other is closed, ensures that only very little water will flow during operation, and only when there is a state change. Thus, this variation of fluid logic is conceptually very similar to real CMOS circuits, which use a similar paradigm to limit power consumption. &lt;br /&gt;
&lt;br /&gt;
===Basic Design===&lt;br /&gt;
Let's say we want to evaluate the logical expression ''f''. It can be a simple '''AND''' or '''OR''' gate, or anything more complicated. Follow the following scheme:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RTF|A}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RTF|B}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here, {{Tile|A|#FFF|#000}} is a set of floodgates and/or drawbridges that let water flow exactly when ''f'' evaluates to true, {{Tile|B|#FFF|#000}} is the same except that it lets water flow when ''f'' evaluates to false, {{Tile|^|#808|#000}} is a pressure plate set to activate on a sufficient water level. Notably, a drain is not needed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
In the following examples, {{Tile|X|#000|#888}} is a floodgate, and {{Tile|╬|#FFF|#000}} is a drawbridge. Red ones are connected to input A, green ones to input B and blue ones to input C.&lt;br /&gt;
&lt;br /&gt;
====NOT====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pressure plate must activate on a water level of 5-7. When input turns off, the drawbridge lowers and the floodgate closes. Water can flow onto the pressure plate and fills the tile completely, turning output on. &lt;br /&gt;
&lt;br /&gt;
When input turns on, the bridge raises and cuts off incoming water, while the floodgate opens and the water on the pressure plate's tile spreads over the now two open tiles. Water depth over the pressure plate lowers to 3-4, insufficient to keep the pressure plate active, which will turn off. &lt;br /&gt;
&lt;br /&gt;
Siphoning the water off into a drain is unnecessary: the spread of water into opened tiles is sufficient to reliably produce a measurably different liquid level. This holds for all binary logic gates under this doctrine.&lt;br /&gt;
&lt;br /&gt;
====AND====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====OR====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the AND gate, the pressure plate should respond to 6-7 or 7-7 water. Since the OR gate is in effect a NOR gate with inverted output, the plate must respond to &amp;quot;low&amp;quot; water, 0-5 is recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XOR====&lt;br /&gt;
This is not as straightforward as the previous ones. The ''true'' expression is the following: (A '''and not''' B) '''or''' ('''not''' A '''and''' B). The ''false'' expression: (A '''and''' B) '''or''' ('''not''' A '''and not''' B).&lt;br /&gt;
&lt;br /&gt;
So the gates look like the following:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If both inputs have the same value (both on or off), the two closed floodgates or raised bridges will form an impassable wall, blocking inflow of water. The second row of floodgates &amp;quot;behind&amp;quot; the pressure plate ensures that when the gate is deactivated by an &amp;quot;on&amp;quot; signal raising bridges, there is still space opened for water to spread into and lower fluid level. Either combination of one &amp;quot;on&amp;quot; with one &amp;quot;off&amp;quot; input opens a direct path for water to enter. The pressure plate must be set to react to 7/7 fluid, anything less can result in false positives. &lt;br /&gt;
&lt;br /&gt;
===Advantages And Disadvantages===&lt;br /&gt;
The basic advantage of this design is that it uses much less water than infinite flow gates. A river is enough to supply even the more complex systems, as long as sufficient liquid depth is provided. A drain is not needed.&lt;br /&gt;
&lt;br /&gt;
The disadvantage is that it requires more resources to construct, and more careful planning, since floodgates tend to block paths. The presented drain-less gates depend on precise fluid depth and require that all incoming logic fluid is at the full 7/7 depth. This may necessitate building a reservoir or pumping system to compensate for flow irregularities or overcome the sluggishness of otherwise pressureless fluids. That's especially true when you decide to use [[magma|magma/lava]] as fluid.&lt;br /&gt;
&lt;br /&gt;
==Speed Improvements==&lt;br /&gt;
The main factors that affect the speed of these gates are the delays of floodgates and bridges, and the switch-off delay of pressure plates. These cannot be eliminated, although designs that seek to replace as many buildings as possible with doors and hatches may minimize delays.&lt;br /&gt;
&lt;br /&gt;
Another factor is the flowing speed of the water. It can be improved. First, the water should flow in from a reservoir a few z-levels higher than the gates themselves (the more the better). This way, water will flow in much faster. In infinite-flow gates, you can then replace the pressure plates with up stairs, and make a 2x1 room one z-level above. On one tile is a down stair, and on the other is the pressure plate. Now the water will also flow out faster, or at least the pressure plate will switch off sooner.  To minimize latency when deactivated, assuming sufficient inflow, the pressure plate can be set to trigger only on a full 7 units of water.  This increases the water consumption a bit, but it still remains relatively low.&lt;br /&gt;
&lt;br /&gt;
==Edge Detector==&lt;br /&gt;
In some situations, it is beneficial to have logic that triggers during a state ''transition'' rather than based on steady states - for example, turning a lever &amp;quot;on&amp;quot; could trigger one brief event while turning the lever &amp;quot;off&amp;quot; would trigger a different event (or possibly the same event).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z+0&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╦}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╩}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z=-1&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both pressure plates should trigger on depth 2-6. Link the bottom pressure plate to machines you wish to activate on ''positive'' transitions (e.g. stepping onto a pressure plate, or pulling a lever) and the upper pressure plate to machines you wish to activate on ''negative'' transitions (e.g. stepping off of the pressure plate, or pulling the lever again), then link the trigger itself (a lever or pressure plate) to both floodgates and both raising bridges.&lt;br /&gt;
&lt;br /&gt;
Each time the input trigger is toggled, the appropriate pressure plate will activate, remain active until the water finishes flowing, then deactivate after about 100 steps.&lt;br /&gt;
&lt;br /&gt;
An edge detector can be realized very space efficient in advanced complementary fluid logic (as long as both pressure plates are linked to a single item). Input goes to floodgate and bridge, the pressure plates are working on 0-5 and 6-7, respectively. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RT|^|#808}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Memory Cells==&lt;br /&gt;
&lt;br /&gt;
Fluid logic offers options for comparatively small [[Memory_(computing)|memory]] cells requiring very few mechanisms. They are usually quite primitive, so that more complicated memory manipulation requires additional machinery, but for simply &amp;quot;holding&amp;quot; a bit of information, they are hard to beat in compactness. &lt;br /&gt;
&lt;br /&gt;
====S/R Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT0|┼|#0F0}}&lt;br /&gt;
|{{RT0|^|#F0F}}&lt;br /&gt;
|{{RT0|┼|#F00}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Design by [[User:Hussell/SetResetLatch|Hussell]].&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;set/reset&amp;quot; latch will activate when it receives a &amp;quot;set&amp;quot; signal - opening the door {{Tile|┼|#0F0}} , letting in water and triggering the pressure plate reacting to liquid of levels 5-7 - and stays active when the set signal turns off again. It will only deactivate when it receives an explicit &amp;quot;reset&amp;quot; signal - opening the door {{Tile|┼|#F00}}&lt;br /&gt;
behind the plate, allowing water to spread off the plate, lowering liquid depth enough to fall under the activation threshold. Further activity of the reset signal will, once again, not change the cell's state once it has been reset. &lt;br /&gt;
&lt;br /&gt;
As usual in real-world set/reset latches, the inputs should not both be &amp;quot;on&amp;quot; at the same time.&lt;br /&gt;
&lt;br /&gt;
====D-Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|┼|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This cell &amp;quot;tests&amp;quot; the state of the &amp;quot;Data&amp;quot; (hence D ) input controlling the door {{Tile|┼|#FFF|#800}} and the pressure plate (set to trigger on 5-7 liquid) will take on that input's state when the &amp;quot;enable&amp;quot; input opens door {{Tile|┼|#FFF|#080}}: if the data input is on, water can pass from the source to the pressure plate and fills the cell. If the data input is off, water will spread from the plate to the door's tile and lower liquid depth over the plate. &lt;br /&gt;
&lt;br /&gt;
This cell will turn &amp;quot;on&amp;quot; whenever both data and enable input are on, but will only turn &amp;quot;off&amp;quot; when the data input is off at the moment the enable input ''switches'' from off to on, making it a hybrid of a Latch (reacts to changes in data as long as enabled) and a flipflop (only reacts to data state the moment enable changes from off to on). While this is clearly a weakness of the design, it is very compact and uncomplicated, needing a mere four mechanisms to link the doors to the inputs.&lt;br /&gt;
&lt;br /&gt;
====Toggle Flipflop====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a cell which changes state to the opposite whenever its &amp;quot;control&amp;quot; input switches from off to on. The door {{Tile|┼|#FFF|#080}} is activated by the control input, and both the door and the bridge {{Tile|╬|#FFF|#800}} are linked to the pressure plate (triggering on 5-7 water). &lt;br /&gt;
&lt;br /&gt;
The operation is not immediately obvious, thus a breakdown, beginning with the cell in the &amp;quot;off&amp;quot; state:&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 4 or less, the bridge is lowered. When the &amp;quot;clock/control&amp;quot; turns on, the door opens and water rushes onto the plate. The plate triggers and sends &amp;quot;on&amp;quot; signals to both bridge and door. The signal to the door is ignored, since the door's already open. The bridge receives a &amp;quot;raise&amp;quot; signal and reacts to it with a 100 step delay. Neither the bridge raising nor the door closing (when the control turns off again) does anything to the pressure plate's state, it remains &amp;quot;on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 5 or more (usually 7), the bridge is raised. When the clock turns on, water spreads from the plate to the door's tile. Water level on the plate falls under the activation threshold. After the normal pressure plate reset delay of 99 steps, &amp;quot;off&amp;quot; signals are sent to the door and the bridge. The door will immediately close, the bridge will lower 100 steps later. The cell is &amp;quot;off&amp;quot; and will remain so until the clock turns on again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category|Constructions}}&lt;br /&gt;
{{Category|Computing}}&lt;br /&gt;
{{Category|Logic}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214582</id>
		<title>Fluid logic</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214582"/>
		<updated>2014-12-26T20:28:28Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Edge Detector */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quality|fine}}&lt;br /&gt;
{{av}}&lt;br /&gt;
Fluid logic is a form of [[computing]] which uses a fluid (generally [[water]]), controlled by various means, to trigger [[pressure plate]]s and hopefully accomplish some desirable result.&lt;br /&gt;
&lt;br /&gt;
==Infinite Flow Gates==&lt;br /&gt;
&amp;lt;!--[[Talk:Fluid_logic#Image_improvement]]--&amp;gt;&lt;br /&gt;
These logic gates are relatively simple and cheap to make, but require an infinite amount of [[flow]] and infinite drainage to operate. You can build a circuit system to prevent the loss of water, but closing constructions like [[floodgate]]s will always destroy water, so you'll always have to replace it somehow. The following examples use raising [[bridge]]s and floodgates, as they have the same delay of 100 steps when reacting to on/off signals. The bridges work as inverted input as they block passage when receiving an on signal while floodgates open in that case. The channel in the gates stands for the drainage.&lt;br /&gt;
&lt;br /&gt;
There are two versions of these gates here.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''AND'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An AND gate is simply created by putting two floodgates ''in a row'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When both floodgates receive an on signal, they will open and let the water from the left side pass. The [[pressure plate]] behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
* You can use a single floodgate and a 0-3 pressure plate to get a NOT gate.&lt;br /&gt;
* You can use a single 1x1 raising bridges and a 4-7 pressure plate to get a NOT gate, too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''OR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An OR gate is simply created by putting two floodgates in ''parallel'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When one of the floodgates receives an on signal, it will open and let the water from the left side pass. The pressure plate behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NAND operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''XOR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|╬|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|╬|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
A XOR gate is created by putting 1x1 raising bridges and floodgates together. The red bridge and floodgate {{Raw Tile|X|#A00|#444}}{{Raw Tile|╬|#A00|#444}} are linked to the same input and the green bridge and floodgate {{Raw Tile|X|#0A0|#444}}{{Raw Tile|╬|#0A0|#444}} are both linked to the other input. When one of the inputs sends an on signal, the bridge will raise/close and the appropriate door will be opened. Only when the floodgate and the bridge at one passage are open, what happens when exactly one input signal is on, the water will flow to the right. The pressure plate behind the bridges has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you exchange bridge and floodgate for one of the two inputs, you'll get a XNOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time&lt;br /&gt;
* Processing more input signals is possible but requires an exponentially increasing number of bridges, floodgates, and mechanisms. It is easier to link the output to another XOR gate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As mentioned, you can just add more floodgates and bridges and even pressure plates to expand your gates to process more input signals and process more complex operations at once. You can combine floodgates and bridges as you need them. Putting them in a row will connect them as AND. Every time you add a new parallel passage with floodgates and bridges this will work as an OR for each other passage. The XOR gate for example is nothing else than combined logic: A XOR B = (A AND NOT B) OR (NOT A AND B).&lt;br /&gt;
But sometimes it is easier to use more but simpler gates.&lt;br /&gt;
&lt;br /&gt;
==Fluid Preserving Gates==&lt;br /&gt;
At the moment there doesn't exist a full concept of a fluid-preserving fluid logic gate. Each design working with floodgates or equivalent components in the gates will have to deal with the destruction of the fluid. A way to handle this can be the usage of [[Hatch cover|hatches]]. [[Evaporation]] is another known problem.&lt;br /&gt;
&lt;br /&gt;
==CMOS Transmission Gate and Inverter Logic==&lt;br /&gt;
Perhaps the closest to utilizing water as a stand-in for electricity, transmission gate logic can be accomplished by simply having an infinite water source in place of all +Vs, and infinite drainage for all grounds.  Simple floodgates behave as standard transmission gates, while bridges are inverted gates.  However, unlike the other forms of fluid logic, but as with real world electrical circuits, a dedicated inverter is required, which must be hooked up to +V and ground.&lt;br /&gt;
&lt;br /&gt;
==Advanced Complementary fluid logic Gates==&lt;br /&gt;
This type of logic uses the different behaviour of raising bridges and floodgates when switched to minimise water consumption and remove the need of a drain. The use of (typically) two buildings for every input, one of which is always open while the other is closed, ensures that only very little water will flow during operation, and only when there is a state change. Thus, this variation of fluid logic is conceptually very similar to real CMOS circuits, which use a similar paradigm to limit power consumption. &lt;br /&gt;
&lt;br /&gt;
===Basic Design===&lt;br /&gt;
Let's say we want to evaluate the logical expression ''f''. It can be a simple '''AND''' or '''OR''' gate, or anything more complicated. Follow the following scheme:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RTF|A}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RTF|B}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here, {{Tile|A|#FFF|#000}} is a set of floodgates and/or drawbridges that let water flow exactly when ''f'' evaluates to true, {{Tile|B|#FFF|#000}} is the same except that it lets water flow when ''f'' evaluates to false, {{Tile|^|#808|#000}} is a pressure plate set to activate on a sufficient water level. Notably, a drain is not needed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
In the following examples, {{Tile|X|#000|#888}} is a floodgate, and {{Tile|╬|#FFF|#000}} is a drawbridge. Red ones are connected to input A, green ones to input B and blue ones to input C.&lt;br /&gt;
&lt;br /&gt;
====NOT====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pressure plate must activate on a water level of 5-7. When input turns off, the drawbridge lowers and the floodgate closes. Water can flow onto the pressure plate and fills the tile completely, turning output on. &lt;br /&gt;
&lt;br /&gt;
When input turns on, the bridge raises and cuts off incoming water, while the floodgate opens and the water on the pressure plate's tile spreads over the now two open tiles. Water depth over the pressure plate lowers to 3-4, insufficient to keep the pressure plate active, which will turn off. &lt;br /&gt;
&lt;br /&gt;
Siphoning the water off into a drain is unnecessary: the spread of water into opened tiles is sufficient to reliably produce a measurably different liquid level. This holds for all binary logic gates under this doctrine.&lt;br /&gt;
&lt;br /&gt;
====AND====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====OR====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the AND gate, the pressure plate should respond to 6-7 or 7-7 water. Since the OR gate is in effect a NOR gate with inverted output, the plate must respond to &amp;quot;low&amp;quot; water, 0-5 is recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XOR====&lt;br /&gt;
This is not as straightforward as the previous ones. The ''true'' expression is the following: (A '''and not''' B) '''or''' ('''not''' A '''and''' B). The ''false'' expression: (A '''and''' B) '''or''' ('''not''' A '''and not''' B).&lt;br /&gt;
&lt;br /&gt;
So the gates look like the following:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If both inputs have the same value (both on or off), the two closed floodgates or raised bridges will form an impassable wall, blocking inflow of water. The second row of floodgates &amp;quot;behind&amp;quot; the pressure plate ensures that when the gate is deactivated by an &amp;quot;on&amp;quot; signal raising bridges, there is still space opened for water to spread into and lower fluid level. Either combination of one &amp;quot;on&amp;quot; with one &amp;quot;off&amp;quot; input opens a direct path for water to enter. The pressure plate must be set to react to 7/7 fluid, anything less can result in false positives. &lt;br /&gt;
&lt;br /&gt;
===Advantages And Disadvantages===&lt;br /&gt;
The basic advantage of this design is that it uses much less water than infinite flow gates. A river is enough to supply even the more complex systems, as long as sufficient liquid depth is provided. A drain is not needed.&lt;br /&gt;
&lt;br /&gt;
The disadvantage is that it requires more resources to construct, and more careful planning, since floodgates tend to block paths. The presented drain-less gates depend on precise fluid depth and require that all incoming logic fluid is at the full 7/7 depth. This may necessitate building a reservoir or pumping system to compensate for flow irregularities or overcome the sluggishness of otherwise pressureless fluids. That's especially true when you decide to use [[magma|magma/lava]] as fluid.&lt;br /&gt;
&lt;br /&gt;
==Speed Improvements==&lt;br /&gt;
The main factors that affect the speed of these gates are the delays of floodgates and bridges, and the switch-off delay of pressure plates. These cannot be eliminated, although designs that seek to replace as many buildings as possible with doors and hatches may minimize delays.&lt;br /&gt;
&lt;br /&gt;
Another factor is the flowing speed of the water. It can be improved. First, the water should flow in from a reservoir a few z-levels higher than the gates themselves (the more the better). This way, water will flow in much faster. In infinite-flow gates, you can then replace the pressure plates with up stairs, and make a 2x1 room one z-level above. On one tile is a down stair, and on the other is the pressure plate. Now the water will also flow out faster, or at least the pressure plate will switch off sooner.  To minimize latency when deactivated, assuming sufficient inflow, the pressure plate can be set to trigger only on a full 7 units of water.  This increases the water consumption a bit, but it still remains relatively low.&lt;br /&gt;
&lt;br /&gt;
==Edge Detector==&lt;br /&gt;
In some situations, it is beneficial to have logic that triggers during a state ''transition'' rather than based on steady states - for example, turning a lever &amp;quot;on&amp;quot; could trigger one brief event while turning the lever &amp;quot;off&amp;quot; would trigger a different event (or possibly the same event).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z+0&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╦}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╩}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z=-1&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both pressure plates should trigger on depth 2-6. Link the bottom pressure plate to machines you wish to activate on ''positive'' transitions (e.g. stepping onto a pressure plate, or pulling a lever) and the upper pressure plate to machines you wish to activate on ''negative'' transitions (e.g. stepping off of the pressure plate, or pulling the lever again), then link the trigger itself (a lever or pressure plate) to both floodgates and both raising bridges.&lt;br /&gt;
&lt;br /&gt;
Each time the input trigger is toggled, the appropriate pressure plate will activate, remain active until the water finishes flowing, then deactivate after about 100 steps.&lt;br /&gt;
&lt;br /&gt;
An edge detector can be realized very space efficient in advanced complementary fluid logic (as long as both pressure plates are linked to a single item). Input goes to floodgate and bridge, the pressure plates are working on 0-5 and 6-7, respectively. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RT|^|#808}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Memory Cells==&lt;br /&gt;
&lt;br /&gt;
Fluid logic offers options for comparatively small [[Memory_(computing)|memory]] cells requiring very few mechanisms. They are usually quite primitive, so that more complicated memory manipulation requires additional machinery, but for simply &amp;quot;holding&amp;quot; a bit of information, they are hard to beat in compactness. &lt;br /&gt;
&lt;br /&gt;
====S/R Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT0|┼|#0F0}}&lt;br /&gt;
|{{RT0|^|#F0F}}&lt;br /&gt;
|{{RT0|┼|#F00}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Design by [[User:Hussell/SetResetLatch|Hussell]].&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;set/reset&amp;quot; latch will activate when it receives a &amp;quot;set&amp;quot; signal - opening the door {{Tile|┼|#0F0}} , letting in water and triggering the pressure plate reacting to liquid of levels 5-7 - and stays active when the set signal turns off again. It will only deactivate when it receives an explicit &amp;quot;reset&amp;quot; signal - opening the door {{Tile|┼|#F00}}&lt;br /&gt;
behind the plate, allowing water to spread off the plate, lowering liquid depth enough to fall under the activation threshold. Further activity of the reset signal will, once again, not change the cell's state once it has been reset. &lt;br /&gt;
&lt;br /&gt;
As usual in real-world set/reset latches, the inputs should not both be &amp;quot;on&amp;quot; at the same time.&lt;br /&gt;
&lt;br /&gt;
====D-Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|┼|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This cell &amp;quot;tests&amp;quot; the state of the &amp;quot;Data&amp;quot; (hence D ) input controlling the door {{Tile|┼|#FFF|#800}} and the pressure plate (set to trigger on 5-7 liquid) will take on that input's state when the &amp;quot;enable&amp;quot; input opens door {{Tile|┼|#FFF|#080}}: if the data input is on, water can pass from the source to the pressure plate and fills the cell. If the data input is off, water will spread from the plate to the door's tile and lower liquid depth over the plate. &lt;br /&gt;
&lt;br /&gt;
This cell will turn &amp;quot;on&amp;quot; whenever both data and enable input are on, but will only turn &amp;quot;off&amp;quot; when the data input is off at the moment the enable input ''switches'' from off to on, making it a hybrid of a Latch (reacts to changes in data as long as enabled) and a flipflop (only reacts to data state the moment enable changes from off to on). While this is clearly a weakness of the design, it is very compact and uncomplicated, needing a mere four mechanisms to link the doors to the inputs.&lt;br /&gt;
&lt;br /&gt;
====Toggle Flipflop====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a cell which changes state to the opposite whenever its &amp;quot;control&amp;quot; input switches from off to on. The door {{Tile|┼|#FFF|#080}} is activated by the control input, and both the door and the bridge {{Tile|╬|#FFF|#800}} are linked to the pressure plate (triggering on 5-7 water). &lt;br /&gt;
&lt;br /&gt;
The operation is not immediately obvious, thus a breakdown, beginning with the cell in the &amp;quot;off&amp;quot; state:&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 4 or less, the bridge is lowered. When the &amp;quot;clock/control&amp;quot; turns on, the door opens and water rushes onto the plate. The plate triggers and sends &amp;quot;on&amp;quot; signals to both bridge and door. The signal to the door is ignored, since the door's already open. The bridge receives a &amp;quot;raise&amp;quot; signal and reacts to it with a 100 step delay. Neither the bridge raising nor the door closing (when the control turns off again) does anything to the pressure plate's state, it remains &amp;quot;on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 5 or more (usually 7), the bridge is raised. When the clock turns on, water spreads from the plate to the door's tile. Water level on the plate falls under the activation threshold. After the normal pressure plate reset delay of 99 steps, &amp;quot;off&amp;quot; signals are sent to the door and the bridge. The door will immediately close, the bridge will lower 100 steps later. The cell is &amp;quot;off&amp;quot; and will remain so until the clock turns on again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category|Constructions}}&lt;br /&gt;
{{Category|Computing}}&lt;br /&gt;
{{Category|Logic}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214581</id>
		<title>Fluid logic</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214581"/>
		<updated>2014-12-26T20:27:12Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Edge Detector */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quality|fine}}&lt;br /&gt;
{{av}}&lt;br /&gt;
Fluid logic is a form of [[computing]] which uses a fluid (generally [[water]]), controlled by various means, to trigger [[pressure plate]]s and hopefully accomplish some desirable result.&lt;br /&gt;
&lt;br /&gt;
==Infinite Flow Gates==&lt;br /&gt;
&amp;lt;!--[[Talk:Fluid_logic#Image_improvement]]--&amp;gt;&lt;br /&gt;
These logic gates are relatively simple and cheap to make, but require an infinite amount of [[flow]] and infinite drainage to operate. You can build a circuit system to prevent the loss of water, but closing constructions like [[floodgate]]s will always destroy water, so you'll always have to replace it somehow. The following examples use raising [[bridge]]s and floodgates, as they have the same delay of 100 steps when reacting to on/off signals. The bridges work as inverted input as they block passage when receiving an on signal while floodgates open in that case. The channel in the gates stands for the drainage.&lt;br /&gt;
&lt;br /&gt;
There are two versions of these gates here.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''AND'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An AND gate is simply created by putting two floodgates ''in a row'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When both floodgates receive an on signal, they will open and let the water from the left side pass. The [[pressure plate]] behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
* You can use a single floodgate and a 0-3 pressure plate to get a NOT gate.&lt;br /&gt;
* You can use a single 1x1 raising bridges and a 4-7 pressure plate to get a NOT gate, too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''OR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An OR gate is simply created by putting two floodgates in ''parallel'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When one of the floodgates receives an on signal, it will open and let the water from the left side pass. The pressure plate behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NAND operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''XOR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|╬|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|╬|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
A XOR gate is created by putting 1x1 raising bridges and floodgates together. The red bridge and floodgate {{Raw Tile|X|#A00|#444}}{{Raw Tile|╬|#A00|#444}} are linked to the same input and the green bridge and floodgate {{Raw Tile|X|#0A0|#444}}{{Raw Tile|╬|#0A0|#444}} are both linked to the other input. When one of the inputs sends an on signal, the bridge will raise/close and the appropriate door will be opened. Only when the floodgate and the bridge at one passage are open, what happens when exactly one input signal is on, the water will flow to the right. The pressure plate behind the bridges has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you exchange bridge and floodgate for one of the two inputs, you'll get a XNOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time&lt;br /&gt;
* Processing more input signals is possible but requires an exponentially increasing number of bridges, floodgates, and mechanisms. It is easier to link the output to another XOR gate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As mentioned, you can just add more floodgates and bridges and even pressure plates to expand your gates to process more input signals and process more complex operations at once. You can combine floodgates and bridges as you need them. Putting them in a row will connect them as AND. Every time you add a new parallel passage with floodgates and bridges this will work as an OR for each other passage. The XOR gate for example is nothing else than combined logic: A XOR B = (A AND NOT B) OR (NOT A AND B).&lt;br /&gt;
But sometimes it is easier to use more but simpler gates.&lt;br /&gt;
&lt;br /&gt;
==Fluid Preserving Gates==&lt;br /&gt;
At the moment there doesn't exist a full concept of a fluid-preserving fluid logic gate. Each design working with floodgates or equivalent components in the gates will have to deal with the destruction of the fluid. A way to handle this can be the usage of [[Hatch cover|hatches]]. [[Evaporation]] is another known problem.&lt;br /&gt;
&lt;br /&gt;
==CMOS Transmission Gate and Inverter Logic==&lt;br /&gt;
Perhaps the closest to utilizing water as a stand-in for electricity, transmission gate logic can be accomplished by simply having an infinite water source in place of all +Vs, and infinite drainage for all grounds.  Simple floodgates behave as standard transmission gates, while bridges are inverted gates.  However, unlike the other forms of fluid logic, but as with real world electrical circuits, a dedicated inverter is required, which must be hooked up to +V and ground.&lt;br /&gt;
&lt;br /&gt;
==Advanced Complementary fluid logic Gates==&lt;br /&gt;
This type of logic uses the different behaviour of raising bridges and floodgates when switched to minimise water consumption and remove the need of a drain. The use of (typically) two buildings for every input, one of which is always open while the other is closed, ensures that only very little water will flow during operation, and only when there is a state change. Thus, this variation of fluid logic is conceptually very similar to real CMOS circuits, which use a similar paradigm to limit power consumption. &lt;br /&gt;
&lt;br /&gt;
===Basic Design===&lt;br /&gt;
Let's say we want to evaluate the logical expression ''f''. It can be a simple '''AND''' or '''OR''' gate, or anything more complicated. Follow the following scheme:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RTF|A}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RTF|B}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here, {{Tile|A|#FFF|#000}} is a set of floodgates and/or drawbridges that let water flow exactly when ''f'' evaluates to true, {{Tile|B|#FFF|#000}} is the same except that it lets water flow when ''f'' evaluates to false, {{Tile|^|#808|#000}} is a pressure plate set to activate on a sufficient water level. Notably, a drain is not needed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
In the following examples, {{Tile|X|#000|#888}} is a floodgate, and {{Tile|╬|#FFF|#000}} is a drawbridge. Red ones are connected to input A, green ones to input B and blue ones to input C.&lt;br /&gt;
&lt;br /&gt;
====NOT====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pressure plate must activate on a water level of 5-7. When input turns off, the drawbridge lowers and the floodgate closes. Water can flow onto the pressure plate and fills the tile completely, turning output on. &lt;br /&gt;
&lt;br /&gt;
When input turns on, the bridge raises and cuts off incoming water, while the floodgate opens and the water on the pressure plate's tile spreads over the now two open tiles. Water depth over the pressure plate lowers to 3-4, insufficient to keep the pressure plate active, which will turn off. &lt;br /&gt;
&lt;br /&gt;
Siphoning the water off into a drain is unnecessary: the spread of water into opened tiles is sufficient to reliably produce a measurably different liquid level. This holds for all binary logic gates under this doctrine.&lt;br /&gt;
&lt;br /&gt;
====AND====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====OR====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the AND gate, the pressure plate should respond to 6-7 or 7-7 water. Since the OR gate is in effect a NOR gate with inverted output, the plate must respond to &amp;quot;low&amp;quot; water, 0-5 is recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XOR====&lt;br /&gt;
This is not as straightforward as the previous ones. The ''true'' expression is the following: (A '''and not''' B) '''or''' ('''not''' A '''and''' B). The ''false'' expression: (A '''and''' B) '''or''' ('''not''' A '''and not''' B).&lt;br /&gt;
&lt;br /&gt;
So the gates look like the following:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If both inputs have the same value (both on or off), the two closed floodgates or raised bridges will form an impassable wall, blocking inflow of water. The second row of floodgates &amp;quot;behind&amp;quot; the pressure plate ensures that when the gate is deactivated by an &amp;quot;on&amp;quot; signal raising bridges, there is still space opened for water to spread into and lower fluid level. Either combination of one &amp;quot;on&amp;quot; with one &amp;quot;off&amp;quot; input opens a direct path for water to enter. The pressure plate must be set to react to 7/7 fluid, anything less can result in false positives. &lt;br /&gt;
&lt;br /&gt;
===Advantages And Disadvantages===&lt;br /&gt;
The basic advantage of this design is that it uses much less water than infinite flow gates. A river is enough to supply even the more complex systems, as long as sufficient liquid depth is provided. A drain is not needed.&lt;br /&gt;
&lt;br /&gt;
The disadvantage is that it requires more resources to construct, and more careful planning, since floodgates tend to block paths. The presented drain-less gates depend on precise fluid depth and require that all incoming logic fluid is at the full 7/7 depth. This may necessitate building a reservoir or pumping system to compensate for flow irregularities or overcome the sluggishness of otherwise pressureless fluids. That's especially true when you decide to use [[magma|magma/lava]] as fluid.&lt;br /&gt;
&lt;br /&gt;
==Speed Improvements==&lt;br /&gt;
The main factors that affect the speed of these gates are the delays of floodgates and bridges, and the switch-off delay of pressure plates. These cannot be eliminated, although designs that seek to replace as many buildings as possible with doors and hatches may minimize delays.&lt;br /&gt;
&lt;br /&gt;
Another factor is the flowing speed of the water. It can be improved. First, the water should flow in from a reservoir a few z-levels higher than the gates themselves (the more the better). This way, water will flow in much faster. In infinite-flow gates, you can then replace the pressure plates with up stairs, and make a 2x1 room one z-level above. On one tile is a down stair, and on the other is the pressure plate. Now the water will also flow out faster, or at least the pressure plate will switch off sooner.  To minimize latency when deactivated, assuming sufficient inflow, the pressure plate can be set to trigger only on a full 7 units of water.  This increases the water consumption a bit, but it still remains relatively low.&lt;br /&gt;
&lt;br /&gt;
==Edge Detector==&lt;br /&gt;
In some situations, it is beneficial to have logic that triggers during a state ''transition'' rather than based on steady states - for example, turning a lever &amp;quot;on&amp;quot; could trigger one brief event while turning the lever &amp;quot;off&amp;quot; would trigger a different event (or possibly the same event).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z+0&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╦}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╩}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z=-1&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both pressure plates should trigger on depth 2-6. Link the bottom pressure plate to machines you wish to activate on ''positive'' transitions (e.g. stepping onto a pressure plate, or pulling a lever) and the upper pressure plate to machines you wish to activate on ''negative'' transitions (e.g. stepping off of the pressure plate, or pulling the lever again), then link the trigger itself (a lever or pressure plate) to both floodgates and both raising bridges.&lt;br /&gt;
&lt;br /&gt;
Each time the input trigger is toggled, the appropriate pressure plate will activate, remain active until the water finishes flowing, then deactivate after about 100 steps.&lt;br /&gt;
&lt;br /&gt;
An edge detector can be realized very space efficient in advanced complementary fluid logic (as long as both pressure plates are linked to a single item). Input goes to floodgate and bridge, the pressure plates are working on 0-5 and 6-7, respectively. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|^|#808}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Memory Cells==&lt;br /&gt;
&lt;br /&gt;
Fluid logic offers options for comparatively small [[Memory_(computing)|memory]] cells requiring very few mechanisms. They are usually quite primitive, so that more complicated memory manipulation requires additional machinery, but for simply &amp;quot;holding&amp;quot; a bit of information, they are hard to beat in compactness. &lt;br /&gt;
&lt;br /&gt;
====S/R Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT0|┼|#0F0}}&lt;br /&gt;
|{{RT0|^|#F0F}}&lt;br /&gt;
|{{RT0|┼|#F00}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Design by [[User:Hussell/SetResetLatch|Hussell]].&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;set/reset&amp;quot; latch will activate when it receives a &amp;quot;set&amp;quot; signal - opening the door {{Tile|┼|#0F0}} , letting in water and triggering the pressure plate reacting to liquid of levels 5-7 - and stays active when the set signal turns off again. It will only deactivate when it receives an explicit &amp;quot;reset&amp;quot; signal - opening the door {{Tile|┼|#F00}}&lt;br /&gt;
behind the plate, allowing water to spread off the plate, lowering liquid depth enough to fall under the activation threshold. Further activity of the reset signal will, once again, not change the cell's state once it has been reset. &lt;br /&gt;
&lt;br /&gt;
As usual in real-world set/reset latches, the inputs should not both be &amp;quot;on&amp;quot; at the same time.&lt;br /&gt;
&lt;br /&gt;
====D-Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|┼|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This cell &amp;quot;tests&amp;quot; the state of the &amp;quot;Data&amp;quot; (hence D ) input controlling the door {{Tile|┼|#FFF|#800}} and the pressure plate (set to trigger on 5-7 liquid) will take on that input's state when the &amp;quot;enable&amp;quot; input opens door {{Tile|┼|#FFF|#080}}: if the data input is on, water can pass from the source to the pressure plate and fills the cell. If the data input is off, water will spread from the plate to the door's tile and lower liquid depth over the plate. &lt;br /&gt;
&lt;br /&gt;
This cell will turn &amp;quot;on&amp;quot; whenever both data and enable input are on, but will only turn &amp;quot;off&amp;quot; when the data input is off at the moment the enable input ''switches'' from off to on, making it a hybrid of a Latch (reacts to changes in data as long as enabled) and a flipflop (only reacts to data state the moment enable changes from off to on). While this is clearly a weakness of the design, it is very compact and uncomplicated, needing a mere four mechanisms to link the doors to the inputs.&lt;br /&gt;
&lt;br /&gt;
====Toggle Flipflop====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a cell which changes state to the opposite whenever its &amp;quot;control&amp;quot; input switches from off to on. The door {{Tile|┼|#FFF|#080}} is activated by the control input, and both the door and the bridge {{Tile|╬|#FFF|#800}} are linked to the pressure plate (triggering on 5-7 water). &lt;br /&gt;
&lt;br /&gt;
The operation is not immediately obvious, thus a breakdown, beginning with the cell in the &amp;quot;off&amp;quot; state:&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 4 or less, the bridge is lowered. When the &amp;quot;clock/control&amp;quot; turns on, the door opens and water rushes onto the plate. The plate triggers and sends &amp;quot;on&amp;quot; signals to both bridge and door. The signal to the door is ignored, since the door's already open. The bridge receives a &amp;quot;raise&amp;quot; signal and reacts to it with a 100 step delay. Neither the bridge raising nor the door closing (when the control turns off again) does anything to the pressure plate's state, it remains &amp;quot;on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 5 or more (usually 7), the bridge is raised. When the clock turns on, water spreads from the plate to the door's tile. Water level on the plate falls under the activation threshold. After the normal pressure plate reset delay of 99 steps, &amp;quot;off&amp;quot; signals are sent to the door and the bridge. The door will immediately close, the bridge will lower 100 steps later. The cell is &amp;quot;off&amp;quot; and will remain so until the clock turns on again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category|Constructions}}&lt;br /&gt;
{{Category|Computing}}&lt;br /&gt;
{{Category|Logic}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214580</id>
		<title>Fluid logic</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Fluid_logic&amp;diff=214580"/>
		<updated>2014-12-26T20:26:33Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Edge Detector */ a substitute w/o infinite flow was missing for the edge detector, here is one&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{quality|fine}}&lt;br /&gt;
{{av}}&lt;br /&gt;
Fluid logic is a form of [[computing]] which uses a fluid (generally [[water]]), controlled by various means, to trigger [[pressure plate]]s and hopefully accomplish some desirable result.&lt;br /&gt;
&lt;br /&gt;
==Infinite Flow Gates==&lt;br /&gt;
&amp;lt;!--[[Talk:Fluid_logic#Image_improvement]]--&amp;gt;&lt;br /&gt;
These logic gates are relatively simple and cheap to make, but require an infinite amount of [[flow]] and infinite drainage to operate. You can build a circuit system to prevent the loss of water, but closing constructions like [[floodgate]]s will always destroy water, so you'll always have to replace it somehow. The following examples use raising [[bridge]]s and floodgates, as they have the same delay of 100 steps when reacting to on/off signals. The bridges work as inverted input as they block passage when receiving an on signal while floodgates open in that case. The channel in the gates stands for the drainage.&lt;br /&gt;
&lt;br /&gt;
There are two versions of these gates here.&amp;lt;br clear=&amp;quot;all&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''AND'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An AND gate is simply created by putting two floodgates ''in a row'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When both floodgates receive an on signal, they will open and let the water from the left side pass. The [[pressure plate]] behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
* You can use a single floodgate and a 0-3 pressure plate to get a NOT gate.&lt;br /&gt;
* You can use a single 1x1 raising bridges and a 4-7 pressure plate to get a NOT gate, too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''OR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
An OR gate is simply created by putting two floodgates in ''parallel'', each one connected to one of the input triggers: {{Raw Tile|X|#A00|#444}}{{Raw Tile|X|#0A0|#444}}. When one of the floodgates receives an on signal, it will open and let the water from the left side pass. The pressure plate behind the floodgates has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you use two 1x1 raising bridges, you'll get a NAND operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can add more floodgates to process more than two signals in the conjunction.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;position:relative; float:none;&amp;quot;&amp;gt;&lt;br /&gt;
'''XOR'''&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; border-style:solid; border-width:thin; border-color:#000000;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-spacing:0; padding:0; margin:0; vertical-align:middle;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|X|#444}}&lt;br /&gt;
|{{RTL|#0A0|╬|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#00A|^|#DDD}}&lt;br /&gt;
|{{RTL|#222|·|#BBB}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#00A|≈|#DDD}}&lt;br /&gt;
|{{RTL|#A00|╬|#444}}&lt;br /&gt;
|{{RTL|#0A0|X|#444}}&lt;br /&gt;
|{{RTL|#DDD}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|{{RTL|#222}}&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
A XOR gate is created by putting 1x1 raising bridges and floodgates together. The red bridge and floodgate {{Raw Tile|X|#A00|#444}}{{Raw Tile|╬|#A00|#444}} are linked to the same input and the green bridge and floodgate {{Raw Tile|X|#0A0|#444}}{{Raw Tile|╬|#0A0|#444}} are both linked to the other input. When one of the inputs sends an on signal, the bridge will raise/close and the appropriate door will be opened. Only when the floodgate and the bridge at one passage are open, what happens when exactly one input signal is on, the water will flow to the right. The pressure plate behind the bridges has to be constructed to react on 4-7 water.&lt;br /&gt;
* If you exchange bridge and floodgate for one of the two inputs, you'll get a XNOR operation instead.&lt;br /&gt;
* The output can also be inverted by using a 0-3 pressure plate.&lt;br /&gt;
* You can use a 0-3 and a 4-7 pressure plate at the same time to get the result and its inversion at the same time&lt;br /&gt;
* Processing more input signals is possible but requires an exponentially increasing number of bridges, floodgates, and mechanisms. It is easier to link the output to another XOR gate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As mentioned, you can just add more floodgates and bridges and even pressure plates to expand your gates to process more input signals and process more complex operations at once. You can combine floodgates and bridges as you need them. Putting them in a row will connect them as AND. Every time you add a new parallel passage with floodgates and bridges this will work as an OR for each other passage. The XOR gate for example is nothing else than combined logic: A XOR B = (A AND NOT B) OR (NOT A AND B).&lt;br /&gt;
But sometimes it is easier to use more but simpler gates.&lt;br /&gt;
&lt;br /&gt;
==Fluid Preserving Gates==&lt;br /&gt;
At the moment there doesn't exist a full concept of a fluid-preserving fluid logic gate. Each design working with floodgates or equivalent components in the gates will have to deal with the destruction of the fluid. A way to handle this can be the usage of [[Hatch cover|hatches]]. [[Evaporation]] is another known problem.&lt;br /&gt;
&lt;br /&gt;
==CMOS Transmission Gate and Inverter Logic==&lt;br /&gt;
Perhaps the closest to utilizing water as a stand-in for electricity, transmission gate logic can be accomplished by simply having an infinite water source in place of all +Vs, and infinite drainage for all grounds.  Simple floodgates behave as standard transmission gates, while bridges are inverted gates.  However, unlike the other forms of fluid logic, but as with real world electrical circuits, a dedicated inverter is required, which must be hooked up to +V and ground.&lt;br /&gt;
&lt;br /&gt;
==Advanced Complementary fluid logic Gates==&lt;br /&gt;
This type of logic uses the different behaviour of raising bridges and floodgates when switched to minimise water consumption and remove the need of a drain. The use of (typically) two buildings for every input, one of which is always open while the other is closed, ensures that only very little water will flow during operation, and only when there is a state change. Thus, this variation of fluid logic is conceptually very similar to real CMOS circuits, which use a similar paradigm to limit power consumption. &lt;br /&gt;
&lt;br /&gt;
===Basic Design===&lt;br /&gt;
Let's say we want to evaluate the logical expression ''f''. It can be a simple '''AND''' or '''OR''' gate, or anything more complicated. Follow the following scheme:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RTF|A}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RTF|B}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here, {{Tile|A|#FFF|#000}} is a set of floodgates and/or drawbridges that let water flow exactly when ''f'' evaluates to true, {{Tile|B|#FFF|#000}} is the same except that it lets water flow when ''f'' evaluates to false, {{Tile|^|#808|#000}} is a pressure plate set to activate on a sufficient water level. Notably, a drain is not needed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
In the following examples, {{Tile|X|#000|#888}} is a floodgate, and {{Tile|╬|#FFF|#000}} is a drawbridge. Red ones are connected to input A, green ones to input B and blue ones to input C.&lt;br /&gt;
&lt;br /&gt;
====NOT====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pressure plate must activate on a water level of 5-7. When input turns off, the drawbridge lowers and the floodgate closes. Water can flow onto the pressure plate and fills the tile completely, turning output on. &lt;br /&gt;
&lt;br /&gt;
When input turns on, the bridge raises and cuts off incoming water, while the floodgate opens and the water on the pressure plate's tile spreads over the now two open tiles. Water depth over the pressure plate lowers to 3-4, insufficient to keep the pressure plate active, which will turn off. &lt;br /&gt;
&lt;br /&gt;
Siphoning the water off into a drain is unnecessary: the spread of water into opened tiles is sufficient to reliably produce a measurably different liquid level. This holds for all binary logic gates under this doctrine.&lt;br /&gt;
&lt;br /&gt;
====AND====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====OR====&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the AND gate, the pressure plate should respond to 6-7 or 7-7 water. Since the OR gate is in effect a NOR gate with inverted output, the plate must respond to &amp;quot;low&amp;quot; water, 0-5 is recommended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XOR====&lt;br /&gt;
This is not as straightforward as the previous ones. The ''true'' expression is the following: (A '''and not''' B) '''or''' ('''not''' A '''and''' B). The ''false'' expression: (A '''and''' B) '''or''' ('''not''' A '''and not''' B).&lt;br /&gt;
&lt;br /&gt;
So the gates look like the following:&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|╬|#0F0|#000}}&lt;br /&gt;
|{{RT|╬|#F00|#000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{RT|X|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If both inputs have the same value (both on or off), the two closed floodgates or raised bridges will form an impassable wall, blocking inflow of water. The second row of floodgates &amp;quot;behind&amp;quot; the pressure plate ensures that when the gate is deactivated by an &amp;quot;on&amp;quot; signal raising bridges, there is still space opened for water to spread into and lower fluid level. Either combination of one &amp;quot;on&amp;quot; with one &amp;quot;off&amp;quot; input opens a direct path for water to enter. The pressure plate must be set to react to 7/7 fluid, anything less can result in false positives. &lt;br /&gt;
&lt;br /&gt;
===Advantages And Disadvantages===&lt;br /&gt;
The basic advantage of this design is that it uses much less water than infinite flow gates. A river is enough to supply even the more complex systems, as long as sufficient liquid depth is provided. A drain is not needed.&lt;br /&gt;
&lt;br /&gt;
The disadvantage is that it requires more resources to construct, and more careful planning, since floodgates tend to block paths. The presented drain-less gates depend on precise fluid depth and require that all incoming logic fluid is at the full 7/7 depth. This may necessitate building a reservoir or pumping system to compensate for flow irregularities or overcome the sluggishness of otherwise pressureless fluids. That's especially true when you decide to use [[magma|magma/lava]] as fluid.&lt;br /&gt;
&lt;br /&gt;
==Speed Improvements==&lt;br /&gt;
The main factors that affect the speed of these gates are the delays of floodgates and bridges, and the switch-off delay of pressure plates. These cannot be eliminated, although designs that seek to replace as many buildings as possible with doors and hatches may minimize delays.&lt;br /&gt;
&lt;br /&gt;
Another factor is the flowing speed of the water. It can be improved. First, the water should flow in from a reservoir a few z-levels higher than the gates themselves (the more the better). This way, water will flow in much faster. In infinite-flow gates, you can then replace the pressure plates with up stairs, and make a 2x1 room one z-level above. On one tile is a down stair, and on the other is the pressure plate. Now the water will also flow out faster, or at least the pressure plate will switch off sooner.  To minimize latency when deactivated, assuming sufficient inflow, the pressure plate can be set to trigger only on a full 7 units of water.  This increases the water consumption a bit, but it still remains relatively low.&lt;br /&gt;
&lt;br /&gt;
==Edge Detector==&lt;br /&gt;
In some situations, it is beneficial to have logic that triggers during a state ''transition'' rather than based on steady states - for example, turning a lever &amp;quot;on&amp;quot; could trigger one brief event while turning the lever &amp;quot;off&amp;quot; would trigger a different event (or possibly the same event).&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z+0&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╦}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╩}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;7&amp;quot;| Z=-1&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╠}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╣}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RTF|#}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{000}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both pressure plates should trigger on depth 2-6. Link the bottom pressure plate to machines you wish to activate on ''positive'' transitions (e.g. stepping onto a pressure plate, or pulling a lever) and the upper pressure plate to machines you wish to activate on ''negative'' transitions (e.g. stepping off of the pressure plate, or pulling the lever again), then link the trigger itself (a lever or pressure plate) to both floodgates and both raising bridges.&lt;br /&gt;
&lt;br /&gt;
Each time the input trigger is toggled, the appropriate pressure plate will activate, remain active until the water finishes flowing, then deactivate after about 100 steps.&lt;br /&gt;
&lt;br /&gt;
An edge detector can be realized very space efficient in advanced complementary fluid logic (as long as both pressure plates are linked to a single item). Input goes to floodgate and bridge, the pressure plates are working on 0-5 and 6-7, respectively. &lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|colspan=&amp;quot;5&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT|╬|#800}}&lt;br /&gt;
|{{RT|^|#808}}&lt;br /&gt;
|{{RT|^|5:1}}&lt;br /&gt;
|{{RT|X|#FFF|#800}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Memory Cells==&lt;br /&gt;
&lt;br /&gt;
Fluid logic offers options for comparatively small [[Memory_(computing)|memory]] cells requiring very few mechanisms. They are usually quite primitive, so that more complicated memory manipulation requires additional machinery, but for simply &amp;quot;holding&amp;quot; a bit of information, they are hard to beat in compactness. &lt;br /&gt;
&lt;br /&gt;
====S/R Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{RT0|┼|#0F0}}&lt;br /&gt;
|{{RT0|^|#F0F}}&lt;br /&gt;
|{{RT0|┼|#F00}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|-&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|{{888}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Design by [[User:Hussell/SetResetLatch|Hussell]].&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;set/reset&amp;quot; latch will activate when it receives a &amp;quot;set&amp;quot; signal - opening the door {{Tile|┼|#0F0}} , letting in water and triggering the pressure plate reacting to liquid of levels 5-7 - and stays active when the set signal turns off again. It will only deactivate when it receives an explicit &amp;quot;reset&amp;quot; signal - opening the door {{Tile|┼|#F00}}&lt;br /&gt;
behind the plate, allowing water to spread off the plate, lowering liquid depth enough to fall under the activation threshold. Further activity of the reset signal will, once again, not change the cell's state once it has been reset. &lt;br /&gt;
&lt;br /&gt;
As usual in real-world set/reset latches, the inputs should not both be &amp;quot;on&amp;quot; at the same time.&lt;br /&gt;
&lt;br /&gt;
====D-Latch====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|┼|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This cell &amp;quot;tests&amp;quot; the state of the &amp;quot;Data&amp;quot; (hence D ) input controlling the door {{Tile|┼|#FFF|#800}} and the pressure plate (set to trigger on 5-7 liquid) will take on that input's state when the &amp;quot;enable&amp;quot; input opens door {{Tile|┼|#FFF|#080}}: if the data input is on, water can pass from the source to the pressure plate and fills the cell. If the data input is off, water will spread from the plate to the door's tile and lower liquid depth over the plate. &lt;br /&gt;
&lt;br /&gt;
This cell will turn &amp;quot;on&amp;quot; whenever both data and enable input are on, but will only turn &amp;quot;off&amp;quot; when the data input is off at the moment the enable input ''switches'' from off to on, making it a hybrid of a Latch (reacts to changes in data as long as enabled) and a flipflop (only reacts to data state the moment enable changes from off to on). While this is clearly a weakness of the design, it is very compact and uncomplicated, needing a mere four mechanisms to link the doors to the inputs.&lt;br /&gt;
&lt;br /&gt;
====Toggle Flipflop====&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing: 0&amp;quot;&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|{{H2O}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╗}}&lt;br /&gt;
|{{RT|╬|#FFF|#800}}&lt;br /&gt;
|{{RTF|╔}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT|┼|#FFF|#080}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|{{RT0|^|#808}}&lt;br /&gt;
|{{RTF|║}}&lt;br /&gt;
|-&lt;br /&gt;
|{{RTF|╚}}&lt;br /&gt;
|{{RTF|═}}&lt;br /&gt;
|{{RTF|╝}}&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a cell which changes state to the opposite whenever its &amp;quot;control&amp;quot; input switches from off to on. The door {{Tile|┼|#FFF|#080}} is activated by the control input, and both the door and the bridge {{Tile|╬|#FFF|#800}} are linked to the pressure plate (triggering on 5-7 water). &lt;br /&gt;
&lt;br /&gt;
The operation is not immediately obvious, thus a breakdown, beginning with the cell in the &amp;quot;off&amp;quot; state:&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 4 or less, the bridge is lowered. When the &amp;quot;clock/control&amp;quot; turns on, the door opens and water rushes onto the plate. The plate triggers and sends &amp;quot;on&amp;quot; signals to both bridge and door. The signal to the door is ignored, since the door's already open. The bridge receives a &amp;quot;raise&amp;quot; signal and reacts to it with a 100 step delay. Neither the bridge raising nor the door closing (when the control turns off again) does anything to the pressure plate's state, it remains &amp;quot;on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Water on the plate is 5 or more (usually 7), the bridge is raised. When the clock turns on, water spreads from the plate to the door's tile. Water level on the plate falls under the activation threshold. After the normal pressure plate reset delay of 99 steps, &amp;quot;off&amp;quot; signals are sent to the door and the bridge. The door will immediately close, the bridge will lower 100 steps later. The cell is &amp;quot;off&amp;quot; and will remain so until the clock turns on again. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Category|Constructions}}&lt;br /&gt;
{{Category|Computing}}&lt;br /&gt;
{{Category|Logic}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Melt_item&amp;diff=212545</id>
		<title>Melt item</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Melt_item&amp;diff=212545"/>
		<updated>2014-11-28T23:58:35Z</updated>

		<summary type="html">&lt;p&gt;Taptap: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Migrated_article}}&lt;br /&gt;
{{quality|unrated}}{{av}}&lt;br /&gt;
You can '''melt''' items at a [[smelter]], using the [[furnace operator]] labor, to recover some of the [[metal]] they were made of.  [[Decoration]]s in a different metal are not recovered or considered; the metal recovered is the specific metal that basic item was listed as being made from. The % return is predictable and consistent for each item type, and ranges from 10%-150%, depending on the item. Higher skill levels in furnace operator speed up the process, but have no effect on the % return.&lt;br /&gt;
&lt;br /&gt;
Items that yield more than 100% can be used to increase the amount of a metal you have available by producing those items and then melting them down again as many times as required.  This is generally considered to be an [[Exploit#Infinite_Adamantine_.2F_Metals|exploit]] of an error in the game mechanics. However, using a dwarf with a high skill level to make the items will result in him throwing severe tantrums when you start melting all his ☼masterwork☼ items, so you will need to disable your legendary armorer/weaponsmith while using the exploit, and make sure the skill levels don't get too high on the dwarfs making the items, to avoid creating masterwork items, or you will have tantrum spirals, fist fights, and/or lots of &amp;lt;s&amp;gt;useless junk&amp;lt;/s&amp;gt; valuable trade goods lying around.&lt;br /&gt;
&lt;br /&gt;
*Caution:(Needs Verification) In the latest version melting ☼masterwork☼ crafts may cause the Dwarf to still throw tantrums even if his skills are disabled at the time.&lt;br /&gt;
&lt;br /&gt;
Recovered metal is measured in 1/10th's, and 1/10ths of bars of each metal are saved at the smelter where the item was melted.  Fractional bars are not &amp;quot;shared&amp;quot; between smelters, nor do they exist as usable objects as is.  When 10/10ths of a type of metal are accumulated at the same smelter, 1 bar of that metal is produced.  If the smelter is torn down or destroyed, all fractions are lost.&lt;br /&gt;
&lt;br /&gt;
:''Example:'' If two items of the same metal worth .4 bars each are melted at the same smelter, that smelter has .8 bars worth waiting in it. &lt;br /&gt;
:If a similar item of a ''different'' metal is then melted there, that smelter would have .8 bars of the first metal and .4 bars of the second. &lt;br /&gt;
:If a similar item of the first metal is then melted at a ''different'' smelter, that smelter will have .4 of that metal, and have no connection to the fractions in the first smelter.  &lt;br /&gt;
:If (finally!), a 3rd, similar item of the first metal is melted at the first smelter, adding another 4/10ths, and giving a total of 12/10ths of that type of metal, 1 bar of that metal is produced, and 2/10th's are waiting (plus the 4/10 of the second metal, also waiting).&lt;br /&gt;
&lt;br /&gt;
So, it makes sense to designate one smelter as &amp;quot;melting&amp;quot; smelter (or for one metal type), to guarantee that fractions will add up effectively.&lt;br /&gt;
&lt;br /&gt;
==Designating items to melt==&lt;br /&gt;
You can designate metal items for melting from any interface that allows you to view the object's description screen, such as from the [[Stocks]] page or the Loo{{k|k}} interface. &lt;br /&gt;
&lt;br /&gt;
To bring up an individual object description screen when the object is:&lt;br /&gt;
:* On the '''ground''':  Type {{k|k}}, scroll to the object, select it from the list, and type {{k|Enter}}.&lt;br /&gt;
:* In a '''workshop''':  Type {{k|t}}, highlight the workshop, select the object from the list, and type {{k|Enter}}.&lt;br /&gt;
:* '''Held''' by a dwarf:  Type {{k|v}}, highlight the dwarf, type {{k|i}} to show his inventory, select the object from the list, and type {{k|Enter}}.&lt;br /&gt;
:* Inside another object:  Display the container's object description screen, navigate to the specific object you wish to see, and type {{k|Enter}}.&lt;br /&gt;
:* In the '''stocks''' menu:  Type {{k|z}}, hit right-direction a few times to select &amp;quot;stocks&amp;quot; and press return.  Scroll to the type of object you wish to melt, type {{k|Tab}} to show individual items (You have to have an exact number or this won't work.  See [[Bookkeeper]] for how to get this), scroll to the specific object, and type {{k|v}} to view.&lt;br /&gt;
&lt;br /&gt;
To designate the item, simply type {{k|m}} to mark the object for melting.  If the item is designated for melting and [[forbidden]] then the item will '''not''' be melted.&lt;br /&gt;
&lt;br /&gt;
However, this only marks which items you want to be melted - you still have to place the job-order in a smelter...&lt;br /&gt;
&lt;br /&gt;
==Melting the items==&lt;br /&gt;
Items designated to be melted will be left alone until you queue a &amp;quot;Melt a metal object&amp;quot; job {{k|o}} at a [[Smelter]].  Melting down an object requires the [[Furnace operator]] labor (and consumes a unit of [[fuel]] for a non-magma smelter).&lt;br /&gt;
&lt;br /&gt;
The job gives the same experience to the [[furnace operator]] skill regardless of % yield of the item melted.&lt;br /&gt;
&lt;br /&gt;
==Yield==&lt;br /&gt;
Testing is incomplete, but preliminary results show a yield of 0.3 bars times the object's material size for anything that has a material size, or 1 bar for most furniture (regardless of size).&lt;br /&gt;
&lt;br /&gt;
Note that the Efficiency column is only accurate for ordinary metals - when using [[adamantine]], the number of wafers required comes from the &amp;quot;Material size&amp;quot; column instead of &amp;quot;Bars to make&amp;quot;, so if that number is larger, the efficiency will be reduced accordingly.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;margin:1em 1em 1em 0;background:#F9F9F9;border:1px #AAA solid;border-collapse:collapse;&amp;quot; class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Item !! Material size !! Bars to make !! Bars returned !! Efficiency&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[weapon|Weapons]] (made by Weaponsmith)&lt;br /&gt;
|-&lt;br /&gt;
| Crossbow || 3 || 1 || 0.9 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Mace || 3 || 1 || 0.9 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Spear || 3 || 1 || 0.9 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Short sword || 3 || 1 || 0.9 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| War hammer || 3 || 1 || 0.9 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Battle axe || 4 || 1 || 1.2 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Pick || 4 || 1 || 1.2 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Ammo (stack of 25) || (1) || 1 || 0.3{{verify}} || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Ammo (stack of 1) || (1) || 1/25 || 0.1{{verify}} || '''''250%'''''&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|Siege Equipment (Weaponsmith)&lt;br /&gt;
|-&lt;br /&gt;
| Ballista arrow || (4) || 3 || 0.5{{verify}} || 17%&lt;br /&gt;
|-&lt;br /&gt;
| Ballista arrow head || (4) || 3 || 0.5{{verify}} || 17%&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[trap_component|Trap Components]] (Weaponsmith)&lt;br /&gt;
|-&lt;br /&gt;
| Giant Axe Blade|| 5 || 1 || 1.5 || '''''150%'''''&lt;br /&gt;
|-&lt;br /&gt;
| Enormous Corkscrew|| 5 || 1 || 1.5 || '''''150%'''''&lt;br /&gt;
|-&lt;br /&gt;
| Spiked Ball|| 4 || 1 || 1.2 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Large Serrated Disc|| 4 || 1 || 1.2{{verify}} || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Menacing Spike|| 5 || 1 || 1.5{{verify}} || '''''150%'''''&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[trap_component|Trap Components]] (Mechanic)&lt;br /&gt;
|-&lt;br /&gt;
| Mechanisms || (3) || 1 || 0.5 || 50%&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[Armor]] (Armorsmith)&lt;br /&gt;
|-&lt;br /&gt;
| Cap || 1 || 1 || 0.3 || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Helm || 2 || 1 || 0.6 || 60%&lt;br /&gt;
|-&lt;br /&gt;
| Gauntlet || 2 || 0.5 || 0.6 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Leggings || 5 || 1 || 1.5 || '''''150%'''''&lt;br /&gt;
|-&lt;br /&gt;
| Greaves || 6 || 2 || 1.8 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Low boot || 1 || 0.5 || 0.3 || 60%&lt;br /&gt;
|-&lt;br /&gt;
| High boot || 2 || 0.5 || 0.6 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Buckler || 2 || 1 || 0.6 || 60%&lt;br /&gt;
|-&lt;br /&gt;
| Shield || 4 || 1 || 1.2 || '''120%'''&lt;br /&gt;
|-&lt;br /&gt;
| Mail shirt || 6 || 2 || 1.8 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Breastplate || 9 || 3 || 2.7 || 90%&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[tool|Tools]] (Metalcrafter)&lt;br /&gt;
|-&lt;br /&gt;
| Nest box || 1 || 1 || 0.3 || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Jug || 1 || 1 || 0.3 || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Pot || 1 || 1 || 0.3 || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Hive || 1 || 1 || 0.3 || 30%&lt;br /&gt;
|-&lt;br /&gt;
| Minecart || 6 || 2 || 1.8 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| Wheelbarrow || 6 || 2 || 1.8 || 90%&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[Furniture]] (Blacksmith)&lt;br /&gt;
|-&lt;br /&gt;
| Anvil || (9) || 3 || 1 || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Armor stand || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Barrel || (9) || 3 || 1 || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Bin || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Blocks || (4) || 1 || 0.5 || 50%&lt;br /&gt;
|-&lt;br /&gt;
| Bucket || (3) || 1 || 1 || '''100%'''&lt;br /&gt;
|-&lt;br /&gt;
| Cabinet || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Cage || (6) || 3 || 1 || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Chair || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Chest || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Coffin || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Crutch || (3) || 3 || 0.5 || 17%&lt;br /&gt;
|-&lt;br /&gt;
| Door || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Floodgate || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Grate || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Hatch cover || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Pipe section || (9) || 3 || 1 || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Splint || (2) || 3 || 0.5 || 17%&lt;br /&gt;
|-&lt;br /&gt;
| Statue || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Table || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Traction bench || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
| Weapon rack || (9) || 3 || 1{{verify}} || 33%&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[Furniture]] (Metalcrafter)&lt;br /&gt;
|-&lt;br /&gt;
| Chain || (4) || 1 || 1 || '''100%'''&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|[[Furniture]] (Trapper)&lt;br /&gt;
|-&lt;br /&gt;
| Animal trap || (3) || 1 || 1 || '''100%'''&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot;|Other objects (Metalcrafter)&lt;br /&gt;
|-&lt;br /&gt;
| Amulet || (1/3 to 1) || 1/3 to 1 || 0.1{{verify}} || 10% to 30%&lt;br /&gt;
|-&lt;br /&gt;
| Bracelet || (1/3 to 1) || 1/3 to 1 || 0.1{{verify}} || 10% to 30%&lt;br /&gt;
|-&lt;br /&gt;
| Coins (stack of 500) || (1) || 1 || 1.1 || '''''110%'''''&lt;br /&gt;
|-&lt;br /&gt;
| Coins (stack of 1) || (1) || 1/500 || 0.1 || '''''5000%'''''&lt;br /&gt;
|-&lt;br /&gt;
| Crown || (1/3 to 1) || 1/3 to 1 || 0.1{{verify}} || 10% to 30%&lt;br /&gt;
|-&lt;br /&gt;
| Earring || (1/3 to 1) || 1/3 to 1 || 0.1{{verify}} || 10% to 30%&lt;br /&gt;
|-&lt;br /&gt;
| Flask || (1/3) || 1/3 || 0.2 || 60%&lt;br /&gt;
|-&lt;br /&gt;
| Figurine || (1/3 to 1) || 1/3 to 1 || 0.2 || 20% to 60%&lt;br /&gt;
|-&lt;br /&gt;
| Goblet || (1/3) || 1/3 || 0.2 || 60%&lt;br /&gt;
|-&lt;br /&gt;
| Instrument || (1) || 1 || 1 || '''100%'''&lt;br /&gt;
|-&lt;br /&gt;
| Toy || (1) || 1 || 0.2{{verify}} || 20%&lt;br /&gt;
|-&lt;br /&gt;
| Ring || (1/3 to 1) || 1/3 to 1 || 0.1 || 10% to 30%&lt;br /&gt;
|-&lt;br /&gt;
| Scepter || (1/3 to 1) || 1/3 to 1 || 0.2{{verify}} || 20% to 60%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All melting yields for items ''not'' specified in the raws (weapons, armor, tools, etc.) are hardcoded.&lt;br /&gt;
&lt;br /&gt;
Metal bars are able to be melted and remade into half a bar at a smelter. (Melt 1 tin bar, return as 0.5 tin bar + experience.)&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
*A number of items produce more metal when melted than they cost to produce.{{bug|6027}}&lt;br /&gt;
*Designating items to be melted from the [[stocks]] screen can cause a crash.{{bug|6431}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Jobs}}&lt;br /&gt;
{{Category|Items}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212544</id>
		<title>Cross-training</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212544"/>
		<updated>2014-11-28T23:56:14Z</updated>

		<summary type="html">&lt;p&gt;Taptap: put national defense training in its rightful place, melting bars is NOT without losses in my fort.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Migrated_article}}&lt;br /&gt;
{{quality|unrated}}{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Cross-training''' is the process of training your civilian dwarves in military pursuits, or vice versa, and can offer several benefits. First and most importantly, it can be a good way of raising attributes, leading to stronger, tougher, faster dwarves. Secondly, it provides a handy pool of recruits for when your military takes a beating or gives your civilians a halfway decent chance of defending themselves. Thirdly, it can provide useful replacements for when your legendary mason accidentally blunders into a troll and gets all his limbs broken. Finally, it's a more productive use of time than standing around idling.&lt;br /&gt;
&lt;br /&gt;
There is nothing saying you have to use only one of these ideas; they are all various approaches toward addressing these areas.&lt;br /&gt;
&lt;br /&gt;
==Cross-training (starting a reserves program)==&lt;br /&gt;
The biggest thing to remember with a reserves program is that if you're going to go, you go all the way.  Don't institute something &amp;quot;just for a little while&amp;quot; and come up with a handful of novice reservists; they will not get significant stat increases and you'll only waste time.  Time is not something you have a heck of a lot of in a reserves program, typically.  Remember that after you draft them, most dwarves are going to need about a year of sparring or training before they're ready for heavy combat.  You might not have that much time if you are getting sieges regularly.&lt;br /&gt;
&lt;br /&gt;
===Different Programs:===&lt;br /&gt;
&lt;br /&gt;
====National self-defense training====&lt;br /&gt;
''Make sure you're familiar with the [[cv:military interface|military interface]], [[cv:squads|squads]] and [[cv:scheduling|scheduling]] before attempting this.''&lt;br /&gt;
&lt;br /&gt;
This is the process of training all your civilians in military skills - or at least, most of them. Any time a dwarf is activated into the military, and they do not have at least Novice level in some combat skill, they get a bad thought. The easiest way to do this is to assign every new [[migrant]] or recently grown up child to dedicated training [[squad|squads]], and assign that squad a barracks. Then, schedule these squads to train and set the squad to &amp;quot;Active/Training&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
National self-defense training is by far the most efficient way to increase attributes related to military skills. This includes strength, agility, toughness, endurance, focus, intuition, kinesthetic sense, spatial sense and willpower - all of these will see dramatic increases and reach the individual maximum when training lasts long enough. To increase the rate at which dwarves gain skills, place one experienced trainer / soldier in each squad, which will make demonstrations much more valuable. It is worth setting the &amp;quot;Train&amp;quot; order in the schedule to less than 10 minimum; this allows dwarves to take time out to eat, drink, sleep...&lt;br /&gt;
&lt;br /&gt;
Then, if they ever get caught where they don't want to be (maybe they bump into a thief coming around a corner, or a flying critter jumps them, or you need to urgently order them out of the path of a magma flood, or send them to the [[Lever|control room]] - anything), not only can you activate them with no bad thoughts, but every dwarf has a better chance at not-dying - which can only be a good thing. Moreover, idle dwarves will now go to &amp;quot;Individual Combat Drill&amp;quot; rather than standing around timewasting.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy, cheap, and no maintenance once set up&lt;br /&gt;
*No need for other cross-training for any attribute affected by national self-defense training&lt;br /&gt;
*Trainees gain useful military skills&lt;br /&gt;
*Trainees will be faster, stronger and tougher both in daily life and in emergencies&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Legendary fighting skills may make tantrums more fun&lt;br /&gt;
*Trainees don't work during training&lt;br /&gt;
*Trainees don't socialise during training (you may see this as an advantage, though)&lt;br /&gt;
'''Attributes trained:'''&lt;br /&gt;
&lt;br /&gt;
Rapid increases of strength, agility, toughness, endurance, focus, intuition, kinesthetic sense, spatial sense and willpower.&lt;br /&gt;
&lt;br /&gt;
====Gym ([[pump operator]])====&lt;br /&gt;
The Gym is the most basic sort of reserves program; it merely consists of building a bunch of [[screw pump]]s connected to nothing in a room that's close to [[food]], [[bed]]s, and [[drink]].  After the pumps are built, order them to be pumped manually, then turn on [[Pump operator|pump operating]] for your reservists. The fastest raising attribute from pump operating is endurance and you can expect over 300 from training to legendary. Legendary +5 Pump Operators continue to gain attributes. &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy and extremely cheap to set up;&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Beneficial for fps, air-pumpers consume, produce and move nothing.&lt;br /&gt;
*Somewhat fast training; legendary in under a year (if other responsibilities like hauling are minimized).&lt;br /&gt;
*Very convenient; gyms can be placed anywhere in your fortress with no issues.&amp;lt;br&amp;gt;&lt;br /&gt;
*Inactive marksdwarf squads can operate pumps to cross-train and be activated at a moment's notice - boost attributes without using bolts.&lt;br /&gt;
*If desired, you can arrange your pumps so they power one or more indoor [[waterfall]]s or other water-powered devices.&lt;br /&gt;
*Reserve soldiers get a civilian job and no longer gain unhappy thoughts from being relieved from duty. They also become red in the units list (same as mechanics) and so are easier to spot. &lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates nothing useful other than the increased attributes of the trainee.&lt;br /&gt;
*If you have any pumps around that critically NEED to remain in operation it can be a serious pain to keep the critical pumps operating (sadly, pumps cannot be [[Manager#Setting_workshop_profiles|profiled]]).&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Boiler-room ([[furnace operator]])====&lt;br /&gt;
Boiler-room training can be performed by forging and melting items that do not incur a loss of metal in the process. See: [[cv:Melt item|Melt item]]&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to set up.&lt;br /&gt;
*Requires little continuous oversight on your part.&lt;br /&gt;
*Somewhat fast training; dwarves reach legendary in two years.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires access to [[magma]].&lt;br /&gt;
*Generates nothing useful other than the increased skills and attributes of the trainee.&lt;br /&gt;
*May interfere with legitimate melting jobs (use of linked [[stockpile]]s, [[burrow]]s, and [[profile]]s can mitigate this).&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Swimming Pool ====&lt;br /&gt;
Adding a swimming pool allows your dwarves to rapidly boost their swimmer skill; unfortunately they will not do so voluntarily. A simple pit with 4/7 - 6/7 of water and a means of &amp;quot;encouraging&amp;quot; your dwarves to dive in are sufficient. Placing your swimming pool near/under a [[meeting hall]] will automatically train idle (and partying) dwarves. Minecart-aided swim training is a safer method, it is based on the feature, that a dwarf riding a minecart learns swimming while doing so. (See: [[cv:Swimmer#Minecart_training|Swimmer#Minecart_training]])&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Cheap to set up&lt;br /&gt;
*Automates training of idle dwarves without interfering with actual work&lt;br /&gt;
*Provides a good set of physical [[attribute]]s likely to speed up fortress operation &lt;br /&gt;
*Swimming skill can occasionally save a dwarf's life&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates no wealth&lt;br /&gt;
*[[gravity|Falling]] damage can be significant (of course, this trains medical staff too!).&lt;br /&gt;
*[[Flooding]] can be a problem, particular for overseers unfamiliar with Dwarf Fortress fluid mechanics&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Endurance, Strength, Willpower, Kinesthetic Sense, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Artillery proving ground ([[siege operator]])====&lt;br /&gt;
Mass-produce some catapults, line them up near a quarry, and fire away.  Works well to dispose of stone from a gulag (see below).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Trains a skill that's reasonably useful, and provides a place to put all the sub-par siege engine components your [[siege engineer]] will doubtlessly create if you're going for superior-quality engines.&lt;br /&gt;
*Harasses the wildlife, which is always fun and sometimes [[Fun]].&amp;lt;br&amp;gt;&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Very slow to train (2+ years for legendary).&lt;br /&gt;
*Fairly space-consuming to set up a well-designed and usable proving ground.&lt;br /&gt;
*Can be dangerous depending on the biome (especially when [[elephant]]s are present.  If they get winged by a stray boulder, you can bet they're going to be coming straight at you).&lt;br /&gt;
*[[Siege operator]]s are civilians, and will run in fear when an enemy approaches them.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Focus, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Internship MkII ([[manager]])====&lt;br /&gt;
Assign a new dwarf to manager, queue several hundred jobs, and rotate a replacement in as soon as he becomes legendary. For bonus points, queue jobs which need to be repeated anyway, like &amp;quot;Prepare Raw Fish&amp;quot; or &amp;quot;Mill Plants&amp;quot;, or jobs for which there is no workshop, like &amp;quot;Make Wooden Bow&amp;quot; or &amp;quot;Make Soap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Requires no extra infrastructure at all.&lt;br /&gt;
*You need a manager anyway!&lt;br /&gt;
*Mostly safe; a manager spends basically all his discretionary time snug in his office, or doing his other assigned jobs.&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Only employs one dwarf at a time; not useful when you have 15-25 candidates for the reserves. &lt;br /&gt;
*No announcement when the current intern reaches Legendary status means you can lose time on rotation easily.&lt;br /&gt;
*Produces little to no useful attribute gains&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Analytical Ability, Memory, Focus&lt;br /&gt;
&lt;br /&gt;
====Gulag ([[miner]])====&lt;br /&gt;
The gulag is basically a strip mine that is located far away from your main fortress (so you don't have to worry about accidentally screwing up your own building plans; if you are careful in planning, it may be placed closer to your fortress).  Take a big square and start leveling it; it's really no more complicated than that.  Since [[pick|picks]] can actually be used as weapons, it's worthwhile to give the reservists who will be working in the gulag picks made out of [[bronze]], or, if you are really living large, [[iron]] or even [[steel]].  Note that you will have to turn your usual mining corps (the civilian miners who are already experienced with mining) off or designate separate mining [[burrow]]s for this setup to work properly. It might be convenient to use a locked door to isolate the gulag from the main fortress, once a batch of trainees are inside.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Soldiers can be equipped with picks from the military skill, and use the Miner skill in combat - militia squads of highly skilled miners can provide a decent defence from early threats&lt;br /&gt;
*Toting a pick for close-quarters support might make a legendary [[marksdwarf]] more useful, since the pathetic bludgeon damage of his [[wood]] and [[bone]] [[Weapon#Dwarf-manufactured Weapons|crossbows]] are less important.&lt;br /&gt;
*Can be quite useful for producing stones you might not have access to normally, or uncovering veins of precious metals.&lt;br /&gt;
*Levels quite fast in sand.&lt;br /&gt;
*Relatively little oversight from you.&lt;br /&gt;
*An overland hike to the gulag will fight [[cave adaptation]] in your military candidates.&lt;br /&gt;
*Can easily be transformed into a [[Caverns#Vegetation|underground tree farm]] on suitable maps, providing a safe and replenishable wood source.&lt;br /&gt;
*Mining trains all military attributes, so it's perfect for military training too&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Juggling your real miners and your reservists when there's real work to be done on the fort can be a chore.&lt;br /&gt;
*Hard to keep dwarves in the gulag for too long; they'll inevitably get hungry, thirsty, and tired and start hiking back to the fortress proper. Could be solved by (temporary) [[burrow]].&lt;br /&gt;
*Can be dangerous, depending on the biome.&lt;br /&gt;
*Does require some amount of oversight from you, especially when your reservists start getting better at mining and run out of work more quickly.&lt;br /&gt;
*Surplus stone and mining in general are suspected to promote [[Maximizing_framerate|lag]].&lt;br /&gt;
*Can be trained easier and without space consumption as part of national defense training, when assigning picks as weapons.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Renovation ([[stone detailing]])====&lt;br /&gt;
Another convenient way to buff up your dwarves, assigning your reservists to mass [[stone detailing]] duty increases your fortress' architectural wealth and makes the place look nicer. While they may clutter the halls somewhat, it doesn't require any special allocation of  [[food]], [[Bed|beds]] or [[drink]]. Just turn on [[stone detailing]] for your reservists and mark up as much of the fortress as you like for renovation. If you have no particular area you want smoothed, you can alternate designating some open space between carving tracks and then smoothing them out. Be aware that carving tracks automatically sets those squares to be low traffic areas, so you may want to choose an out-of-the-way area that won't disrupt pathing for other activities. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Even easier to set up; just assign your dwarves and an area and you're good to go.&lt;br /&gt;
*Increases your fortress' value and general happiness.&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Very safe, if you only assign areas inside the fortress.&lt;br /&gt;
&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Wealth overflow may bring too many [[immigrant]]s.&lt;br /&gt;
*Serious conflict with [[engraving]] assignments; trying to engrave with poorly trained engravers wastes a lot of wealth that essentially comes from nothing.  To avoid this, have periods when you only designate stone smoothing, followed by periods where you only designate engraving.&lt;br /&gt;
*Careless designation of smoothing areas may have your dwarves trying to smooth walls too close to [[magma]] or a [[river]].&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Sweatshop ([[mason]])====&lt;br /&gt;
Make one or more [[mason's workshop]]s in an area with a bunch of junk stone you don't care about, or that you're actively looking to clear.  Change the workshop settings to allow only your reservists to use it, then tell the workshop to churn out crafts, junk furniture, stone blocks, and trade goods that you can trade en-masse.  Alternatively, forbid your reservists from working in your real mason's workshops, order lots of stone constructions built, and pray that your real masons stay too occupied with the workshops to intrude.  Works well in conjunction with a gulag.  Alternate ideas for sweatshops include a [[mechanic's workshop]], [[craftsdwarf's workshop]], [[Kiln|magma kiln]], or a [[Glass furnace|magma glass furnace]] to train [[mechanic]], [[Stone crafter|stonecrafter]], [[potter]] and [[glassmaker]] respectively.  ''Note:  Do NOT try this with the [[carpenter]] skill unless you have a large supply, or any other resource you don't have in near-limitless abundance.  Sweatshops will consume huge amounts of their associated resources, and if you run out mid-way you have probably wasted your time.  This includes [[coke]] or [[charcoal]] used in the normal (non-magma) [[glass furnace]].''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Quantitatively turns a profit.  The inferior trade goods can be dumped on the next caravan for more useful commodities like bags, seeds, and logs. Logs are especially useful, since you'll inevitably stamp out lots of bins to support the trade good output.&lt;br /&gt;
*Mass-producing blocks makes your constructions higher value.&lt;br /&gt;
*Unlike many other training programs, Sweatshops train a skill that is very useful.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Slow to level.&lt;br /&gt;
*Hard to keep the reservists on task, since they'll need to do plenty of hauling to keep their workshop from becoming chokingly cluttered.&lt;br /&gt;
*Can be a logistical nightmare; making bins and organizing hauling for the finished goods can be insane if you're working from a gulag.&lt;br /&gt;
*Can be dangerous depending on the biome and location of your sweatshops.&lt;br /&gt;
*Note also that stone blocks cannot be made into furniture or stone crafts.  This may or may not be an issue depending on where you're putting your gulag.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Powered Mill ([[grower]], [[cook]], [[miller]])====&lt;br /&gt;
Start off by creating a surplus of [[longland grass]], [[cave wheat]], and/or [[whip vine]] and some bags. Create multiple [[quern]] all close to the food stockpile which contains the millable plants. Next to this area make a [[kitchen]] assigned to an experienced cook. Enable milling for the dwarves you wish to cross-train and order the cook to make lavish meals. As long as your growers provide a steady supply of millable plants and your cook can empty out bags quick enough, the milling jobs will continue.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Produces a lot of wealth as flour is a high value ingredient&lt;br /&gt;
*Produces high amounts of food&lt;br /&gt;
*Sustains the training of non cross-training dwarves such as the cook and growers&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires a surplus of millable plants to ensure continuous milling, thus you may need to increase the number of plots/growers&lt;br /&gt;
*If you don't have enough bags and your cook decides to go on break you may end up having job cancellations for the millers&lt;br /&gt;
*Dedicated haulers will be required to keep all workshops clutter free&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Kinesthetic Sense (grower and  miller)&lt;br /&gt;
&lt;br /&gt;
Agility, Analytical Ability, Creativity, Kinesthetic Sense (cook)&lt;br /&gt;
&lt;br /&gt;
====Clear Cutting====&lt;br /&gt;
As long as wood hauling is turned off, dwarves will move from one tree to the next without stopping to bring the wood back.  On a heavily forested map, this means that dedicated wood cutters can skill up quickly, though the total number of trees to chop has been drastically reduced from previous versions.&lt;br /&gt;
&lt;br /&gt;
Of course, this training strategy isn't going to endear you with the [[elves]].&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Works quickly&lt;br /&gt;
*Provides useful lumber to carpenters, charcoal makers, etc. &lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
*Map dependent&lt;br /&gt;
*Trees are limited, and regrow slowly&lt;br /&gt;
*Unless care is taken to only designate a small area for cutting, trainees and haulers can be spread out across the map while, making them vulnerable to creatures and ambushes.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Scouts ([[ambusher]], [[hunter]], [[marksdwarf]])====&lt;br /&gt;
Marksdwarves are an important part of any military. A bum rush of low level marksdwarves is good, but not as effective as an elite backup squad! Here is what you can do:&lt;br /&gt;
Draft a comfortable amount of dwarves to hunting, give them all cheap crossbows. Your dwarves should hunt as usual. But you are really training an elite squad of assassins, that will one day hunt goblins instead of groundhogs.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to start.&lt;br /&gt;
*Lots of meat, bones and leather around.&lt;br /&gt;
*Aforementioned bones can be recycled to make new bolts.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Doesn't work on some maps.&lt;br /&gt;
*Hunting is dangerous!&lt;br /&gt;
*Evil areas may result in the deer your dwarves bagged, waking up and ripping your hunter's face off!&lt;br /&gt;
*Not as economically productive as some other methods.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Focus, Spatial Sense, Kinesthetic Sense (ambusher)&lt;br /&gt;
&lt;br /&gt;
====Art School ([[weaver]])====&lt;br /&gt;
Collecting spider [[web]]s is normally a slow way to train weaving, but that's because the aspiring weaver spends most of his time hiking out to the spiderweb and then back to the loom. If you manage to create a [[silk farming|convenient local source of webs]] near a loom, your weavers-in-training will rapidly gain experience. The abundant silk thread can then be woven by your more experienced weavers for clothing and trade.  &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Safe and easy to run&lt;br /&gt;
*Virtually inexhaustible&lt;br /&gt;
*Produces valuable resources (silk cloth)&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires somewhat complex setup&lt;br /&gt;
*Weaving is a [[moodable]] skill--and not a particularly desirable one&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Charm School ([[Social skill|Social skills]])====&lt;br /&gt;
&amp;lt;i&amp;gt;(Note: Inspired by [http://www.bay12games.com/forum/index.php?topic=47533.0 milaga's Real Wagon experiment], details of this technique are still being investigated.)&amp;lt;/i&amp;gt;&lt;br /&gt;
This approach is less useful in the new version, as social skills will only produce &amp;quot;Soul&amp;quot; attribute gains. However, teaching your dwarves social skills is useful for training replacement Brokers, and can possibly reduce the chances of tantrums in the fort (more dwarves with high Consoler and Pacifier skill).&lt;br /&gt;
&lt;br /&gt;
Set up a small space with food, booze, and a few beds/chairs/tables. Next define a burrow encompassing said chairs tables etc. and assign only your intended trainees to the burrow. (Be sure to turn off all of their labors and use the building options menu of a table to designate it as a meeting place.) With no labors enabled and nothing to do, they'll chat and party and quickly buff up their comedian, flatterer, conversationalist, &amp;amp;c. skills.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*works on any map&lt;br /&gt;
*easy to set up&lt;br /&gt;
*trains many dwarves at once&lt;br /&gt;
*requires almost zero player oversight &lt;br /&gt;
*easily scales to any size of immigrant wave &lt;br /&gt;
*requires no resources the dwarves would not already be consuming (food, beds, &amp;amp;c) &lt;br /&gt;
*very safe&lt;br /&gt;
*no conflict with existing workshops or skills, unlike gulag or sweatshop&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*dwarves gain no professional skills during this time, and their existing ones may rust&lt;br /&gt;
*lowers physical attributes due to rust&lt;br /&gt;
*produces no trade goods or useful items for the fortress&lt;br /&gt;
*produces many romances and tight-knit friendships, which [[Tantrum#Tantrum Spiral|put you at risk]] of suddenly having lots of [[losing#General Unhappiness|Fun]]&lt;br /&gt;
*inter-dwarf personality conflicts can produce early misery and tantrums. This can be prevented with quality furniture and food, and the risk is eliminated once friendships and relationships are formed and producing happy thoughts.&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
*The charm school can cross-train many dwarves in the many mental attributes, but produces no useful items, trade wealth, or professional skills. The method is also still being refined and potential pitfalls may still be uncovered.&lt;br /&gt;
*Artillery training can give you some siege operators, which will be useful if you have ballistae.&lt;br /&gt;
*The internship only trains up one dwarf at a time. Your stocks could also lag behind if you are unlucky.&lt;br /&gt;
*The gulag requires planning, and your dwarves in the fortress proper may run all the way to the gulag to grab a stone for some crafts, a chair, etc. It does, however, train your dwarves in mining quickly, which is always a useful skill.&lt;br /&gt;
*Renovation is hands-free, but may bloat your fortress wealth too quickly.&lt;br /&gt;
*The sweatshop creates a large amount of goods, which can be traded away to keep traders happy. It also increases your wealth by quite a lot, which can be good or bad depending upon your situation. The goods are also difficult to manage.&lt;br /&gt;
*National self-defence training is easy to manage when set up and lets you give your civilians clothes and light armour to keep them safe. However, it can take valuable workers away from their job if the training is too frequent.&lt;br /&gt;
&lt;br /&gt;
Note that the artillery training and internship don't take away [[strange mood]] potential (you can give those dwarves dabbling in anything you want and that's how they'll get theirs), while the gulag, renovation, and sweatshop do.&lt;br /&gt;
&lt;br /&gt;
{{Military FAQ}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Military}}&lt;br /&gt;
{{Category|Fortress defense}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212425</id>
		<title>Cross-training</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212425"/>
		<updated>2014-11-23T09:40:18Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Swimming Pool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Migrated_article}}&lt;br /&gt;
{{quality|unrated}}{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Cross-training''' is the process of training your civilian dwarves in military pursuits, or vice versa, and can offer several benefits. First and most importantly, it can be a good way of raising attributes, leading to stronger, tougher, faster dwarves. Secondly, it provides a handy pool of recruits for when your military takes a beating or gives your civilians a halfway decent chance of defending themselves. Thirdly, it can provide useful replacements for when your legendary mason accidentally blunders into a troll and gets all his limbs broken. Finally, it's a more productive use of time than standing around idling.&lt;br /&gt;
&lt;br /&gt;
There is nothing saying you have to use only one of these ideas; they are all various approaches toward addressing these areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cross-training (starting a reserves program)==&lt;br /&gt;
The biggest thing to remember with a reserves program is that if you're going to go, you go all the way.  Don't institute something &amp;quot;just for a little while&amp;quot; and come up with a handful of novice reservists; they will not get significant stat increases and you'll only waste time.  Time is not something you have a heck of a lot of in a reserves program, typically.  Remember that after you draft them, most dwarves are going to need about a year of sparring or training before they're ready for heavy combat.  You might not have that much time if you are getting sieges regularly.&lt;br /&gt;
&lt;br /&gt;
===Different Programs:===&lt;br /&gt;
&lt;br /&gt;
====Gym ([[pump operator]])====&lt;br /&gt;
The Gym is the most basic sort of reserves program; it merely consists of building a bunch of [[screw pump]]s connected to nothing in a room that's close to [[food]], [[bed]]s, and [[drink]].  After the pumps are built, order them to be pumped manually, then turn on [[Pump operator|pump operating]] for your reservists. The fastest raising attribute from pump operating is endurance and you can expect over 300 from training to legendary. Legendary +5 Pump Operators continue to gain attributes. &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy and extremely cheap to set up;&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Beneficial for fps, air-pumpers consume, produce and move nothing.&lt;br /&gt;
*Somewhat fast training; legendary in under a year (if other responsibilities like hauling are minimized).&lt;br /&gt;
*Very convenient; gyms can be placed anywhere in your fortress with no issues.&amp;lt;br&amp;gt;&lt;br /&gt;
*Inactive marksdwarf squads can operate pumps to cross-train and be activated at a moment's notice - boost attributes without using bolts.&lt;br /&gt;
*If desired, you can arrange your pumps so they power one or more indoor [[waterfall]]s or other water-powered devices.&lt;br /&gt;
*Reserve soldiers get a civilian job and no longer gain unhappy thoughts from being relieved from duty. They also become red in the units list (same as mechanics) and so are easier to spot. &lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates nothing useful other than the increased attributes of the trainee.&lt;br /&gt;
*If you have any pumps around that critically NEED to remain in operation it can be a serious pain to keep the critical pumps operating (sadly, pumps cannot be [[Manager#Setting_workshop_profiles|profiled]]).&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Boiler-room ([[furnace operator]])====&lt;br /&gt;
Boiler-room training can be performed by melting metal bars, which produces an equivalent number of bars{{verify}} and provides furnace operating experience. The bars will need to be re-designated for melting each time (an auto-melt stockpile can make this much less tedious).&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to set up.&lt;br /&gt;
*Requires little continuous oversight on your part.&lt;br /&gt;
*Somewhat fast training; dwarves reach legendary in two years.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires access to [[magma]].&lt;br /&gt;
*Generates nothing useful other than the increased attributes of the trainee.&lt;br /&gt;
*May interfere with legitimate melting jobs (use of linked [[stockpile]]s, [[burrow]]s, and [[profile]]s can mitigate this).&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Swimming Pool ====&lt;br /&gt;
Adding a swimming pool allows your dwarves to rapidly boost their swimmer skill; unfortunately they will not do so voluntarily. A simple pit with 4/7 - 6/7 of water and a means of &amp;quot;encouraging&amp;quot; your dwarves to dive in are sufficient. Placing your swimming pool near/under a [[meeting hall]] will automatically train idle (and partying) dwarves. Minecart-aided swim training is a safer method, it is based on the feature, that a dwarf riding a minecart learns swimming while doing so. (See: [[cv:Swimmer#Minecart_training|Swimmer#Minecart_training]])&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Cheap to set up&lt;br /&gt;
*Automates training of idle dwarves without interfering with actual work&lt;br /&gt;
*Provides a good set of physical [[attribute]]s likely to speed up fortress operation &lt;br /&gt;
*Swimming skill can occasionally save a dwarf's life&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates no wealth&lt;br /&gt;
*[[gravity|Falling]] damage can be significant (of course, this trains medical staff too!).&lt;br /&gt;
*[[Flooding]] can be a problem, particular for overseers unfamiliar with Dwarf Fortress fluid mechanics&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Endurance, Strength, Willpower, Kinesthetic Sense, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Artillery proving ground ([[siege operator]])====&lt;br /&gt;
Mass-produce some catapults, line them up near a quarry, and fire away.  Works well to dispose of stone from a gulag (see below).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Trains a skill that's reasonably useful, and provides a place to put all the sub-par siege engine components your [[siege engineer]] will doubtlessly create if you're going for superior-quality engines.&lt;br /&gt;
*Harasses the wildlife, which is always fun and sometimes [[Fun]].&amp;lt;br&amp;gt;&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Very slow to train (2+ years for legendary).&lt;br /&gt;
*Fairly space-consuming to set up a well-designed and usable proving ground.&lt;br /&gt;
*Can be dangerous depending on the biome (especially when [[elephant]]s are present.  If they get winged by a stray boulder, you can bet they're going to be coming straight at you).&lt;br /&gt;
*[[Siege operator]]s are civilians, and will run in fear when an enemy approaches them.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Focus, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Internship MkII ([[manager]])====&lt;br /&gt;
Much like bookkeeping, assign a new dwarf to manager, queue several hundred jobs, and rotate a replacement in as soon as he becomes legendary. For bonus points, queue jobs which need to be repeated anyway, like &amp;quot;Prepare Raw Fish&amp;quot; or &amp;quot;Mill Plants&amp;quot;, or jobs for which there is no workshop, like &amp;quot;Make Wooden Bow&amp;quot; or &amp;quot;Make Soap&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Requires no extra infrastructure at all.&lt;br /&gt;
*You need a manager anyway!&lt;br /&gt;
*Mostly safe; a manager spends basically all his discretionary time snug in his office, or doing his other assigned jobs.&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Only employs one dwarf at a time; not useful when you have 15-25 candidates for the reserves. &lt;br /&gt;
*No announcement when the current intern reaches Legendary status means you can lose time on rotation easily.&lt;br /&gt;
*Produces little to no useful attribute gains&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Analytical Ability, Memory, Focus&lt;br /&gt;
&lt;br /&gt;
====Gulag ([[miner]])====&lt;br /&gt;
The gulag is basically a strip mine that is located far away from your main fortress (so you don't have to worry about accidentally screwing up your own building plans; if you are careful in planning, it may be placed closer to your fortress).  Take a big square and start leveling it; it's really no more complicated than that.  Since [[pick|picks]] can actually be used as weapons, it's worthwhile to give the reservists who will be working in the gulag picks made out of [[bronze]], or, if you are really living large, [[iron]] or even [[steel]].  Note that you will have to turn your usual mining corps (the civilian miners who are already experienced with mining) off or designate separate mining [[burrow]]s for this setup to work properly. It might be convenient to use a locked door to isolate the gulag from the main fortress, once a batch of trainees are inside.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Soldiers can be equipped with picks from the military skill, and use the Miner skill in combat - militia squads of highly skilled miners can provide a decent defence from early threats&lt;br /&gt;
*Toting a pick for close-quarters support might make a legendary [[marksdwarf]] more useful, since the pathetic bludgeon damage of his [[wood]] and [[bone]] [[Weapon#Dwarf-manufactured Weapons|crossbows]] are less important.&lt;br /&gt;
*Can be quite useful for producing stones you might not have access to normally, or uncovering veins of precious metals.&lt;br /&gt;
*Levels quite fast in sand.&lt;br /&gt;
*Relatively little oversight from you.&lt;br /&gt;
*An overland hike to the gulag will fight [[cave adaptation]] in your military candidates.&lt;br /&gt;
*Can easily be transformed into a [[Caverns#Vegetation|underground tree farm]] on suitable maps, providing a safe and replenishable wood source.&lt;br /&gt;
&lt;br /&gt;
*Mining trains all military attributes, so it's perfect for military training too&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Juggling your real miners and your reservists when there's real work to be done on the fort can be a chore.&lt;br /&gt;
*Hard to keep dwarves in the gulag for too long; they'll inevitably get hungry, thirsty, and tired and start hiking back to the fortress proper. Could be solved by (temporary) [[burrow]].&lt;br /&gt;
*Can be dangerous, depending on the biome.&lt;br /&gt;
*Does require some amount of oversight from you, especially when your reservists start getting better at mining and run out of work more quickly.&lt;br /&gt;
*Surplus stone and mining in general are suspected to promote [[Maximizing_framerate|lag]].&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Renovation ([[stone detailing]])====&lt;br /&gt;
Another convenient way to buff up your dwarves, assigning your reservists to mass [[stone detailing]] duty increases your fortress' architectural wealth and makes the place look nicer. While they may clutter the halls somewhat, it doesn't require any special allocation of  [[food]], [[Bed|beds]] or [[drink]]. Just turn on [[stone detailing]] for your reservists and mark up as much of the fortress as you like for renovation. If you have no particular area you want smoothed, you can alternate designating some open space between carving tracks and then smoothing them out. Be aware that carving tracks automatically sets those squares to be low traffic areas, so you may want to choose an out-of-the-way area that won't disrupt pathing for other activities. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Even easier to set up; just assign your dwarves and an area and you're good to go.&lt;br /&gt;
*Increases your fortress' value and general happiness.&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Very safe, if you only assign areas inside the fortress.&lt;br /&gt;
&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Wealth overflow may bring too many [[immigrant]]s.&lt;br /&gt;
*Serious conflict with [[engraving]] assignments; trying to engrave with poorly trained engravers wastes a lot of wealth that essentially comes from nothing.  To avoid this, have periods when you only designate stone smoothing, followed by periods where you only designate engraving.&lt;br /&gt;
*Careless designation of smoothing areas may have your dwarves trying to smooth walls too close to [[magma]] or a [[river]].&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*If you smooth and engrave all your bedrooms, many dwarves will not be able to afford them once the [[Dwarven economy]] kicks in. This is unlikely to be relevant until the economy starts working again (not working as of v0.31.12)&lt;br /&gt;
See economy article, it won't turn on yet&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Sweatshop ([[mason]])====&lt;br /&gt;
Make one or more [[mason's workshop]]s in an area with a bunch of junk stone you don't care about, or that you're actively looking to clear.  Change the workshop settings to allow only your reservists to use it, then tell the workshop to churn out crafts, junk furniture, stone blocks, and trade goods that you can trade en-masse.  Alternatively, forbid your reservists from working in your real mason's workshops, order lots of stone constructions built, and pray that your real masons stay too occupied with the workshops to intrude.  Works well in conjunction with a gulag.  Alternate ideas for sweatshops include a [[mechanic's workshop]], [[craftsdwarf's workshop]], [[Kiln|magma kiln]], or a [[Glass furnace|magma glass furnace]] to train [[mechanic]], [[Stone crafter|stonecrafter]], [[potter]] and [[glassmaker]] respectively.  ''Note:  Do NOT try this with the [[carpenter]] skill unless you have a large supply, or any other resource you don't have in near-limitless abundance.  Sweatshops will consume huge amounts of their associated resources, and if you run out mid-way you have probably wasted your time.  This includes [[coke]] or [[charcoal]] used in the normal (non-magma) [[glass furnace]].''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Quantitatively turns a profit.  The inferior trade goods can be dumped on the next caravan for more useful commodities like bags, seeds, and logs. Logs are especially useful, since you'll inevitably stamp out lots of bins to support the trade good output.&lt;br /&gt;
*Mass-producing blocks makes your constructions higher value.&lt;br /&gt;
*Unlike many other training programs, Sweatshops train a skill that is very useful.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Slow to level.&lt;br /&gt;
*Hard to keep the reservists on task, since they'll need to do plenty of hauling to keep their workshop from becoming chokingly cluttered.&lt;br /&gt;
*Can be a logistical nightmare; making bins and organizing hauling for the finished goods can be insane if you're working from a gulag.&lt;br /&gt;
*Can be dangerous depending on the biome and location of your sweatshops.&lt;br /&gt;
*Note also that stone blocks cannot be made into furniture or stone crafts.  This may or may not be an issue depending on where you're putting your gulag.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Powered Mill ([[grower]], [[cook]], [[miller]])====&lt;br /&gt;
Start off by creating a surplus of [[longland grass]], [[cave wheat]], and/or [[whip vine]] and some bags. Create multiple [[quern]] all close to the food stockpile which contains the millable plants. Next to this area make a [[kitchen]] assigned to an experienced cook. Enable milling for the dwarves you wish to cross-train and order the cook to make lavish meals. As long as your growers provide a steady supply of millable plants and your cook can empty out bags quick enough, the milling jobs will continue.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Produces a lot of wealth as flour is a high value ingredient&lt;br /&gt;
*Produces high amounts of food&lt;br /&gt;
*Sustains the training of non cross-training dwarves such as the cook and growers&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires a surplus of millable plants to ensure continuous milling, thus you may need to increase the number of plots/growers&lt;br /&gt;
*If you don't have enough bags and your cook decides to go on break you may end up having job cancellations for the millers&lt;br /&gt;
*Dedicated haulers will be required to keep all workshops clutter free&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Kinesthetic Sense (grower and  miller)&lt;br /&gt;
&lt;br /&gt;
Agility, Analytical Ability, Creativity, Kinesthetic Sense (cook)&lt;br /&gt;
&lt;br /&gt;
====Clear Cutting====&lt;br /&gt;
As long as wood hauling is turned off, dwarves will move from one tree to the next without stopping to bring the wood back.  On a heavily forested map, this means that dedicated wood cutters can skill up quickly, though the total number of trees to chop has been drastically reduced from previous versions.&lt;br /&gt;
&lt;br /&gt;
Of course, this training strategy isn't going to endear you with the [[elves]].&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Works quickly&lt;br /&gt;
*Provides useful lumber to carpenters, charcoal makers, etc. &lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
*Map dependent&lt;br /&gt;
*Trees are limited, and regrow slowly&lt;br /&gt;
*Unless care is taken to only designate a small area for cutting, trainees and haulers can be spread out across the map while, making them vulnerable to creatures and ambushes.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Scouts ([[ambusher]], [[hunter]], [[marksdwarf]])====&lt;br /&gt;
Marksdwarves are an important part of any military. A bum rush of low level marksdwarves is good, but not as effective as an elite backup squad! Here is what you can do:&lt;br /&gt;
Draft a comfortable amount of dwarves to hunting, give them all cheap crossbows. Your dwarves should hunt as usual. But you are really training an elite squad of assassins, that will one day hunt goblins instead of groundhogs.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to start.&lt;br /&gt;
*Lots of meat, bones and leather around.&lt;br /&gt;
*Aforementioned bones can be recycled to make new bolts.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Doesn't work on some maps.&lt;br /&gt;
*Hunting is dangerous!&lt;br /&gt;
*Evil areas may result in the deer your dwarves bagged, waking up and ripping your hunter's face off!&lt;br /&gt;
*Not as economically productive as some other methods.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Focus, Spatial Sense, Kinesthetic Sense (ambusher)&lt;br /&gt;
&lt;br /&gt;
====Art School ([[weaver]])====&lt;br /&gt;
Collecting spider [[web]]s is normally a slow way to train weaving, but that's because the aspiring weaver spends most of his time hiking out to the spiderweb and then back to the loom. If you manage to create a [[silk farming|convenient local source of webs]] near a loom, your weavers-in-training will rapidly gain experience. The abundant silk thread can then be woven by your more experienced weavers for clothing and trade.  &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Safe and easy to run&lt;br /&gt;
*Virtually inexhaustible&lt;br /&gt;
*Produces valuable resources (silk cloth)&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires somewhat complex setup&lt;br /&gt;
*Weaving is a [[moodable]] skill--and not a particularly desirable one&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Charm School ([[Social skill|Social skills]])====&lt;br /&gt;
&amp;lt;i&amp;gt;(Note: Inspired by [http://www.bay12games.com/forum/index.php?topic=47533.0 milaga's Real Wagon experiment], details of this technique are still being investigated.)&amp;lt;/i&amp;gt;&lt;br /&gt;
This approach is less useful in the new version, as social skills will only produce &amp;quot;Soul&amp;quot; attribute gains. However, teaching your dwarves social skills is useful for training replacement Brokers, and can possibly reduce the chances of tantrums in the fort (more dwarves with high Consoler and Pacifier skill).&lt;br /&gt;
&lt;br /&gt;
Set up a small space with food, booze, and a few beds/chairs/tables. Next define a burrow encompassing said chairs tables etc. and assign only your intended trainees to the burrow. (Be sure to turn off all of their labors and use the building options menu of a table to designate it as a meeting place.) With no labors enabled and nothing to do, they'll chat and party and quickly buff up their comedian, flatterer, conversationalist, &amp;amp;c. skills.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*works on any map&lt;br /&gt;
*easy to set up&lt;br /&gt;
*trains many dwarves at once&lt;br /&gt;
*requires almost zero player oversight &lt;br /&gt;
*easily scales to any size of immigrant wave &lt;br /&gt;
*requires no resources the dwarves would not already be consuming (food, beds, &amp;amp;c) &lt;br /&gt;
*very safe&lt;br /&gt;
*no conflict with existing workshops or skills, unlike gulag or sweatshop&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*dwarves gain no professional skills during this time, and their existing ones may rust&lt;br /&gt;
*lowers physical attributes due to rust&lt;br /&gt;
*produces no trade goods or useful items for the fortress&lt;br /&gt;
*produces many romances and tight-knit friendships, which [[Tantrum#Tantrum Spiral|put you at risk]] of suddenly having lots of [[losing#General Unhappiness|Fun]]&lt;br /&gt;
*inter-dwarf personality conflicts can produce early misery and tantrums. This can be prevented with quality furniture and food, and the risk is eliminated once friendships and relationships are formed and producing happy thoughts.&lt;br /&gt;
&lt;br /&gt;
====National self-defense training====&lt;br /&gt;
''Note: with the new military system, proper self-defense training is somewhat more complicated to set up, but allows much more effective reservist training once it's running. Make sure you're familiar with the [[Scheduling]] system before attempting this.''&lt;br /&gt;
&lt;br /&gt;
This is the process of training all your civilians in a basic military skill - or at least, most of them. Any time a dwarf is activated into the military, and they do not have at least Novice level in some combat skill, they get a bad thought. The easiest way to do this is to assign every new [[migrant]] to dedicated training [[squad|squads]], and assign that squad a barracks. Then, schedule these squads to Train one or more months in the year, and set all other months to &amp;quot;No Scheduled Order&amp;quot;. Then go to the Squads menu and set the squad to &amp;quot;Active/Training&amp;quot;. One month in six or one month in 12 will ensure skills don't get too rusty, as well as ensuring all dwarves reach a basic level in soldiering. To increase the rate at which dwarves gain skills, you can place one experienced soldier in each squad, which will make demonstrations much more valuable. It is worth setting the &amp;quot;Train&amp;quot; order in the schedule to less than 10 minimum; this allows dwarves to take time out to eat, drink, sleep...&lt;br /&gt;
&lt;br /&gt;
Then, if they ever get caught where they don't want to be (maybe they bump into a thief coming around a corner, or a flying critter jumps them, or you need to urgently order them out of the path of a magma flood, or send them to the [[Lever|control room]] - anything), not only can you activate them with no bad thoughts, but every dwarf has a better chance at not-dying - which can only be a good thing. Moreover, idle dwarves will now go to &amp;quot;Individual Combat Drill&amp;quot; rather than standing around timewasting.&lt;br /&gt;
&lt;br /&gt;
Note: if you're feeling cheap, training squads can be set to &amp;quot;No Uniform&amp;quot;. This will teach wrestling. However, it's probably a better idea to churn out some training weapons, wooden shields and leather armor, as this will allow dwarves to gain the shield user and armor user skills.&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
*The charm school can cross-train many dwarves in the many mental attributes, but produces no useful items, trade wealth, or professional skills. The method is also still being refined and potential pitfalls may still be uncovered.&lt;br /&gt;
*Artillery training can give you some siege operators, which will be useful if you have ballistae.&lt;br /&gt;
*The internship only trains up one dwarf at a time. Your stocks could also lag behind if you are unlucky.&lt;br /&gt;
*The gulag requires planning, and your dwarves in the fortress proper may run all the way to the gulag to grab a stone for some crafts, a chair, etc. It does, however, train your dwarves in mining quickly, which is always a useful skill.&lt;br /&gt;
*Renovation is hands-free, but may bloat your fortress wealth too quickly.&lt;br /&gt;
*The sweatshop creates a large amount of goods, which can be traded away to keep traders happy. It also increases your wealth by quite a lot, which can be good or bad depending upon your situation. The goods are also difficult to manage.&lt;br /&gt;
*National self-defence training is easy to manage when set up and lets you give your civilians clothes and light armour to keep them safe. However, it can take valuable workers away from their job if the training is too frequent.&lt;br /&gt;
&lt;br /&gt;
Note that the artillery training and internship don't take away [[strange mood]] potential (you can give those dwarves dabbling in anything you want and that's how they'll get theirs), while the gulag, renovation, and sweatshop do.&lt;br /&gt;
&lt;br /&gt;
{{Military FAQ}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Military}}&lt;br /&gt;
{{Category|Fortress defense}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Duke&amp;diff=212403</id>
		<title>Duke</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Duke&amp;diff=212403"/>
		<updated>2014-11-22T11:22:20Z</updated>

		<summary type="html">&lt;p&gt;Taptap: direct baron to duke promotion is possible (witnessed in 40.14)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Migrated_article}}&lt;br /&gt;
{{Noble&lt;br /&gt;
| noble=Duke&lt;br /&gt;
| quarters=Grand Bedroom&lt;br /&gt;
| dining=Grand Dining Room&lt;br /&gt;
| office=Opulent Throne Room&lt;br /&gt;
| tomb=Grand Mausoleum&lt;br /&gt;
| chests=5&lt;br /&gt;
| cabinets=3&lt;br /&gt;
| racks=3&lt;br /&gt;
| stands=3&lt;br /&gt;
| mandates=3&lt;br /&gt;
| demands=5&lt;br /&gt;
| arrival=&lt;br /&gt;
* 20 population&lt;br /&gt;
* 300k created wealth&lt;br /&gt;
* 30k exported wealth&lt;br /&gt;
| function=&lt;br /&gt;
* Promote [[fortress]] to Duchy capital&lt;br /&gt;
* Appoints a [[Champion]]&lt;br /&gt;
}}{{av}}&lt;br /&gt;
&lt;br /&gt;
The '''Duke''' (or Duchess) is the next step up from a [[Count]].  Your county becomes a duchy after reaching certain criteria and meeting with the [[liaison]]; once the liaison leaves the map, your [[Count]] will be promoted. As with the upgrade to a County, this is automatic and cannot be rejected.&lt;br /&gt;
&lt;br /&gt;
{{gamedata|	[POSITION:DUKE]&lt;br /&gt;
		[NAME_MALE:duke:dukes]&lt;br /&gt;
		[NAME_FEMALE:duchess:duchesses]&lt;br /&gt;
		[SPOUSE_MALE:duke consort:dukes consort]&lt;br /&gt;
		[SPOUSE_FEMALE:duchess consort:duchesses consort]&lt;br /&gt;
		[NUMBER:AS_NEEDED]&lt;br /&gt;
		[LAND_HOLDER:3]&lt;br /&gt;
		[LAND_NAME:a duchy]&lt;br /&gt;
		[RESPONSIBILITY:LAW_MAKING]&lt;br /&gt;
		[RESPONSIBILITY:RECEIVE_DIPLOMATS]&lt;br /&gt;
		[SUCCESSION:BY_HEIR]&lt;br /&gt;
		[APPOINTED_BY:MONARCH]&lt;br /&gt;
		[PRECEDENCE:20]&lt;br /&gt;
		[SPECIAL_BURIAL]&lt;br /&gt;
		[MENIAL_WORK_EXEMPTION]&lt;br /&gt;
		[MENIAL_WORK_EXEMPTION_SPOUSE]&lt;br /&gt;
		[SLEEP_PRETENSION]&lt;br /&gt;
		[PUNISHMENT_EXEMPTION]&lt;br /&gt;
		[FLASHES]&lt;br /&gt;
		[BRAG_ON_KILL]&lt;br /&gt;
		[CHAT_WORTHY]&lt;br /&gt;
		[DO_NOT_CULL]&lt;br /&gt;
		[KILL_QUEST]&lt;br /&gt;
		[COLOR:5:0:0]&lt;br /&gt;
		[ACCOUNT_EXEMPT]&lt;br /&gt;
		[DUTY_BOUND]&lt;br /&gt;
		[DEMAND_MAX:5]&lt;br /&gt;
		[MANDATE_MAX:3]&lt;br /&gt;
		[REQUIRED_BOXES:5]&lt;br /&gt;
		[REQUIRED_CABINETS:3]&lt;br /&gt;
		[REQUIRED_RACKS:3]&lt;br /&gt;
		[REQUIRED_STANDS:3]&lt;br /&gt;
		[REQUIRED_OFFICE:2500]&lt;br /&gt;
		[REQUIRED_BEDROOM:2500]&lt;br /&gt;
		[REQUIRED_DINING:2500]&lt;br /&gt;
		[REQUIRED_TOMB:2500]}}&lt;br /&gt;
{{nobles}}&lt;br /&gt;
{{Category|Aristocrats}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212402</id>
		<title>Cross-training</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Cross-training&amp;diff=212402"/>
		<updated>2014-11-22T11:15:23Z</updated>

		<summary type="html">&lt;p&gt;Taptap: /* Boiler-room (furnace operator) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Migrated_article}}&lt;br /&gt;
{{quality|unrated}}{{av}}&lt;br /&gt;
&lt;br /&gt;
'''Cross-training''' is the process of training your civilian dwarves in military pursuits, or vice versa, and can offer several benefits. First and most importantly, it can be a good way of raising attributes, leading to stronger, tougher, faster dwarves. Secondly, it provides a handy pool of recruits for when your military takes a beating or gives your civilians a halfway decent chance of defending themselves. Thirdly, it can provide useful replacements for when your legendary mason accidentally blunders into a troll and gets all his limbs broken. Finally, it's a more productive use of time than standing around idling.&lt;br /&gt;
&lt;br /&gt;
There is nothing saying you have to use only one of these ideas; they are all various approaches toward addressing these areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cross-training (starting a reserves program)==&lt;br /&gt;
The biggest thing to remember with a reserves program is that if you're going to go, you go all the way.  Don't institute something &amp;quot;just for a little while&amp;quot; and come up with a handful of novice reservists; they will not get significant stat increases and you'll only waste time.  Time is not something you have a heck of a lot of in a reserves program, typically.  Remember that after you draft them, most dwarves are going to need about a year of sparring or training before they're ready for heavy combat.  You might not have that much time if you are getting sieges regularly.&lt;br /&gt;
&lt;br /&gt;
===Different Programs:===&lt;br /&gt;
&lt;br /&gt;
====Gym ([[pump operator]])====&lt;br /&gt;
The Gym is the most basic sort of reserves program; it merely consists of building a bunch of [[screw pump]]s connected to nothing in a room that's close to [[food]], [[bed]]s, and [[drink]].  After the pumps are built, order them to be pumped manually, then turn on [[Pump operator|pump operating]] for your reservists. The fastest raising attribute from pump operating is endurance and you can expect over 300 from training to legendary. Legendary +5 Pump Operators continue to gain attributes. &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy and extremely cheap to set up;&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Beneficial for fps, air-pumpers consume, produce and move nothing.&lt;br /&gt;
*Somewhat fast training; legendary in under a year (if other responsibilities like hauling are minimized).&lt;br /&gt;
*Very convenient; gyms can be placed anywhere in your fortress with no issues.&amp;lt;br&amp;gt;&lt;br /&gt;
*Inactive marksdwarf squads can operate pumps to cross-train and be activated at a moment's notice - boost attributes without using bolts.&lt;br /&gt;
*If desired, you can arrange your pumps so they power one or more indoor [[waterfall]]s or other water-powered devices.&lt;br /&gt;
*Reserve soldiers get a civilian job and no longer gain unhappy thoughts from being relieved from duty. They also become red in the units list (same as mechanics) and so are easier to spot. &lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates nothing useful other than the increased attributes of the trainee.&lt;br /&gt;
*If you have any pumps around that critically NEED to remain in operation it can be a serious pain to keep the critical pumps operating (sadly, pumps cannot be [[Manager#Setting_workshop_profiles|profiled]]).&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Boiler-room ([[furnace operator]])====&lt;br /&gt;
Boiler-room training can be performed by melting metal bars, which produces an equivalent number of bars{{verify}} and provides furnace operating experience. The bars will need to be re-designated for melting each time (an auto-melt stockpile can make this much less tedious).&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to set up.&lt;br /&gt;
*Requires little continuous oversight on your part.&lt;br /&gt;
*Somewhat fast training; dwarves reach legendary in two years.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires access to [[magma]].&lt;br /&gt;
*Generates nothing useful other than the increased attributes of the trainee.&lt;br /&gt;
*May interfere with legitimate melting jobs (use of linked [[stockpile]]s, [[burrow]]s, and [[profile]]s can mitigate this).&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Swimming Pool ====&lt;br /&gt;
Adding a swimming pool allows your dwarves to rapidly boost their swimmer skill; unfortunately they will not do so voluntarily. A simple pit with 4/7 - 6/7 of water and a means of &amp;quot;encouraging&amp;quot; your dwarves to dive in are sufficient. Placing your swimming pool near/under a [[meeting hall]] will automatically train idle (and partying) dwarves. &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Cheap to set up&lt;br /&gt;
*Automates training of idle dwarves without interfering with actual work&lt;br /&gt;
*Provides a good set of physical [[attribute]]s likely to speed up fortress operation &lt;br /&gt;
*Swimming skill can occasionally save a dwarf's life&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Generates no wealth&lt;br /&gt;
*[[gravity|Falling]] damage can be significant (of course, this trains medical staff too!).&lt;br /&gt;
*[[Flooding]] can be a problem, particular for overseers unfamiliar with Dwarf Fortress fluid mechanics&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Endurance, Strength, Willpower, Kinesthetic Sense, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Artillery proving ground ([[siege operator]])====&lt;br /&gt;
Mass-produce some catapults, line them up near a quarry, and fire away.  Works well to dispose of stone from a gulag (see below).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Trains a skill that's reasonably useful, and provides a place to put all the sub-par siege engine components your [[siege engineer]] will doubtlessly create if you're going for superior-quality engines.&lt;br /&gt;
*Harasses the wildlife, which is always fun and sometimes [[Fun]].&amp;lt;br&amp;gt;&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Very slow to train (2+ years for legendary).&lt;br /&gt;
*Fairly space-consuming to set up a well-designed and usable proving ground.&lt;br /&gt;
*Can be dangerous depending on the biome (especially when [[elephant]]s are present.  If they get winged by a stray boulder, you can bet they're going to be coming straight at you).&lt;br /&gt;
*[[Siege operator]]s are civilians, and will run in fear when an enemy approaches them.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Analytical Ability, Focus, Spatial Sense&lt;br /&gt;
&lt;br /&gt;
====Internship MkII ([[manager]])====&lt;br /&gt;
Much like bookkeeping, assign a new dwarf to manager, queue several hundred jobs, and rotate a replacement in as soon as he becomes legendary. For bonus points, queue jobs which need to be repeated anyway, like &amp;quot;Prepare Raw Fish&amp;quot; or &amp;quot;Mill Plants&amp;quot;, or jobs for which there is no workshop, like &amp;quot;Make Wooden Bow&amp;quot; or &amp;quot;Make Soap&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Requires no extra infrastructure at all.&lt;br /&gt;
*You need a manager anyway!&lt;br /&gt;
*Mostly safe; a manager spends basically all his discretionary time snug in his office, or doing his other assigned jobs.&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Only employs one dwarf at a time; not useful when you have 15-25 candidates for the reserves. &lt;br /&gt;
*No announcement when the current intern reaches Legendary status means you can lose time on rotation easily.&lt;br /&gt;
*Produces little to no useful attribute gains&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Analytical Ability, Memory, Focus&lt;br /&gt;
&lt;br /&gt;
====Gulag ([[miner]])====&lt;br /&gt;
The gulag is basically a strip mine that is located far away from your main fortress (so you don't have to worry about accidentally screwing up your own building plans; if you are careful in planning, it may be placed closer to your fortress).  Take a big square and start leveling it; it's really no more complicated than that.  Since [[pick|picks]] can actually be used as weapons, it's worthwhile to give the reservists who will be working in the gulag picks made out of [[bronze]], or, if you are really living large, [[iron]] or even [[steel]].  Note that you will have to turn your usual mining corps (the civilian miners who are already experienced with mining) off or designate separate mining [[burrow]]s for this setup to work properly. It might be convenient to use a locked door to isolate the gulag from the main fortress, once a batch of trainees are inside.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Soldiers can be equipped with picks from the military skill, and use the Miner skill in combat - militia squads of highly skilled miners can provide a decent defence from early threats&lt;br /&gt;
*Toting a pick for close-quarters support might make a legendary [[marksdwarf]] more useful, since the pathetic bludgeon damage of his [[wood]] and [[bone]] [[Weapon#Dwarf-manufactured Weapons|crossbows]] are less important.&lt;br /&gt;
*Can be quite useful for producing stones you might not have access to normally, or uncovering veins of precious metals.&lt;br /&gt;
*Levels quite fast in sand.&lt;br /&gt;
*Relatively little oversight from you.&lt;br /&gt;
*An overland hike to the gulag will fight [[cave adaptation]] in your military candidates.&lt;br /&gt;
*Can easily be transformed into a [[Caverns#Vegetation|underground tree farm]] on suitable maps, providing a safe and replenishable wood source.&lt;br /&gt;
&lt;br /&gt;
*Mining trains all military attributes, so it's perfect for military training too&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Juggling your real miners and your reservists when there's real work to be done on the fort can be a chore.&lt;br /&gt;
*Hard to keep dwarves in the gulag for too long; they'll inevitably get hungry, thirsty, and tired and start hiking back to the fortress proper. Could be solved by (temporary) [[burrow]].&lt;br /&gt;
*Can be dangerous, depending on the biome.&lt;br /&gt;
*Does require some amount of oversight from you, especially when your reservists start getting better at mining and run out of work more quickly.&lt;br /&gt;
*Surplus stone and mining in general are suspected to promote [[Maximizing_framerate|lag]].&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Toughness, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Renovation ([[stone detailing]])====&lt;br /&gt;
Another convenient way to buff up your dwarves, assigning your reservists to mass [[stone detailing]] duty increases your fortress' architectural wealth and makes the place look nicer. While they may clutter the halls somewhat, it doesn't require any special allocation of  [[food]], [[Bed|beds]] or [[drink]]. Just turn on [[stone detailing]] for your reservists and mark up as much of the fortress as you like for renovation. If you have no particular area you want smoothed, you can alternate designating some open space between carving tracks and then smoothing them out. Be aware that carving tracks automatically sets those squares to be low traffic areas, so you may want to choose an out-of-the-way area that won't disrupt pathing for other activities. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Even easier to set up; just assign your dwarves and an area and you're good to go.&lt;br /&gt;
*Increases your fortress' value and general happiness.&lt;br /&gt;
*Requires no continuous oversight on your part.&lt;br /&gt;
*Very safe, if you only assign areas inside the fortress.&lt;br /&gt;
&lt;br /&gt;
'''Cons:''' &lt;br /&gt;
*Wealth overflow may bring too many [[immigrant]]s.&lt;br /&gt;
*Serious conflict with [[engraving]] assignments; trying to engrave with poorly trained engravers wastes a lot of wealth that essentially comes from nothing.  To avoid this, have periods when you only designate stone smoothing, followed by periods where you only designate engraving.&lt;br /&gt;
*Careless designation of smoothing areas may have your dwarves trying to smooth walls too close to [[magma]] or a [[river]].&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*If you smooth and engrave all your bedrooms, many dwarves will not be able to afford them once the [[Dwarven economy]] kicks in. This is unlikely to be relevant until the economy starts working again (not working as of v0.31.12)&lt;br /&gt;
See economy article, it won't turn on yet&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Sweatshop ([[mason]])====&lt;br /&gt;
Make one or more [[mason's workshop]]s in an area with a bunch of junk stone you don't care about, or that you're actively looking to clear.  Change the workshop settings to allow only your reservists to use it, then tell the workshop to churn out crafts, junk furniture, stone blocks, and trade goods that you can trade en-masse.  Alternatively, forbid your reservists from working in your real mason's workshops, order lots of stone constructions built, and pray that your real masons stay too occupied with the workshops to intrude.  Works well in conjunction with a gulag.  Alternate ideas for sweatshops include a [[mechanic's workshop]], [[craftsdwarf's workshop]], [[Kiln|magma kiln]], or a [[Glass furnace|magma glass furnace]] to train [[mechanic]], [[Stone crafter|stonecrafter]], [[potter]] and [[glassmaker]] respectively.  ''Note:  Do NOT try this with the [[carpenter]] skill unless you have a large supply, or any other resource you don't have in near-limitless abundance.  Sweatshops will consume huge amounts of their associated resources, and if you run out mid-way you have probably wasted your time.  This includes [[coke]] or [[charcoal]] used in the normal (non-magma) [[glass furnace]].''&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Quantitatively turns a profit.  The inferior trade goods can be dumped on the next caravan for more useful commodities like bags, seeds, and logs. Logs are especially useful, since you'll inevitably stamp out lots of bins to support the trade good output.&lt;br /&gt;
*Mass-producing blocks makes your constructions higher value.&lt;br /&gt;
*Unlike many other training programs, Sweatshops train a skill that is very useful.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Slow to level.&lt;br /&gt;
*Hard to keep the reservists on task, since they'll need to do plenty of hauling to keep their workshop from becoming chokingly cluttered.&lt;br /&gt;
*Can be a logistical nightmare; making bins and organizing hauling for the finished goods can be insane if you're working from a gulag.&lt;br /&gt;
*Can be dangerous depending on the biome and location of your sweatshops.&lt;br /&gt;
*Note also that stone blocks cannot be made into furniture or stone crafts.  This may or may not be an issue depending on where you're putting your gulag.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Powered Mill ([[grower]], [[cook]], [[miller]])====&lt;br /&gt;
Start off by creating a surplus of [[longland grass]], [[cave wheat]], and/or [[whip vine]] and some bags. Create multiple [[quern]] all close to the food stockpile which contains the millable plants. Next to this area make a [[kitchen]] assigned to an experienced cook. Enable milling for the dwarves you wish to cross-train and order the cook to make lavish meals. As long as your growers provide a steady supply of millable plants and your cook can empty out bags quick enough, the milling jobs will continue.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Pros:''' &lt;br /&gt;
*Produces a lot of wealth as flour is a high value ingredient&lt;br /&gt;
*Produces high amounts of food&lt;br /&gt;
*Sustains the training of non cross-training dwarves such as the cook and growers&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires a surplus of millable plants to ensure continuous milling, thus you may need to increase the number of plots/growers&lt;br /&gt;
*If you don't have enough bags and your cook decides to go on break you may end up having job cancellations for the millers&lt;br /&gt;
*Dedicated haulers will be required to keep all workshops clutter free&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Kinesthetic Sense (grower and  miller)&lt;br /&gt;
&lt;br /&gt;
Agility, Analytical Ability, Creativity, Kinesthetic Sense (cook)&lt;br /&gt;
&lt;br /&gt;
====Clear Cutting====&lt;br /&gt;
As long as wood hauling is turned off, dwarves will move from one tree to the next without stopping to bring the wood back.  On a heavily forested map, this means that dedicated wood cutters can skill up quickly, though the total number of trees to chop has been drastically reduced from previous versions.&lt;br /&gt;
&lt;br /&gt;
Of course, this training strategy isn't going to endear you with the [[elves]].&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Works quickly&lt;br /&gt;
*Provides useful lumber to carpenters, charcoal makers, etc. &lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Can cause problems with elves&lt;br /&gt;
*Map dependent&lt;br /&gt;
*Trees are limited, and regrow slowly&lt;br /&gt;
*Unless care is taken to only designate a small area for cutting, trainees and haulers can be spread out across the map while, making them vulnerable to creatures and ambushes.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Strength, Agility, Endurance, Willpower, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Dwarf Scouts ([[ambusher]], [[hunter]], [[marksdwarf]])====&lt;br /&gt;
Marksdwarves are an important part of any military. A bum rush of low level marksdwarves is good, but not as effective as an elite backup squad! Here is what you can do:&lt;br /&gt;
Draft a comfortable amount of dwarves to hunting, give them all cheap crossbows. Your dwarves should hunt as usual. But you are really training an elite squad of assassins, that will one day hunt goblins instead of groundhogs.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Easy to start.&lt;br /&gt;
*Lots of meat, bones and leather around.&lt;br /&gt;
*Aforementioned bones can be recycled to make new bolts.&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Doesn't work on some maps.&lt;br /&gt;
*Hunting is dangerous!&lt;br /&gt;
*Evil areas may result in the deer your dwarves bagged, waking up and ripping your hunter's face off!&lt;br /&gt;
*Not as economically productive as some other methods.&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Focus, Spatial Sense, Kinesthetic Sense (ambusher)&lt;br /&gt;
&lt;br /&gt;
====Art School ([[weaver]])====&lt;br /&gt;
Collecting spider [[web]]s is normally a slow way to train weaving, but that's because the aspiring weaver spends most of his time hiking out to the spiderweb and then back to the loom. If you manage to create a [[silk farming|convenient local source of webs]] near a loom, your weavers-in-training will rapidly gain experience. The abundant silk thread can then be woven by your more experienced weavers for clothing and trade.  &lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*Safe and easy to run&lt;br /&gt;
*Virtually inexhaustible&lt;br /&gt;
*Produces valuable resources (silk cloth)&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*Requires somewhat complex setup&lt;br /&gt;
*Weaving is a [[moodable]] skill--and not a particularly desirable one&lt;br /&gt;
&lt;br /&gt;
'''Attributes Trained:'''&lt;br /&gt;
&lt;br /&gt;
Agility, Creativity, Spatial Sense, Kinesthetic Sense&lt;br /&gt;
&lt;br /&gt;
====Charm School ([[Social skill|Social skills]])====&lt;br /&gt;
&amp;lt;i&amp;gt;(Note: Inspired by [http://www.bay12games.com/forum/index.php?topic=47533.0 milaga's Real Wagon experiment], details of this technique are still being investigated.)&amp;lt;/i&amp;gt;&lt;br /&gt;
This approach is less useful in the new version, as social skills will only produce &amp;quot;Soul&amp;quot; attribute gains. However, teaching your dwarves social skills is useful for training replacement Brokers, and can possibly reduce the chances of tantrums in the fort (more dwarves with high Consoler and Pacifier skill).&lt;br /&gt;
&lt;br /&gt;
Set up a small space with food, booze, and a few beds/chairs/tables. Next define a burrow encompassing said chairs tables etc. and assign only your intended trainees to the burrow. (Be sure to turn off all of their labors and use the building options menu of a table to designate it as a meeting place.) With no labors enabled and nothing to do, they'll chat and party and quickly buff up their comedian, flatterer, conversationalist, &amp;amp;c. skills.&lt;br /&gt;
&lt;br /&gt;
'''Pros:'''&lt;br /&gt;
*works on any map&lt;br /&gt;
*easy to set up&lt;br /&gt;
*trains many dwarves at once&lt;br /&gt;
*requires almost zero player oversight &lt;br /&gt;
*easily scales to any size of immigrant wave &lt;br /&gt;
*requires no resources the dwarves would not already be consuming (food, beds, &amp;amp;c) &lt;br /&gt;
*very safe&lt;br /&gt;
*no conflict with existing workshops or skills, unlike gulag or sweatshop&lt;br /&gt;
&lt;br /&gt;
'''Cons:'''&lt;br /&gt;
*dwarves gain no professional skills during this time, and their existing ones may rust&lt;br /&gt;
*lowers physical attributes due to rust&lt;br /&gt;
*produces no trade goods or useful items for the fortress&lt;br /&gt;
*produces many romances and tight-knit friendships, which [[Tantrum#Tantrum Spiral|put you at risk]] of suddenly having lots of [[losing#General Unhappiness|Fun]]&lt;br /&gt;
*inter-dwarf personality conflicts can produce early misery and tantrums. This can be prevented with quality furniture and food, and the risk is eliminated once friendships and relationships are formed and producing happy thoughts.&lt;br /&gt;
&lt;br /&gt;
====National self-defense training====&lt;br /&gt;
''Note: with the new military system, proper self-defense training is somewhat more complicated to set up, but allows much more effective reservist training once it's running. Make sure you're familiar with the [[Scheduling]] system before attempting this.''&lt;br /&gt;
&lt;br /&gt;
This is the process of training all your civilians in a basic military skill - or at least, most of them. Any time a dwarf is activated into the military, and they do not have at least Novice level in some combat skill, they get a bad thought. The easiest way to do this is to assign every new [[migrant]] to dedicated training [[squad|squads]], and assign that squad a barracks. Then, schedule these squads to Train one or more months in the year, and set all other months to &amp;quot;No Scheduled Order&amp;quot;. Then go to the Squads menu and set the squad to &amp;quot;Active/Training&amp;quot;. One month in six or one month in 12 will ensure skills don't get too rusty, as well as ensuring all dwarves reach a basic level in soldiering. To increase the rate at which dwarves gain skills, you can place one experienced soldier in each squad, which will make demonstrations much more valuable. It is worth setting the &amp;quot;Train&amp;quot; order in the schedule to less than 10 minimum; this allows dwarves to take time out to eat, drink, sleep...&lt;br /&gt;
&lt;br /&gt;
Then, if they ever get caught where they don't want to be (maybe they bump into a thief coming around a corner, or a flying critter jumps them, or you need to urgently order them out of the path of a magma flood, or send them to the [[Lever|control room]] - anything), not only can you activate them with no bad thoughts, but every dwarf has a better chance at not-dying - which can only be a good thing. Moreover, idle dwarves will now go to &amp;quot;Individual Combat Drill&amp;quot; rather than standing around timewasting.&lt;br /&gt;
&lt;br /&gt;
Note: if you're feeling cheap, training squads can be set to &amp;quot;No Uniform&amp;quot;. This will teach wrestling. However, it's probably a better idea to churn out some training weapons, wooden shields and leather armor, as this will allow dwarves to gain the shield user and armor user skills.&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
*The charm school can cross-train many dwarves in the many mental attributes, but produces no useful items, trade wealth, or professional skills. The method is also still being refined and potential pitfalls may still be uncovered.&lt;br /&gt;
*Artillery training can give you some siege operators, which will be useful if you have ballistae.&lt;br /&gt;
*The internship only trains up one dwarf at a time. Your stocks could also lag behind if you are unlucky.&lt;br /&gt;
*The gulag requires planning, and your dwarves in the fortress proper may run all the way to the gulag to grab a stone for some crafts, a chair, etc. It does, however, train your dwarves in mining quickly, which is always a useful skill.&lt;br /&gt;
*Renovation is hands-free, but may bloat your fortress wealth too quickly.&lt;br /&gt;
*The sweatshop creates a large amount of goods, which can be traded away to keep traders happy. It also increases your wealth by quite a lot, which can be good or bad depending upon your situation. The goods are also difficult to manage.&lt;br /&gt;
*National self-defence training is easy to manage when set up and lets you give your civilians clothes and light armour to keep them safe. However, it can take valuable workers away from their job if the training is too frequent.&lt;br /&gt;
&lt;br /&gt;
Note that the artillery training and internship don't take away [[strange mood]] potential (you can give those dwarves dabbling in anything you want and that's how they'll get theirs), while the gulag, renovation, and sweatshop do.&lt;br /&gt;
&lt;br /&gt;
{{Military FAQ}}&lt;br /&gt;
&lt;br /&gt;
{{Category|Military}}&lt;br /&gt;
{{Category|Fortress defense}}&lt;/div&gt;</summary>
		<author><name>Taptap</name></author>
	</entry>
</feed>