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

Difference between revisions of "v0.34:Minecart"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎Impulse ramps: Tried to make things a little clearer)
 
(233 intermediate revisions by 95 users not shown)
Line 1: Line 1:
{{quality|Fine|22:04, 14 May 2012 (UTC)}}{{av}}
+
{{quality|Masterwork|22:56, 17 March 2013 (UTC)}}{{av}}{{Buggy}}
A '''minecart''' is a [[tool]] used mostly for [[hauling]]. It is made of [[wood]] or [[metal]] at a [[carpenter's workshop]] or a [[metalsmith's forge]]. Minecarts store five times as many items as [[wheelbarrow]]s, but have the disadvantage of requiring a dedicated track system along with micromanagement. Minecart tracks take up a lot of space, may be complicated to construct, and often will require substantial resources to complete. Since you can only engrave tracks in natural stone, minecart routes are especially expensive when built above-ground or in artificial structures.
+
A '''minecart''' is a [[tool]] used mostly for [[hauling]], introduced in version 0.34.08. It can be made of [[wood]] at a [[carpenter's workshop]] or [[metal]] at a [[metalsmith's forge]] (using the [[Metal crafter|metalcrafting]] labor.) Minecarts store up to five times as many items as [[wheelbarrow]]s and are quite a bit faster than dwarves hauling objects by hand, but have the disadvantages of requiring a dedicated track network, a complex route planning phase, and the possibility of dwarves [[Fun|blundering into the path of carts filled with lead ore]]. Tracks may be carved into stone, or [[Construction|constructed]]; the latter allows above-ground routes, but these are more difficult to set up due to their additional [[building material|material requirements]].
  
The interface for selecting minecart usage can be accessed from the {{k|h}}auling menu.
+
Just like wheelbarrows, minecarts are considered [[item]]s and are stored in a [[furniture]] [[stockpile]]. Despite their five-times-greater capacity, they are only 33% larger than wheelbarrows and are identical in base [[item value|value]] when made from the same [[material]] (the value may differ due to the [[item quality]]). [[thief|Thieves]] or even mischievous animals can steal minecarts, even when they are moving on a track{{cite forum|109460/3289070}}. However, minecarts moving fast enough or being ridden cannot be stolen.
  
== Track ==
+
Although most of the utility of minecarts is in [[fortress mode]], an [[adventure mode|adventurer]] can also ride in a minecart. Adventurers can also pick up and relocate minecarts.
Tracks are [[Engraver|carved]] with designations, with {{K|d}} {{k|T}}, or alternatively built from the [[construction]] section, with {{K|b}} {{K|C}}, in where you can not only build tracks (with {{K|T}}), but also build stops (with {{K|S}}). While engraved tracks can only be carved on natural [[stone]] floors, they are much more convenient and can be smoothed for refurbishing.
 
  
Engraved tracks have corners added automatically, while constructed tracks let you decide exactly what type of segment to build. Tracks can move up or down [[z-level]]s by means of [[ramp]]s, but not [[stair]]s.
+
The invention of minecarts revolutionized the [[minecart logic|Science of Dwarfputing]] by enabling smaller, faster logic systems to be built.
  
Any tracks, when constructed, will designate the square as a low-priority [[traffic|traffic order]]. This reduces the odds of dwarves walking into a high-speed minecart, however it should be noted that pets and livestock ignore traffic orders.
+
== Basic Minecart Usage ==
 +
Minecarts can be used to swiftly transport dwarves, [[flow|fluids]], and/or large amounts of items, but before you have a functional minecart there are several preconditions that need to be met. First of all you need an actual minecart, constructed either in a [[carpenter's workshop]] or [[metalsmith's forge]]. For the minecart to be able to move you also need to carve or construct a track, which could be as simple as a straight line. Finally you need to construct stops on your track where the minecart will start and stop.  
  
As constructions or tile features, [[door]]s and other furniture can be built on tracks. A [[door]] or [[floodgate]] can be turned on or off by a [[lever]], effectively controlling the flow of automated minecarts. This may be dangerous, however.
+
After you have created the stops and assigned a cart to the track, you must create logic routes connecting several stops and designate starting conditions for each stop. This is done with the {{k|h}}auling key. The most basic conditions are how the cart's movement is initiated and in which direction the cart should start moving. Carts can be either be Pushed (a dwarf stands at a stop and gives the cart a single push) or Guided (a dwarf continually pushes the cart forward, guiding it along the track). The [[hauling]] [[labor]] required for pushing and guiding carts is called "Push/Haul Vehicles" and is turned on by default.
  
[[Bridge]]s can also act as tracks, but only if it is lowered or not retracted. This property can enable levers to turn tracks on and off.
+
To control which items to transport you can add conditions specifying: (1) which kind of items to be loaded, and unloaded, (2) stockpile links to define which stockpile(s) the items should be un/loaded to and from.
  
=== Track stop ===
+
===Capacity and weights ===
Place a track stop on a track that has already been carved or constructed to set friction and dump controls.  In the {{K|b}} {{K|C}} {{K|S}} menu, set the friction level of the stop and/or if a cart should automatically dump out its contents at the stop.  If set to dump, select the direction to dump in. Once you proceed to build the track stop, these settings cannot be seen or changed. Note that a minecart on a dumping track stop cannot be filled by a dwarf.
+
Minecarts have five times the [[Weight|capacity]] of [[wheelbarrow]]s.  
  
Use {{K|h}} to set up routes.  This allows you to place route stops on top of the track stops themselves (or just the bare track).  Place the route stops and assign the vehicle (minecart) that will be used.  For each route stop, you can tell the dwarves exactly what items to take, where to take them from, when to transport them, etc.
+
'''Examples of the capacity of one cart'''
 +
{| class="wikitable"
 +
|-
 +
! Item
 +
! Amount
 +
|-
 +
| [[stone]]
 +
| 5
 +
|-
 +
| [[wood|log]]
 +
| 10
 +
|-
 +
| [[block]]/[[bar]]
 +
| 83
 +
|-
 +
| [[Kitchen|prepared meals]]
 +
| 500
 +
|-
 +
| [[Trap_component#Spiked_ball|spiked balls]]
 +
| 500
 +
|-
 +
| [[Weapon#Native_weapons|mace]]
 +
| 625
 +
|-
 +
| [[Weapon#Native_weapons|spears]]
 +
| 1250
 +
|-
 +
| [[cloth]]
 +
| 2500
 +
|}
  
Then set up the [[stockpile]]s nearby, link them accordingly, set up the give or not give so everything moves where you want, then wait for them to be guided or pushed!
+
The weight of the loaded minecart does not affect the initial velocity received from pushing or launching from a roller. However, the load of a minecart ''does'' affect whether a [[pressure plate]] triggers or not, based on the pressure plate's setting.
  
A track stop is not needed in every tile that has a route stop; in fact, track stops are ''completely'' unnecessary to all basic minecart designs, rather being useful for automated designs.  Track stops are commonly built at the beginning and end of a track.
+
'''Weights of different carts'''
 +
{| class="wikitable"
 +
|-
 +
! Type of cart
 +
! Empty cart
 +
! Fully loaded (items)
 +
|-
 +
| oaken minecart  
 +
| 28Γ
 +
| 378Γ (10 oak logs)
 +
|-
 +
| platinum minecart
 +
| 856Γ
 +
| 10482Γ (gold bars)
 +
|}
  
=== Roller ===
+
=== Creating tracks ===
A '''roller''' is built by a [[mechanic]] with one or more [[mechanism]]s and a [[rope]] in the {{K|b}} {{K|M}} menu by selecting {{K|r}}. Rollers must be [[power]]ed, and they serve the purpose of moving a minecart without [[dwarf]]-power.  Rollers may apparently be placed on ramps to help pull carts up Z levels. If minecart routes are set to ''push'', rollers may be very useful to maintain the cart's momentum. Rollers are variable-length, variable-direction, and variable-power, all traits that can be set at construction time.
+
The tracks, which the minecarts travels on, can be built in two ways: Engraved/carved or constructed. The way the tracks are built is slightly different between the two, as explained below.
  
A cart cannot travel up a ramp on its own when being pushed or ridden in. If a cart attempts to do this, it will bounce back the direction it came, at best this is a waste of time and at worst it will give your cart-pushing dwarf a [[fun|fun surprise]]. The only way to avoid this is to place a roller before the ramp to provide the additional momentum necessary.
+
====Simple tracks====
  
At the highest speed, a roller uses two units of power per tile it is long.
+
'''Carved'''
  
Rollers can be frozen if exposed to cold [[temperature]]s. If they are in that state, they will not operate.
+
A single-tile wide strip of natural stone can be designated to be [[Engraver|carved]] (with {{K|d}} {{k|T}}), which will create a straight two-way track. The creation of corners, crossings, and T-junctions is as simple as designating another strip of track that overlaps an existent or newly designated track. Engraved tracks are removed by [[smoothing]] the rock they're on, which results in a smooth floor (that can be re-engraved if necessary), or by building a [[floor]] on top and subsequently removing it.  Dwarves can carve corner tracks in one pass by designating the track carving twice and canceling unwanted carvings (with {{K|d}} {{K|x}}). Tracks can be engraved in any natural floor tile, rough, smooth and even over engravings, providing an easy method to remove low-quality or undesired floor engravings.
  
Because of their one-way nature, rollers are unsuitable for most two-way minecart tracks. However, a minecart set to be ''guided'' is not affected by rollers at all — this allows a one-way track to be used in both directions.
+
'''Constructed'''
  
=== Removal ===
+
Tracks can also be built as regular [[construction]]s (through {{K|b}} {{K|C}} {{K|T}}). This method is resource-expensive, since each track tile requires one stone, [[bar]], or [[block]] for construction, and time-consuming, since you can't designate strips longer than 10 tiles at a time. Corners, crossings, T-junctions, and ramps also have to be designated individually. However, it is usually the only way to build tracks above ground or on soil (barring the [[Obsidian farming|creation of obsidian]]). Constructed tracks are designated for removal like any regular construction; be aware that removing track ramps built on top of natural ones will also remove the original ramp, leaving a flat floor.  
Constructed tracks can be removed like any other [[construction]] with {{k|d}} {{k|n}}. Engraved tracks can be removed by simply smoothing the track, with {{k|d}} {{k|s}}, or by building a floor and subsequently removing it.
 
  
Counterintuitive to their construction method, track stops are also considered [[building]]s and must be removed by {{k|q}} {{k|x}}. Rollers are, as one would expect, buildings and must be deconstructed in the same manner.
+
====Ramps====
  
== Physics ==
+
'''Carved'''
<!--
+
 
copying template ║ ═ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬
+
The carving of natural ramps is a little more confusing: to carve a two-way track on a ramp (natural only, does not work on constructed ramps), you must designate the track '''starting on the ramp and one square beyond''' in the direction you want the track to go. For the side of the ramp square you want to head upward, there '''must''' be either a natural or constructed wall in the square next to it, otherwise the game assumes you are trying to carve it on the same level -- this can result in the track being carved underneath a door or other object. If you have accidentally done this, you can correct it by smoothing the ramp and constructing a single square of wall next to it, then re-carving the ramp correctly. (However, the wall must stay there permanently; removing it will disconnect the track.)
╞ ╡ ╥ ╨
+
 
-->
+
'''Constructed'''
When '''pushed''', minecarts will move along the track in a straight line, until they either run off the tracks or encounter a turn. Behavior at T-intersections has not yet been conclusively determined. This behaviour is not present if the minecarts are '''guided'''.
+
 
 +
When constructing track ramps, the stated direction should be the same as the connected tracks. For example, a track going up from West to East would require, starting from the West, a Track (EW), a Track/Ramp (EW) and a Wall behind the ramp. Incorrectly placed ramps result in minecarts ignoring the ramp and crashing into the supporting wall. They will not, however, display as unusable as when the supporting wall is missing.
 +
 
 +
'''Examples of ramps'''
 +
 
 +
A simple ramp would look like this:
 +
z +0  z +1
 +
░░░░  ░░░░
 +
═▲o    ░▼═
 +
░░░░  ░░░░
 +
o : wall
  
Some samples with behavior:
+
Carving track corners into ramps is rather unintuitive and complicated. Since engraving tracks always requires two tiles to connect in a straight line as input, you have to give two separate designations for a single job: a track bit from the ramp tile to the "below" direction and another one to the wall of the "upward" direction. If you wanted to change direction on a ramp from east to north:
  
   A <-> B    A <-> C              A <-> B     
+
z +0    z +1 
    B╥          B╥                    B╥
+
░░░░░   ░░░░░
    ║          ║                      ║
+
░░░░░  ══╗░░
  A╞══╝      A╞══╩══╡C              A╞══╬╗
+
  =▲░░  ░░▼░░
            You can only go A->B      ╚╝
+
  ░░░░░  ░░░░░
  Works      when the cart          Works
 
              is in Guide mode.     
 
  
In the second example above, if you attempt to "Push" from B to A or C, [[Fun|''the cart will go careening off of the tracks'']].
+
you would need to connect the ramp on z +0 both to the west and to the north by issuing two "carve track" commands, one selecting the ramp and the track tile to the west, and another connecting the ramp tile with the wall to the north. An engraver would then carve a NW track corner into the ramp, allowing carts to pass the corner correctly both going up and down. Such track corners are perfectly serviceable for guided carts, but moving down a route of several of them by pushed or ridden cart is problematic - the ramp-induced acceleration can easily lead to collisions with walls, dropping all contents of the cart and battering the rider.
  
=== Skipping ===
+
{{anchor|Tracks}}
If a minecart is moving fast enough, it can skip over [[water]] or [[magma]], making splashes as it attempts to move on them horizontally. This horizontal movement is independent of the minecart and its content's [[weight]].
+
=== Hauling route ===
 +
The proper setting up of routes is essential for a working rail system. Routes, stops, departure conditions and stockpile links are managed from the {{k|h}}auling menu.
  
=== Stacking ===
+
==== Route ====
If a minecart lands on another minecart in exactly the perfect orientation and time, they may form a stack (effectively a pillar) of minecarts. This pillar, aside from the [[megaprojects|megaproject]] uses possible, is also useful for [[trap design]] with minecarts as the weaponry.
+
New routes are created with the {{k|h}}auling key. Existing ones can be removed (without confirmation) with the {{k|x}} key, and also {{k|n}}icknamed. Before operating, the route must have at least one {{k|v}}ehicle assigned to it (this can be done with either the route or a stop selected). Assigning a full minecart to a route may result in a slow hauling job if the contents are heavy.
  
The location of the upper minecarts, above what seems to be thin air, can be confusing. These minecarts generally need to be struck with another minecart to move out, or have their support removed. The latter option can be somewhat dangerous, however.
+
==== Track stop ====
 +
There are two types of stops.  The first is the type you set in the {{k|h}}auling menu, by hitting {{k|s}} while highlighting the route (or a stop within) you've already designated.  This designates a loading/unloading location for a minecart.  For clarity in this section this will be referenced as a hauling stop, otherwise this gets confusing with Track Stops. The actual Track Stop, which is constructed via {{k|b}} {{k|C}} {{k|S}}, allows for slowing/halting of pushed and/or ridden carts as well as automated dumping.
  
== Hauling route ==
+
Hauling stops are designated by moving the cursor on top of the desired tile and pressing the {{k|s}} key afterwards. They can be removed with and nicknamed with the same hotkeys as routes. Stops can also be reordered with the {{k|p}}romote key. Without a definition, however, a stop is fairly useless: pressing the {{k|Enter}} key with a stop selected in the route menu opens its stop definition screen, from which departure conditions and stockpile links can be set up.
From the {{k|h}}auling menu, minecart routes can be set up, and [[stockpile]] links set. Navigate the list with the {{k|+}}, {{k|-}}, {{k|*}} and {{k|/}} commands.
 
  
Note that if you set up lots of routes and stops and then resize your screen, the list will scroll off-screen in the hauling menu. You can still navigate the list with the keyboard commands listed above, but cannot see the stop/route nameThis will be fixed in the next release.
+
It is important to note that hauling stop order is enforced, even if there is no trackA dwarf will drag the cart overland back to a skipped stop in the route's list if your tracks bypass it somehow.
  
=== Route ===
+
Each new stop get the same default conditions regardless of the track it is placed upon (e.g. guide the cart to the north). For this reason new stops might get marked by yellow exclamation marks ({{DFtext|!|#ff0}}) due to invalid directions.  
A new route is created with the {{k|r}}oute key. An existing route can be removed (without confirmation) with the {{k|x}} key. A route can also be {{k|n}}icknamed. Before operating, the route must have at least one {{k|v}}ehicle assigned to it (this can be done from the route or from a stop; it does not seem to matter which).
 
  
=== Stop ===
+
Track stops are not mandatory; in fact, their main use is in automated rail systems. However, even in basic rail systems it can be useful to set a track stop to dump items: this saves time that dwarves would otherwise spend in removing items from the cart, time that is better spent driving the cart back to where it's needed. Dumping will occur even with a guided cart. Take care not to set track stops at a loading site to dump their contents, or dwarves will never be able to fill the cart.
The {{k|s}} key is used to create a new stop. Like routes, stops can be removed with {{k|x}} or nicknamed with {{k|n}}. Stops can also be reordered with the {{k|p}}romote key. Without a definition, however, a stop is fairly useless. The {{k|Enter}} key accesses the stop definition screen, which has two modes: advanced and basic.
 
  
== Stop definition ==
+
Counter-intuitive to their construction method, track stops are considered [[building]]s and must be removed by {{k|q}} {{k|x}}.
The Stop Definition screen shows the 'orders' for a certain track stop.
+
* See [[#More_on_Track_stop |More on Track Stops]]
There are two types of orders: departure conditions, and stockpile links.
 
  
==== Stockpile links ====
+
===== Stockpile links =====
By moving the cursor and using {{k|p}}, you can create a new stockpile link for a track stop.
+
By placing the cursor on top of a stockpile and using {{k|s}}, you can create stockpile links while defining a hauling stop. Links can also be redefined by selecting them, placing the cursor over a different stockpile, and pressing {{k|p}}.
 +
[[#More_on_Track_stop| See More on Track stop]]
  
==== Departure condition ====
+
===== Departure condition =====
 
Departure conditions involve setting conditions in which the minecart will leave on the route. Each condition includes:
 
Departure conditions involve setting conditions in which the minecart will leave on the route. Each condition includes:
# A departure mode (Guide, Ride or Push)
+
# A departure mode (Guide, Ride or Push).
# A departure direction (NSEW)
+
# A departure direction (NSEW).
# A timer, before which the departure condition cannot be met
+
# A timer, before which the departure condition cannot be met.
# Conditions on the amount of items in the cart
+
# Conditions on the amount of items in the cart.
The "Advanced" screen allows you to have precise control over No. 4, as a percentage from 1 to 100.
+
Departure conditions are created with the {{k|n}} key. A new departure condition will read: "guide north immediately when empty of desired items". This condition can be changed between basic presets with {{k|c}}. "Advanced" mode ({{k|C}}) allows for more precise control over departure conditions: fine tuning the percentage from 0 to 100 in 25% steps ({{k|f}} and {{k|F}}), switching it being either the maximum or the minimum amount of items for the condition to be met ({{k|m}}), and whether the cart accepts all or only a specific set of items ({{k|l}}). Common to both screens are the departure mode ({{k|p}}, Push, Ride or Guide), {{k|d}}irection, and timer ({{k|t}} and {{k|T}}) options.
Departure conditions are created with the {{k|n}} key. A new departure condition will read: "guide north immediately when empty of desired items". This condition can be changed with {{k|c}} in the basic screen, or {{k|f}}, {{k|F}}, {{k|m}}, and {{k|l}} specific to the advanced screen. Common to both screens are the {{k|p}}, {{k|d}}, {{k|t}}, and {{k|T}} options.
+
 
 +
To have a cart only carry a specific set of items, the stop can be set to only carry "desired" items, opening the selection screen with the {{k|Enter}} key while having said stop condition selected, and toggling as desired, or it can simply be linked to a restricted stockpile and set to depart with any items.
 +
 
 +
=== Step-by-step tutorial ===
 +
 
 +
Let's construct a simple minecart route.  This route will move stone blocks from an input stockpile to an output stockpile.  We'll begin by creating the stockpiles:
 +
 
 +
[[File:minecart-example-1.png|Stockpiles designated.]]
 +
 
 +
The input stockpile is on the left; the output stockpile is on the right.  We'll be moving blocks from left to right.  Disable bins in both stockpiles, and set the input stockpile to accept only from links.  Then make the stockpile take from the mason's workshop where the blocks are being produced.
 +
 
 +
Next, carve the track:
 +
 
 +
[[File:minecart-example-2.png|Track carving designation.]]
 +
 
 +
Note that the ends of the designation are uniquely shaped; this is automatic, and not anything you need to control.  Now, wait for your engravers to come along and carve the track into the stone.  (Your haulers will probably also fill up the input stockpile while you wait.)
 +
 
 +
In addition, while we're waiting for that to happen, we'll build an iron minecart in the forge.
 +
 
 +
[[File:minecart-example-3.png|Track carved.]]
 +
 
 +
When the track has been carved, it will look like the above (the track will be solid instead of flashing).  Now, order a track stop to be constructed next to the output stockpile:
 +
 
 +
{|
 +
| [[File:minecart-example-4.png|Track stop designation.]]
 +
| [[File:minecart-example-5.png|Select dumping direction.]]
 +
|}
 +
 
 +
You must press {{k|d}} three times to select the dumping direction ''before'' placing the track stop.  We want our blocks to be dumped into the output stockpile east of the track stop.  Then wait for a mechanic to come along and build the track stop.
 +
 
 +
[[File:minecart-example-6.png|Track stop constructed.]]
 +
 
 +
Now we'll define the actual ''route''.  This is done in the {{k|h}}auling menu.  Press {{k|r}} to begin defining a route.  Next, move the cursor to the input end of the track, and then press {{k|s}} to define the first stop:
 +
 
 +
{|
 +
| [[File:minecart-example-7.png|Stop 1 designation.]]
 +
| [[File:minecart-example-8.png|Route definition, in progress.]]
 +
|}
 +
 
 +
Move the cursor again, to the output end of the track, and press {{k|s}} again to define the second stop:
 +
 
 +
{|
 +
| [[File:minecart-example-9.png|Stop 2 designation.]]
 +
| [[File:minecart-example-10.png|Route definition, two stops.]]
 +
|-
 +
|
 +
| [[File:minecart-example-11.png|Stops are not defined yet.]]
 +
|}
 +
 
 +
There are several user interface features to note at this point.  The stops have been positioned, but they haven't been ''defined'' yet, so there is a warning {{DFtext|!|#ff0}} symbol by each of them.  In the lower right corner, we see what the {{DFtext|!|#ff0}} means.  Also, note that the second stop is labeled in white, while the other two lines are grey.  The white text is a selection indicator, and can be moved up and down by pressing {{k|+}}/{{k|-}}.
 +
 
 +
Next we need to define what our stops do.  We want the minecart to be filled with blocks at the first stop, then travel to the second stop where it will dump its cargo, and then return.  Press {{k|-}} to move the selection up to stop 1, and {{k|Enter}} to open it up.  By default, the stop has three conditions:
 +
 
 +
[[File:minecart-example-12.png|Default stop definition.]]
 +
 
 +
We don't want any of these, so press {{k|x}} three times to delete them.  This leaves us with a blank stop.  Now we can add the conditions we actually want.  Press {{k|n}} to begin adding the first condition, then {{k|d}} twice to change the direction from north to east.  Then press {{k|c}} to change the condition from empty to full.  This will instruct the minecart to be guided east when full of desired items.
 +
 
 +
To set the desired items, we create a stockpile link.  Press {{k|s}}, then move the cursor to the input stockpile, then press {{k|p}} to select that stockpile.  Now press {{k|Enter}}; this opens up a selection screen that resembles the stockpile customization screen.  Move down to Blocks, {{k|e}}nable them, then (if you wish) restrict it to stone blocks.
 +
 
 +
When you've done all that, stop 1 should look like this:
 +
 
 +
[[File:minecart-example-13.png|Stop 1, defined.]]
 +
 
 +
Stop 2 is much simpler.  All we need to do is have the minecart return to the input stop.  So, make a condition and change the direction:
 +
 
 +
[[File:minecart-example-14.png|Stop 2, defined.]]
 +
 
 +
Finally, we just have to assign our minecart.  Go back to the route definition screen, and press {{k|v}}.  Select the minecart, and press {{k|Enter}}.
 +
 
 +
Now we've got everything set up:
 +
 
 +
[[File:minecart-example-15.png|Route, fully defined.]]
 +
 
 +
The V is red because the minecart hasn't been moved onto the track yet.  Some dwarf will have to haul it from the forge to the first stop, by hand; this will take a while, especially if the forge is far away.
 +
 
 +
Once the minecart is in place, dwarves should fill it with blocks from the input stockpile, which will in turn be filled with blocks from the workshop where your mason has been toiling dutifully.  When the minecart is full, the blocks will be dumped into the 1x1 stockpile on the right.  Automatic quantum dumping!
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===
Line 98: Line 222:
 
Because of the complexity of the system, all but the most careful and experienced minecart users will encounter issues. Most route issues can be diagnosed and fixed from the {{k|h}}auling menu.   
 
Because of the complexity of the system, all but the most careful and experienced minecart users will encounter issues. Most route issues can be diagnosed and fixed from the {{k|h}}auling menu.   
  
The <span style="background:#000000; color:#ffff00;">! Set dir/connect track</span> message may be caused by one or more of several reasons:
+
'''Symptom:''' {{DFtext|! Set dir/connect track|6:1}} message appears to the right of one or more stops
 +
 
 +
'''Possible Causes:'''
 
* The departure direction of the stop might be invalid. Edit the stop using {{k|Enter}} and press{{k|d}} until it is pointing in a valid direction.
 
* The departure direction of the stop might be invalid. Edit the stop using {{k|Enter}} and press{{k|d}} until it is pointing in a valid direction.
 
* The track stop might not be built on top of a track. The track stop must be deconstructed to remedy this issue.
 
* The track stop might not be built on top of a track. The track stop must be deconstructed to remedy this issue.
 +
* Your track might not be built correctly. Make sure all connected tracks between destinations are not one-way tracks.
 +
** This can be especially confusing with ramps. To carve a two-way track on a (natural) ramp, you must designate the ramp <b>and one square beyond</b> in the direction you want the track to go.
 +
** Ramps '''must''' have a solid block on the side opposite to the track, or they will neither work nor be marked as "unusable". The solid block can be natural or constructed.
 
* The desired/kept items might not be configured correctly.
 
* The desired/kept items might not be configured correctly.
*Your track might not be built correctly. Make sure all connected tracks between destinations are not one-way tracks.
 
**This can be especially confusing with ramps. To carve a two-way track on a (natural) ramp, you must designate the ramp <b>and one square beyond</b> in the direction you want the track to go.
 
  
If the route always shows 0% <span style="color:#00ff00;">V</span>, then the cart is probably not able to fill properly.
+
'''Symptom:''' The status '''0% <span style="color:#00dd00;">V</span>''' always appears to the right of one stop.
 +
 
 +
'''Possible Causes:'''
 
* The stop may not be set to take from a stockpile. Edit the Stop using {{k|Enter}} and make sure you see a message like "Take from Stockpile #1".
 
* The stop may not be set to take from a stockpile. Edit the Stop using {{k|Enter}} and make sure you see a message like "Take from Stockpile #1".
 
* The take conditions must correspond with the contents of the stockpile.
 
* The take conditions must correspond with the contents of the stockpile.
 
* The track stop may be set to dump. A track stop set to dump cannot be filled. You must either set the stop to a time-based departure or deconstruct the track stop and rebuild it without dumping.
 
* The track stop may be set to dump. A track stop set to dump cannot be filled. You must either set the stop to a time-based departure or deconstruct the track stop and rebuild it without dumping.
 +
* Make sure the minecart itself has not been designated to be dumped (such as when using mass-dump).
  
== Capacity ==
+
'''Symptom:''' A dwarf picks up the minecart and carries it to its destination.
Minecarts have five times the capacity of [[wheelbarrow]]s, which is an enormous amount. A single minecart can carry 2500 rolls of [[cloth]], for example, or even a hundred stone [[block]]s. Unfortunately, loading 2500 [[stone|boulder]]s onto a minecart is not possible.
+
* See [[#Quirks|Quirks]]
  
[[Water]] and [[magma]] can also be loaded to and dumped from minecarts, the former from passing through the fluid and latter via a track stop. Loading these onto minecarts can be difficult because the fluids' weight can slow the minecart down greatly. Curiously, a minecart filled with magma does not injure a dwarf set to ''ride'' the minecart.
+
=== Danger ===
 +
Minecarts are not without <strike>danger</strike> [[fun]]. Although designating a track automatically sets the [[traffic]] designation to low, dwarves ''may'' still walk on them, and [[creature]]s ignore traffic designations altogether. If an unlucky dwarf or creature fails to [[dodger|dodge]] a minecart, they can be injured. Most of this danger can be avoided by setting the minecart {{k|h}}auling commands to guide instead of push or ride, as dwarves guiding minecarts will ignore traffic restrictions, by [[pasture|pasturing]] domestic animals, and preventing the access of other creatures to the tracks. Note that removing the track doesn't reset that tile back to normal traffic priority, so you may wish to manually clean up traffic designation afterward. Also note that bridges that are used as tracks don't have their traffic priority changed automatically (since they're just normal bridges), which could cause dwarves to pathfind normally through dangerous minecart entrances in your fort's walls if you're not careful.
  
The capacity in a minecart affects whether a [[pressure plate]] triggers or not, based on the pressure plate's setting.
+
The only <s>fool</s>''dwarf''-proof method is to make the tracks inaccessible. There are several ways to create a track which works for minecarts but doesn't allow creature-traversal; the simplest is perhaps a single-tile hole. Minecarts moving at reasonable speed will jump the gap, while creatures will not. Other options include adding vertical drops, minecart-triggered doors, small pools of liquid (4/7 water or 2/7 magma), and hostile creatures overlooking the tracks. For safety, both ends of the track should be isolated, making the dangerous center sections completely inaccessible (though maintenance access can be provided by a locked door).
  
=== Rider ===
+
Danger does not always involve living victims: careless route designation can also result in minecarts careening off tracks or colliding with each other. If this occurs, the [[item]]s may be scattered; this can cause even more hauling jobs than the minecart aimed to eliminate. Even <s>better</s> worse, scattered items, especially [[weapon]]s, can injure passing [[dwarf|dwarves]] or other [[creature]]s; in the words of Toady One the Great, "Accidental grapeshotting of the dining room should be possible now."
Minecarts can be set to ride in the {{k|h}}auling routes screen. This setting encourages a [[dwarf]] to board the minecart, and will make the minecart move faster down ramps. Interestingly, a dwarf will drop its [[child|baby]], if it has one, when boarding the minecart.
 
  
Although most of the utility of minecarts is in [[fortress mode]], an [[adventure mode|adventurer]] can also ride in a minecart. Adventurers can also pick up and relocate minecarts.
+
Of course, the danger of using minecarts means they can also be [[Trap_design#Minecarts|used as weapons]] by imaginative players.
 +
 
 +
== Advanced usage and automation ==
 +
Minecart-specific effects are implemented via track stops, rollers and [[pressure plate]]s with "track" condition set. Since all three are considered [[building]]s, they can't be built on the same square (however convenient track stop + pressure plate would be) nor a simple ramp, and are removed by {{k|q}} {{k|x}}.
 +
 
 +
=== More on Track stop ===
 +
Track stops are constructions that allow further automation of minecart systems via adjustable features such as braking by friction and automatic dumping of contents. They can be built from logs, bars and blocks through {{K|b}} {{K|C}} {{K|S}}; friction amount, dumping toggle and dumping direction must be set '''before''' construction, and these settings can be neither changed nor seen thereafter; however, track stops can be linked to [[pressure plate]]s or [[lever]]s to toggle friction and dumping On or Off (trigger state is inverted: switch On = track stop Off).
 +
 
 +
If a [[stockpile]] is placed on the tile that a track stop is set to dump to, it can act as a [[Exploit#Quantum_stockpiles|quantum stockpile]] and any items dumped from a minecart that match the storage settings of the stockpile will remain there and accumulate.  Normally trackstops are built on top of existing track to operate on moving minecarts, but they can also be used without tracks to create [[Exploit#The_Minecart_Stop|automatic quantum stockpiles]] (see also [[#Step-by-step_tutorial|step-by-step tutorial]]).  It is not always desirable to collect ALL of certain items into one quantum stockpile, such as when distributing a material to multiple separate industries. You can link your quantum stockpile to various other stockpiles, ensuring that your dwarves will keep them supplied as necessary. Because quantum stockpiles never fill up like regular stockpiles, it may be a good idea to add a switch to turn them off. 
 +
 
 +
Items dumped from a minecart at a track stop (or dumped by any other means) into open space fall through z-levels until they land on a solid surface.  Items falling onto a designated [[stockpile]] will automatically be considered part of that stockpile, even if the stockpile is set to disallow those items (they will, however, be automatically moved to a more appropriate stockpile, if available).  Items falling on top of a minecart will '''not''' fall "inside" the minecart.  Use with caution; dwarves have fragile skulls.{{bug|5945}}
 +
 
 +
=== Automated propulsion ===
 +
==== Roller ====
 +
{{Main|Roller}}
 +
 
 +
A '''roller''' is a [[power]]ed [[machine component]] for the automated propulsion of minecarts. They are built over the top of existing tracks with {{K|b|M|r}}, requiring a [[mechanic]], ''(length/4)+1'' [[mechanism]]s and a [[rope]]. Rollers may also be placed directly on ramps to help pull carts up Z levels. Rollers are very useful to maintain a cart's momentum along long routes, to get them to climb Z-levels without dwarfpower involved, and to get them to reach speeds unattainable by guiding dwarves. These devices are variable-length (1-10), variable-direction and variable-speed ([[Minecart#Numbers_behind_the_scene|see below]]), all traits that can be set at construction time; a roller uses two units of power per tile it is long.
 +
 
 +
Single-tile rollers transfer power in all four cardinal directions, while other rollers generally only transfer power perpendicular to their activity direction. Longer rollers can also transfer power along their activity direction if built in the correct order, although this can be hard to accomplish and is easily broken. Rollers cannot be powered from above.
 +
 
 +
Rollers do not provide acceleration but rather set the cart's velocity to a new value: if a cart moves across an active roller in the direction the roller works and moves slower than the roller's specified speed, the cart will be set to the roller's speed. Carts going faster than the roller are unaffected. A cart going against a roller's movement direction will be sent back the way it came (once again at the roller's speed), unless it was moving extremely fast, well over derailing speed. A cart crossing over a roller perpendicular to its current movement direction will gain the roller's amount of speed in the perpendicular direction without directly changing its forward motion. Without an adjacent wall to constrict its movement, this will typically send a cart off the rails on a diagonal path, completely unable to follow any tracks until it collides with a wall or is otherwise brought to rest.
 +
 
 +
Because of their one-way nature, rollers are unsuitable for most two-way minecart tracks. However, a minecart set to be ''guided'' is not affected by rollers at all{{cite forum|109460/3286235}} &mdash; this allows a one-way track to be used in both directions. In addition, unpowered rollers do not affect minecarts.
 +
 
 +
Care must be taken in [[glacier]]s and other extremely cold [[biome]]s, since rollers (and the machinery used to power them) will not operate when constructed on natural [[ice]] floors.
 +
 
 +
==== Impulse ramps ====
 +
Carts can be given momentum without rollers or changing z-level through a phenomenon called "impulse ramps". A track ramp which is connected both to a wall and to a floor will ''always'' accelerate a cart towards the connected floor tile, no matter where the cart enters the tile from. This means carts can be accelerated as though dropping z-levels, even if the cart doesn't actually change z-level at all.
 +
 
 +
Example of straight impulse acceleration:
 +
 
 +
{{diagram|spaces=yes|\
 +
▒▒▒▒▒▒▒▒▒▒
 +
═╚╚╚╚╚╚╚╚╚╚═
 +
▒ : Wall
 +
═ : Normal track
 +
╚ : Track ramp (NE)
 +
}}
 +
 
 +
If a cart enters from the left, it will speed up on upward track and exit to the right going very very fast - more than one tile every step. If it enters from the right then it will bounce back impulsed by the ramp if it's going slow enough.
 +
 
 +
The other crazy thing about impulse ramps is that they produce slightly more acceleration than it takes to move a cart up one ramp. So you can just make an upward spiral alternating impulse ramps and regular upward ramps. It takes no power, is quick and cheap to build, requiring only channeling and track carving, and the cart goes up fast, but not so fast that it launches its contents.
 +
 
 +
Example of an impulse elevator:
 +
 
 +
{{diagram|spaces=yes|\
 +
z +0    z +1    z +2    z +3
 +
░░░░░  ░░░░░  ░░░░░  ░░░░░
 +
░╔░░░  ░▼╚╗░  ░░▼▼░  ░░░░░
 +
░╝░░░  ░▼░░░  ░░░╔░  ░░░▼░
 +
░▼▼░░  ░░░░░  ░░░╝░  ░╚╗▼░
 +
░░░░░  ░░░░░  ░░░░░  ░░░░░
 +
 
 +
░ : Wall
 +
╔,╚,╗,╝ : Track ramp
 +
▼ : Down Ramp (empty space)
 +
}}
 +
 
 +
 
 +
A sort of opposite effect to impulse ramps also exists: ramps lacking the proper "up" and "down" connections are treated as flat track, even if they actually go up or down z-levels. This allows building "anti-impulse" slopes consisting entirely of ramps only connected up, which a minecart can travel up forty levels and more, needing no more than a single push.
 +
 
 +
=== Controlling traffic ===
 +
 
 +
==== Switching ====
 +
<!-- copying template ║ ═ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ ╞ ╡ ╥ ╨ -->
 +
As constructions or tile features, [[door]]s and other furniture can be built on tracks. A [[door]] or [[floodgate]] can be turned on or off by a [[lever]], effectively controlling the flow of automated minecarts. This may be <s>dangerous</s> [[fun]], however.
 +
 
 +
      ->
 +
A╞════RD════╡B
 +
 
 +
 
 +
 
 +
The roller 'R' pushes the cart east, but until the "departure condition" is fulfilled, the door 'D' remains closed and blocks the path.
 +
 
 +
[[Bridge]]s can also act as tracks, but only if they're lowered or not retracted. This property can enable levers to turn tracks on and off. However, care should be taken to ensure that such bridges are never operated while a cart is on top of them, as the cart will be flung off the track. It's worth noting that it's often faster, and cheaper, to construct large bridges than long sections of constructed track.
 +
 
 +
A powered track switch can be constructed by building a T-junction as illustrated below.
 +
 
 +
      B╥                  B╥
 +
      ║                  ║
 +
      ║        ->        ║
 +
      ║                  ║
 +
A╞════╚════╡C      A╞════R════╡C
 +
 
 +
The 'R' is a roller pushing from  East to West.
 +
If the cart is pushed East from the stop at 'A' while the roller is activated, it will arrive at 'B'. If the roller is not running, it will arrive at 'C'. The switch works by the roller first reversing the incoming cart's movement and the cart ''then'' following the track corner.
 +
 
 +
This switch is very reliable, reacts instantly to on/off signals, and carts of any speed can be switched by this design, although very fast carts will require rollers that are several tiles long, up to three. The requirement for power can be inconvenient or impractical.  Non-powered solutions may use controlled derailment, or a connecting bridge.
 +
 
 +
      B╥
 +
      ║
 +
      ║
 +
A╞════╝D ════╡C
 +
 
 +
Here the track between A and C is not continuous. The only continuous track is A->B, with a corner (not a T section). Fast moving carts will tend to derail at D and rejoin the track to C. Placing a door at D will prevent the derailment, so the cart continues to B. The door is operated by mechanisms elsewhere (typically, a lever, but some fun can be had with pressure plates).
 +
 
 +
Since it depends on derailing, this switch requires a very fast cart, faster than what can be achieved with rollers alone. To gain sufficient speed, a cart must be accelerated further, usually by descending several levels or through impulse ramps. The high speed makes the cart much more dangerous and harder to control.
 +
 
 +
If carts are moving too slowly to derail at the corner, a retractable bridge may be used as a connector between A and C. 
 +
      B╥
 +
      ║
 +
      ║
 +
A╞════bbb════╡C
 +
The bridge must overlap the corner. Bridges behave like a track crossing, allowing carts to pass in a straight line. When retracted, the corner reappears, so the carts will continue to B. Bridges take 100 steps to react to a signal, necessitating rather long "lead times" when switching tracks via bridge.
 +
 
 +
As mentioned above, special care must be taken to make sure the bridge doesn't change state while the cart is passing over it. Retracting bridges will throw the cart, causing it to stop dead. Raising bridges can even crush the cart.
 +
 
 +
==== Controlling Speed ====
 +
<!-- copying template ║ ═ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ ╞ ╡ ╥ ╨ -->
 +
 
 +
Minecarts can reach extremely high speeds, especially when descending multiple Z-levels. A minecart will derail at a track corner if its speed exceeds 0.5 t/st (tiles per step), '''unless''' the route in the direction of travel is blocked:
 +
 
 +
Will derail at > 0.5 t/st:
 +
 
 +
in  ═╗->
 +
    out
 +
 
 +
Will not derail at > 0.5 t/st:
 +
 
 +
in  ═╗O
 +
      |
 +
      v
 +
    out
 +
 
 +
O is wall.
 +
 
 +
This behavior can be used to build a "speed limiter", that will ensure that when a minecart exits it is traveling below derail speed:
 +
 
 +
      OOOO    OOOOO        OOOOO
 +
in  ═╔═╗O    O╔S╗O        O╔S╗O
 +
out ═╬═╝O out ═╗═╝O    out ═╗═╝O
 +
    O╚S╝O    O╚═╝═ in    O╚S╝O
 +
    OOOOO    OOOO          ║OOO
 +
                              in
 +
 
 +
O is wall, S is a Track Stop set to High Friction or lower. If the minecart is traveling below derailment speed it will not be affected.
 +
 
 +
=== Loading liquids ===
 +
[[Water]] and [[magma]] can also be loaded into minecarts by submerging them to a depth of at least 6/7, and dumped by a constructed track stop. Loading fluids onto minecarts can be difficult because their weight can slow the minecart down greatly. In addition, minecarts will not fill if they are moving too quickly. Curiously, filling a minecart with magma does not injure a dwarf ''riding'' it. A minecart will hold enough fluid to increase the depth of a single tile by 2. This amount is listed as 833 units, which weigh 459Γ (water) or 999Γ (magma). An iron or steel cart filled with magma weighs 1313Γ, while an adamantine cart filled with magma weighs 1007Γ.
 +
 
 +
== Quirks ==
 +
This little quirk concerns dwarf-managed minecarts and may or may not apply to automatic minecarts. If a track which was previously open becomes blocked (ex. flipping a switch connected to a floodgate you've built on the track to raise it) and the conditions for departure are met, instead of refusing to ride/guide the minecart or ride/guide it until it reaches the obstacle, the dwarf will pick up the minecart off the tracks and haul it to its scheduled destination on foot. If the distance is long enough and the weight of the cart heavy enough (due to being filled with heavy items such as stones), the dwarf may drop the cart because of fatigue/hunger/thirst before reaching the destination. This will cancel that vehicle setting job and make another dwarf come by and attempt to haul the cart to the nearest appropriate stockpile where another dwarf will pick up the cart and attempt to haul it to its initial stop. If the stockpile is far enough from initial stop, this second dwarf who is attempting to place the minecart on its tracks may also drop the minecart out of fatigue/hunger/thirst creating a loop that will go on until a dwarf with enough endurance manages to place the minecart where it belongs.
 +
 
 +
In fact, it seems dwarves are more than happy to attempt to carry a minecart from one stop to another even if just waiting until the track is open again would be the more sane option.
 +
 
 +
Dwarves will also carry a minecart to its next stop if the direction specified is incorrect (or invalid). This can often occur when using the default departure settings and forgetting to set the direction of each condition.
 +
 
 +
Dwarves can admire buildings while riding mine carts. Dwarves will not fall asleep during a ride (at least not from being drowsy). If riding on a continuous powered track loop, the dwarf will die of dehydration/starvation as they can not jump off to get sustenance{{cite forum|109460/3377228}}. Dwarves riding in submerged minecarts will gain experience in [[swimming]].{{cite forum|129889}}
 +
 
 +
== Physics ==
 +
<!-- copying template ║ ═ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ ╞ ╡ ╥ ╨ -->
 +
 
 +
Minecart physics depend greatly on the departure mode set in the route stop conditions.
 +
 
 +
When set to "Push" or "Ride", minecarts will move according to the regular laws of momentum, gaining speed when going downhill, losing it slowly due to friction when on a flat plane, and more quickly when going uphill. In these modes, minecarts will move along the track in a straight line until they either run off the tracks or encounter a turn. A minecart will continue straight at a T junction if possible but if it is not possible the track is treated as a dead end and may jump track. The cart's behavior also depends on the weight of its contents (including fluids and dwarves): heavily loaded carts are harder to accelerate and to stop, and gain more momentum when going downhill. In either case, dwarves can not push nor ride an unpowered cart up a ramp, bouncing back the direction it came. At best, this is a waste of time; at worst, it will give your cart-pushing dwarf a [[fun|fun surprise]]. To solve this, the player can either use Rollers (see below) or set the cart to be Guided.
 +
 
 +
The difference between "Push" and "Ride" is whether the dwarf will go along with the cart or not. When set to "Push", the dwarf will give the cart an initial push, not enough to go up a ramp, but enough to go some way along flat track, and the dwarf will remain at the first stop, ready for a new job. When set to "Ride", the dwarf will give the cart the same initial push and then hop aboard the cart riding with it to the next stop.
 +
 
 +
When set to "Guide", minecarts seem to ignore all laws of physics. They:
 +
*Ignore the weight of any and all items inside. Therefore:
 +
**Move at the speed of the dwarf that is guiding them. It is thus recommended to pick the most [[attribute#Agility|agile]] of your dwarves for cart-guiding tasks.
 +
*Ignore working rollers.
 +
*Will ''not'' collide with other guided carts even when a full frontal collision would be expected.
 +
*Will go up ramps like nobody's business.
 +
This is therefore the recommended method of transport for simple non-powered rail systems, despite it diverting a dwarf from other, potentially more important tasks.
 +
 
 +
Some samples with behavior:
 +
 
 +
  A <-> B    A <-> C              A <-> B
 +
    B╥          B╥                    B╥
 +
    ║          ║                      ║
 +
A╞══╝      A╞══╩══╡C              A╞══╬╗
 +
            You can only go A->B      ╚╝
 +
  Works      when the cart          Works   
 +
              is in Guide mode.     
 +
 
 +
In the second example above, if you attempt to "Push" from B to A or C, [[Fun|''the cart will go careening off of the tracks'']].
 +
 
 +
=== Skipping ===
 +
If a minecart is moving fast enough, it can skip over [[water]] or [[magma]], making splashes of [[mist]] (or [[magma mist]]) as it attempts to move on them horizontally. This horizontal movement is independent of the minecart and its content's [[weight]].
 +
 
 +
=== Track Jumping ===
 +
If a minecart encounters the end of the track or a T junction with no "exit" in its movement direction, it will simply leave the track and continue on its course in a straight line until it encounters an obstacle, slows to a stop, or encounters another (properly aligned) Track even if the tile at which it joins the new track instantly sends it around a corner.
 +
 
 +
=== Falling ===
 +
When falling, a minecart appears to cause no damage upon collision, possibly to allow cart "stacking" across Z-levels.{{cite devlog|2012|04|06}} A dwarf riding in a minecart that is dropped multiple z-levels suffers normal fall damage. Minecarts can fall through up/down stairs.
 +
 
 +
=== Stacking ===
 +
If a minecart lands on top of another minecart, they may form a stack, with the upper cart on the z-level above the lower. Subsequent carts do not form a stack, but rather quantum stockpile in the same space. This behaviour is useful for [[megaprojects]] and [[trap design]] with minecarts as the weaponry.
 +
 
 +
These minecarts on the upper level generally need to be struck with another minecart to move out, or have their support removed. The latter option can be somewhat <s>dangerous</s> [[fun]], however.
 +
 
 +
=== Numbers behind the scene ===
 +
 
 +
According to [http://www.bay12forums.com/smf/index.php?topic=112831.msg3536975#msg3536975 this post]:
 +
 
 +
The minecart has a variable for speed. Speed is measured in tiles/100000 ticks, so a speed of one hundred thousand means one tile per tick. By going down a large number of ramps, a maximum speed of 270,000 can be reached, which presents the limit for most practical applications. Short bursts of (much) higher speeds are possible through carefully planned collisions of high-speed carts.
 +
 
 +
Every tick the cart accumulates distance units, as well as slows down depending on current tile (speed is reduced by "friction" of the tile). The cart will move to the next tile the tick before accumulating 100000 distance units, (or several tiles in case of great speed), then the leftover distance units are added to the default 100000 distance u. of the next tile. Since most deceleration and acceleration is applied per step, with the notable exception of corners, a cart going at twice the speed of another one can cover about four times the distance in a straight line, but only twice the distance along a winding track with very many corners.
 +
 
 +
A push will teleport a cart to the beginning of the next tile (NOT the middle!) in one tick with 19990 speed (10 speed is lost due to track friction), while a roller will accelerate a cart to roller speed, and it will start to accumulate regular track friction past the middle of the roller tile. Some track features will affect a minecart when it is past the middle of the previous tile: entering a ramp or a hole/drop will happen when the cart has left the middle of the previous tile, and the ramp will gain additional distance unit depending on the leftover units from the previous tile. When a cart leaves a ramp it will emerge after one tick in the middle of the next regular tile, so its entry coordinate is "50000-speed+friction". Rollers also affect the speed of minecart from the middle of the previous tile.
 +
 
 +
Friction of tiles:
 +
{| class="wikitable"
 +
|-
 +
! Tile
 +
! Friction
 +
! Comment
 +
|-
 +
| Tracks
 +
| 10
 +
|-
 +
| Ground/Floor
 +
| 200
 +
|-
 +
| Unusable ramp
 +
| 10
 +
|-
 +
| Upwards ramp
 +
| 4910 (10+4900)
 +
|-
 +
| Downwards ramp
 +
| -4890 (10-4900)
 +
|-
 +
| Corner track
 +
| 10
 +
| Speed reduced by 1000 upon leaving the corner tile
 +
|-
 +
| Track stop (highest)
 +
| 50000
 +
|-
 +
| Track stop (high)
 +
| 10000
 +
|-
 +
| Track stop (medium)
 +
| 500
 +
|-
 +
| Track stop (low)
 +
| 50
 +
|-
 +
| Track stop (lowest)
 +
| 10
 +
|-
 +
| Water
 +
| Additional (WaterLevel - 1) * 100
 +
| rowspan="2" | [[#Skipping|See Skipping]]
 +
|-
 +
| Magma
 +
| Additional (WaterLevel - 1) * 500
 +
|-
 +
| Empty space
 +
| 0
 +
|}
 +
 
 +
Impulse sources:
 +
{| class="wikitable"
 +
|-
 +
! Feature
 +
! Speed
 +
|-
 +
| Push
 +
| 20000
 +
|-
 +
| Roller lowest
 +
| 10000
 +
|-
 +
| Roller low
 +
| 20000
 +
|-
 +
| Roller medium
 +
| 30000
 +
|-
 +
| Roller high
 +
| 40000
 +
|-
 +
| Roller Highest
 +
| 50000
 +
|-
 +
|}
 +
 
 +
== Non-standard uses ==
 +
Minecarts include some interesting characteristics that have motivated uses beyond hauling. They can be useful for creating fully-automated [[exploit|quantum stockpiles]] and [[garbage disposal]]s. Storing perishable goods (meat, meals, etc.) inside a minecart appears to guard against rot and vermin. Minecarts trigger [[pressure plate]]s, which means a trap can be designed to trigger when a thief attempts to steal a minecart.
  
== Danger ==
+
== Adventure mode ==
Minecarts are not without [[Fun|danger]]. Although designating a track automatically sets the [[traffic]] designation to low, dwarves may still walk on them. If an unlucky dwarf fails to [[dodger|dodge]] a minecart, he or she can be injured. Most of this danger can be avoided by setting the minecart {{k|h}}auling commands to guide instead of push or ride.
+
In addition to being used for hauling, minecarts can also be ridden in [[adventure mode]]. (Adapted from [http://www.bay12forums.com/smf/index.php?topic=122903.0 this forum thread])
  
Minecarts can careen off tracks. If this occurs, the [[item]]s may be scattered; this can cause even more hauling jobs than the minecart aimed to eliminate. Even worse, scattered items, especially [[weapon]]s, can injure passing [[dwarf|dwarves]] or other [[creature]]s.
+
# If the minecart is in your inventory, drop it. If it is already on the ground, proceed to step 2.
 +
# Press {{k|u}} when you are 1 tile away from the minecart (or standing on the same tile as the minecart).
 +
# You will be presented with the following options:
 +
[[File:minecart adventure mode menu.png|left]]
 +
{{clear}}
 +
* If you {{DFtext|Push}} the minecart, it will move a few tiles in the direction you chose. Physics comes into play here, so it will gain/lose speed depending on the usual factors.
 +
* If you {{DFtext|Ride}} the minecart, you will hop into the minecart, even if you were a tile away, and it will move in the chosen direction with you in it. It will gain/lose speed depending on the usual factors. Whilst the minecart is in motion, you should press {{k|.}} to skip your turn; if you attempt to move whilst the minecart is still in motion, the laws of physics come into play, and you will take [[wound|damage]]. Alternatively, you can push the minecart whilst it's still in motion (although it's unclear how one can bend [[physics]] so as to push a moving minecart whilst inside the minecart). If you push it in the same direction you are already travelling in, you will greatly increase the minecart's velocity. You can also push it in different directions, and this will cause it to gradually change direction-the amount of pushes this requires depends on the minecart's velocity. Once the minecart has stopped moving, you may move out of it safely, or you may want to give it another push. Note that if you push a minecart right after having ridden it (still on the same tile as the minecart), it will act as though you chose to ''ride'' it.
  
=== Animals ===
+
If you want to test this out without creating an adventurer, the [[object testing arena]] allows you to spawn minecarts ({{k|k}}-{{k|c}}-{{k|n}})
Animals will ignore the automatic "Low" traffic order set by constructing minecart tracks, and will therefore tend to block minecarts. This can be bad for the animal if it fails to dodge the minecart and if the minecart is moving at a fast speed. Most of this problem is resolvable by [[pasture|pasturing]] the animals.
 
  
== As an item ==
+
== Forging and Melting ==
Minecarts are also a type of [[item]], similar to [[wheelbarrow]]s but unlike [[wagon]]s, which are [[creature]]s. They are stored in a [[furniture]] [[stockpile]]. Although they hold five times the amount wheelbarrows do, they are only one third larger. A no-quality minecart is identical in [[item value|value]] to a no-quality wheelbarrow of the same [[material]], however, the value may differ due to the [[item quality]].
+
* Metal minecarts cost '''two''' [[metal]] bars to forge, or '''one''' {{bug|6230}} [[adamantine]] wafer. (The latter is a bug in the smithing code - it's actually supposed to cost '''six'''.)
 +
* When a non-adamantine metal minecart is melted down, it will return '''1.8''' metal bars, for an '''efficiency of 90%'''.
 +
* When an adamantine minecart is melted down, it will produce '''1.8''' wafers, for an '''efficiency of 180%'''.
  
When falling, a minecart appears to cause no damage upon collision with a creature, possibly to allow cart "stacking" across Z-levels. {{verify}}
+
== Bugs ==
 +
*A dwarf will drop her [[child|baby]], if she has one, when boarding a minecart set to be ridden.
 +
*Dwarves have no concept of traffic safety and will walk into busy minecart lines to retrieve objects, often with deadly consequences. This is especially problematic in [[Swimming#Minecart_training|clever applications]] depending on dwarves riding the carts very frequently, because they have a bad habit of dumping their worn clothes on the tracks after a minecart ride. Adding an automatically-operated [[hatch cover]] at the end of such a ride can help prevent [[unfortunate accident]]s.
 +
*Tracks block wagon access to trade depots.{{bug|6040}}
 +
** This can be avoided by using [[bridge]]s, which also function as tracks (but do not block wagons).
 +
*Dwarves cannot guide a minecart through an unlocked door unless another dwarf opens the door.{{bug|6056}}
 +
*The game will crash after a while if a minecart assigned to a route gets [[Steals items|stolen]], [[trade|traded away]], or [[Melt item|melted]] at a [[smelter]].{{bug|6242}}
 +
*It is possible for a creature and minecart moving towards each other to pass without collision if they exchange tiles in the same tick.
 +
*After a minecart ride, a dwarf will sometimes haul the minecart to a storage stockpile, leaving another dwarf to haul the vehicle back to the route.
 +
*Minecarts falling onto a floor injure creatures in the tile below the floor.{{bug|6068}}
 +
*A minecart's initial velocity is not affected by weight, when pushed or launched from rollers.{{bug|6296}}
 +
*Removing a stop that has a vehicle waiting on it may cause the game to crash.{{bug|5980}}
  
As items, [[thief|thieves]] or even mischievous animals can steal minecarts, even when moving on a track. If a minecart is moving fast enough, or if it has a rider, these thieves will be unable to steal the minecarts.
+
{{Category|Fortress mode}}
 +
{{Category|Interface}}
  
 
[[ru:Minecart]]
 
[[ru:Minecart]]

Latest revision as of 19:15, 16 November 2014

This article is about an older version of DF.

A minecart is a tool used mostly for hauling, introduced in version 0.34.08. It can be made of wood at a carpenter's workshop or metal at a metalsmith's forge (using the metalcrafting labor.) Minecarts store up to five times as many items as wheelbarrows and are quite a bit faster than dwarves hauling objects by hand, but have the disadvantages of requiring a dedicated track network, a complex route planning phase, and the possibility of dwarves blundering into the path of carts filled with lead ore. Tracks may be carved into stone, or constructed; the latter allows above-ground routes, but these are more difficult to set up due to their additional material requirements.

Just like wheelbarrows, minecarts are considered items and are stored in a furniture stockpile. Despite their five-times-greater capacity, they are only 33% larger than wheelbarrows and are identical in base value when made from the same material (the value may differ due to the item quality). Thieves or even mischievous animals can steal minecarts, even when they are moving on a track[1]. However, minecarts moving fast enough or being ridden cannot be stolen.

Although most of the utility of minecarts is in fortress mode, an adventurer can also ride in a minecart. Adventurers can also pick up and relocate minecarts.

The invention of minecarts revolutionized the Science of Dwarfputing by enabling smaller, faster logic systems to be built.

Basic Minecart Usage[edit]

Minecarts can be used to swiftly transport dwarves, fluids, and/or large amounts of items, but before you have a functional minecart there are several preconditions that need to be met. First of all you need an actual minecart, constructed either in a carpenter's workshop or metalsmith's forge. For the minecart to be able to move you also need to carve or construct a track, which could be as simple as a straight line. Finally you need to construct stops on your track where the minecart will start and stop.

After you have created the stops and assigned a cart to the track, you must create logic routes connecting several stops and designate starting conditions for each stop. This is done with the hauling key. The most basic conditions are how the cart's movement is initiated and in which direction the cart should start moving. Carts can be either be Pushed (a dwarf stands at a stop and gives the cart a single push) or Guided (a dwarf continually pushes the cart forward, guiding it along the track). The hauling labor required for pushing and guiding carts is called "Push/Haul Vehicles" and is turned on by default.

To control which items to transport you can add conditions specifying: (1) which kind of items to be loaded, and unloaded, (2) stockpile links to define which stockpile(s) the items should be un/loaded to and from.

Capacity and weights[edit]

Minecarts have five times the capacity of wheelbarrows.

Examples of the capacity of one cart

Item Amount
stone 5
log 10
block/bar 83
prepared meals 500
spiked balls 500
mace 625
spears 1250
cloth 2500

The weight of the loaded minecart does not affect the initial velocity received from pushing or launching from a roller. However, the load of a minecart does affect whether a pressure plate triggers or not, based on the pressure plate's setting.

Weights of different carts

Type of cart Empty cart Fully loaded (items)
oaken minecart 28Γ 378Γ (10 oak logs)
platinum minecart 856Γ 10482Γ (gold bars)

Creating tracks[edit]

The tracks, which the minecarts travels on, can be built in two ways: Engraved/carved or constructed. The way the tracks are built is slightly different between the two, as explained below.

Simple tracks[edit]

Carved

A single-tile wide strip of natural stone can be designated to be carved (with d T), which will create a straight two-way track. The creation of corners, crossings, and T-junctions is as simple as designating another strip of track that overlaps an existent or newly designated track. Engraved tracks are removed by smoothing the rock they're on, which results in a smooth floor (that can be re-engraved if necessary), or by building a floor on top and subsequently removing it. Dwarves can carve corner tracks in one pass by designating the track carving twice and canceling unwanted carvings (with d x). Tracks can be engraved in any natural floor tile, rough, smooth and even over engravings, providing an easy method to remove low-quality or undesired floor engravings.

Constructed

Tracks can also be built as regular constructions (through b C T). This method is resource-expensive, since each track tile requires one stone, bar, or block for construction, and time-consuming, since you can't designate strips longer than 10 tiles at a time. Corners, crossings, T-junctions, and ramps also have to be designated individually. However, it is usually the only way to build tracks above ground or on soil (barring the creation of obsidian). Constructed tracks are designated for removal like any regular construction; be aware that removing track ramps built on top of natural ones will also remove the original ramp, leaving a flat floor.

Ramps[edit]

Carved

The carving of natural ramps is a little more confusing: to carve a two-way track on a ramp (natural only, does not work on constructed ramps), you must designate the track starting on the ramp and one square beyond in the direction you want the track to go. For the side of the ramp square you want to head upward, there must be either a natural or constructed wall in the square next to it, otherwise the game assumes you are trying to carve it on the same level -- this can result in the track being carved underneath a door or other object. If you have accidentally done this, you can correct it by smoothing the ramp and constructing a single square of wall next to it, then re-carving the ramp correctly. (However, the wall must stay there permanently; removing it will disconnect the track.)

Constructed

When constructing track ramps, the stated direction should be the same as the connected tracks. For example, a track going up from West to East would require, starting from the West, a Track (EW), a Track/Ramp (EW) and a Wall behind the ramp. Incorrectly placed ramps result in minecarts ignoring the ramp and crashing into the supporting wall. They will not, however, display as unusable as when the supporting wall is missing.

Examples of ramps

A simple ramp would look like this:

z +0   z +1
░░░░   ░░░░
═▲o    ░▼═
░░░░   ░░░░

o : wall

Carving track corners into ramps is rather unintuitive and complicated. Since engraving tracks always requires two tiles to connect in a straight line as input, you have to give two separate designations for a single job: a track bit from the ramp tile to the "below" direction and another one to the wall of the "upward" direction. If you wanted to change direction on a ramp from east to north:

z +0    z +1  
░░░░░   ░░░░░ 
░░░░░   ══╗░░ 
 =▲░░   ░░▼░░ 
░░░░░   ░░░░░ 

you would need to connect the ramp on z +0 both to the west and to the north by issuing two "carve track" commands, one selecting the ramp and the track tile to the west, and another connecting the ramp tile with the wall to the north. An engraver would then carve a NW track corner into the ramp, allowing carts to pass the corner correctly both going up and down. Such track corners are perfectly serviceable for guided carts, but moving down a route of several of them by pushed or ridden cart is problematic - the ramp-induced acceleration can easily lead to collisions with walls, dropping all contents of the cart and battering the rider.

Hauling route[edit]

The proper setting up of routes is essential for a working rail system. Routes, stops, departure conditions and stockpile links are managed from the hauling menu.

Route[edit]

New routes are created with the hauling key. Existing ones can be removed (without confirmation) with the x key, and also nicknamed. Before operating, the route must have at least one vehicle assigned to it (this can be done with either the route or a stop selected). Assigning a full minecart to a route may result in a slow hauling job if the contents are heavy.

Track stop[edit]

There are two types of stops. The first is the type you set in the hauling menu, by hitting s while highlighting the route (or a stop within) you've already designated. This designates a loading/unloading location for a minecart. For clarity in this section this will be referenced as a hauling stop, otherwise this gets confusing with Track Stops. The actual Track Stop, which is constructed via b C S, allows for slowing/halting of pushed and/or ridden carts as well as automated dumping.

Hauling stops are designated by moving the cursor on top of the desired tile and pressing the s key afterwards. They can be removed with and nicknamed with the same hotkeys as routes. Stops can also be reordered with the promote key. Without a definition, however, a stop is fairly useless: pressing the Enter key with a stop selected in the route menu opens its stop definition screen, from which departure conditions and stockpile links can be set up.

It is important to note that hauling stop order is enforced, even if there is no track. A dwarf will drag the cart overland back to a skipped stop in the route's list if your tracks bypass it somehow.

Each new stop get the same default conditions regardless of the track it is placed upon (e.g. guide the cart to the north). For this reason new stops might get marked by yellow exclamation marks (!) due to invalid directions.

Track stops are not mandatory; in fact, their main use is in automated rail systems. However, even in basic rail systems it can be useful to set a track stop to dump items: this saves time that dwarves would otherwise spend in removing items from the cart, time that is better spent driving the cart back to where it's needed. Dumping will occur even with a guided cart. Take care not to set track stops at a loading site to dump their contents, or dwarves will never be able to fill the cart.

Counter-intuitive to their construction method, track stops are considered buildings and must be removed by q x.

Stockpile links[edit]

By placing the cursor on top of a stockpile and using s, you can create stockpile links while defining a hauling stop. Links can also be redefined by selecting them, placing the cursor over a different stockpile, and pressing p. See More on Track stop

Departure condition[edit]

Departure conditions involve setting conditions in which the minecart will leave on the route. Each condition includes:

  1. A departure mode (Guide, Ride or Push).
  2. A departure direction (NSEW).
  3. A timer, before which the departure condition cannot be met.
  4. Conditions on the amount of items in the cart.

Departure conditions are created with the n key. A new departure condition will read: "guide north immediately when empty of desired items". This condition can be changed between basic presets with c. "Advanced" mode (C) allows for more precise control over departure conditions: fine tuning the percentage from 0 to 100 in 25% steps (f and F), switching it being either the maximum or the minimum amount of items for the condition to be met (m), and whether the cart accepts all or only a specific set of items (l). Common to both screens are the departure mode (p, Push, Ride or Guide), direction, and timer (t and T) options.

To have a cart only carry a specific set of items, the stop can be set to only carry "desired" items, opening the selection screen with the Enter key while having said stop condition selected, and toggling as desired, or it can simply be linked to a restricted stockpile and set to depart with any items.

Step-by-step tutorial[edit]

Let's construct a simple minecart route. This route will move stone blocks from an input stockpile to an output stockpile. We'll begin by creating the stockpiles:

Stockpiles designated.

The input stockpile is on the left; the output stockpile is on the right. We'll be moving blocks from left to right. Disable bins in both stockpiles, and set the input stockpile to accept only from links. Then make the stockpile take from the mason's workshop where the blocks are being produced.

Next, carve the track:

Track carving designation.

Note that the ends of the designation are uniquely shaped; this is automatic, and not anything you need to control. Now, wait for your engravers to come along and carve the track into the stone. (Your haulers will probably also fill up the input stockpile while you wait.)

In addition, while we're waiting for that to happen, we'll build an iron minecart in the forge.

Track carved.

When the track has been carved, it will look like the above (the track will be solid instead of flashing). Now, order a track stop to be constructed next to the output stockpile:

Track stop designation. Select dumping direction.

You must press d three times to select the dumping direction before placing the track stop. We want our blocks to be dumped into the output stockpile east of the track stop. Then wait for a mechanic to come along and build the track stop.

Track stop constructed.

Now we'll define the actual route. This is done in the hauling menu. Press r to begin defining a route. Next, move the cursor to the input end of the track, and then press s to define the first stop:

Stop 1 designation. Route definition, in progress.

Move the cursor again, to the output end of the track, and press s again to define the second stop:

Stop 2 designation. Route definition, two stops.
Stops are not defined yet.

There are several user interface features to note at this point. The stops have been positioned, but they haven't been defined yet, so there is a warning ! symbol by each of them. In the lower right corner, we see what the ! means. Also, note that the second stop is labeled in white, while the other two lines are grey. The white text is a selection indicator, and can be moved up and down by pressing +/-.

Next we need to define what our stops do. We want the minecart to be filled with blocks at the first stop, then travel to the second stop where it will dump its cargo, and then return. Press - to move the selection up to stop 1, and Enter to open it up. By default, the stop has three conditions:

Default stop definition.

We don't want any of these, so press x three times to delete them. This leaves us with a blank stop. Now we can add the conditions we actually want. Press n to begin adding the first condition, then d twice to change the direction from north to east. Then press c to change the condition from empty to full. This will instruct the minecart to be guided east when full of desired items.

To set the desired items, we create a stockpile link. Press s, then move the cursor to the input stockpile, then press p to select that stockpile. Now press Enter; this opens up a selection screen that resembles the stockpile customization screen. Move down to Blocks, enable them, then (if you wish) restrict it to stone blocks.

When you've done all that, stop 1 should look like this:

Stop 1, defined.

Stop 2 is much simpler. All we need to do is have the minecart return to the input stop. So, make a condition and change the direction:

Stop 2, defined.

Finally, we just have to assign our minecart. Go back to the route definition screen, and press v. Select the minecart, and press Enter.

Now we've got everything set up:

Route, fully defined.

The V is red because the minecart hasn't been moved onto the track yet. Some dwarf will have to haul it from the forge to the first stop, by hand; this will take a while, especially if the forge is far away.

Once the minecart is in place, dwarves should fill it with blocks from the input stockpile, which will in turn be filled with blocks from the workshop where your mason has been toiling dutifully. When the minecart is full, the blocks will be dumped into the 1x1 stockpile on the right. Automatic quantum dumping!

Troubleshooting[edit]

Because of the complexity of the system, all but the most careful and experienced minecart users will encounter issues. Most route issues can be diagnosed and fixed from the hauling menu.

Symptom: ! Set dir/connect track message appears to the right of one or more stops

Possible Causes:

  • The departure direction of the stop might be invalid. Edit the stop using Enter and pressd until it is pointing in a valid direction.
  • The track stop might not be built on top of a track. The track stop must be deconstructed to remedy this issue.
  • Your track might not be built correctly. Make sure all connected tracks between destinations are not one-way tracks.
    • This can be especially confusing with ramps. To carve a two-way track on a (natural) ramp, you must designate the ramp and one square beyond in the direction you want the track to go.
    • Ramps must have a solid block on the side opposite to the track, or they will neither work nor be marked as "unusable". The solid block can be natural or constructed.
  • The desired/kept items might not be configured correctly.

Symptom: The status 0% V always appears to the right of one stop.

Possible Causes:

  • The stop may not be set to take from a stockpile. Edit the Stop using Enter and make sure you see a message like "Take from Stockpile #1".
  • The take conditions must correspond with the contents of the stockpile.
  • The track stop may be set to dump. A track stop set to dump cannot be filled. You must either set the stop to a time-based departure or deconstruct the track stop and rebuild it without dumping.
  • Make sure the minecart itself has not been designated to be dumped (such as when using mass-dump).

Symptom: A dwarf picks up the minecart and carries it to its destination.

Danger[edit]

Minecarts are not without danger fun. Although designating a track automatically sets the traffic designation to low, dwarves may still walk on them, and creatures ignore traffic designations altogether. If an unlucky dwarf or creature fails to dodge a minecart, they can be injured. Most of this danger can be avoided by setting the minecart hauling commands to guide instead of push or ride, as dwarves guiding minecarts will ignore traffic restrictions, by pasturing domestic animals, and preventing the access of other creatures to the tracks. Note that removing the track doesn't reset that tile back to normal traffic priority, so you may wish to manually clean up traffic designation afterward. Also note that bridges that are used as tracks don't have their traffic priority changed automatically (since they're just normal bridges), which could cause dwarves to pathfind normally through dangerous minecart entrances in your fort's walls if you're not careful.

The only fooldwarf-proof method is to make the tracks inaccessible. There are several ways to create a track which works for minecarts but doesn't allow creature-traversal; the simplest is perhaps a single-tile hole. Minecarts moving at reasonable speed will jump the gap, while creatures will not. Other options include adding vertical drops, minecart-triggered doors, small pools of liquid (4/7 water or 2/7 magma), and hostile creatures overlooking the tracks. For safety, both ends of the track should be isolated, making the dangerous center sections completely inaccessible (though maintenance access can be provided by a locked door).

Danger does not always involve living victims: careless route designation can also result in minecarts careening off tracks or colliding with each other. If this occurs, the items may be scattered; this can cause even more hauling jobs than the minecart aimed to eliminate. Even better worse, scattered items, especially weapons, can injure passing dwarves or other creatures; in the words of Toady One the Great, "Accidental grapeshotting of the dining room should be possible now."

Of course, the danger of using minecarts means they can also be used as weapons by imaginative players.

Advanced usage and automation[edit]

Minecart-specific effects are implemented via track stops, rollers and pressure plates with "track" condition set. Since all three are considered buildings, they can't be built on the same square (however convenient track stop + pressure plate would be) nor a simple ramp, and are removed by q x.

More on Track stop[edit]

Track stops are constructions that allow further automation of minecart systems via adjustable features such as braking by friction and automatic dumping of contents. They can be built from logs, bars and blocks through b C S; friction amount, dumping toggle and dumping direction must be set before construction, and these settings can be neither changed nor seen thereafter; however, track stops can be linked to pressure plates or levers to toggle friction and dumping On or Off (trigger state is inverted: switch On = track stop Off).

If a stockpile is placed on the tile that a track stop is set to dump to, it can act as a quantum stockpile and any items dumped from a minecart that match the storage settings of the stockpile will remain there and accumulate. Normally trackstops are built on top of existing track to operate on moving minecarts, but they can also be used without tracks to create automatic quantum stockpiles (see also step-by-step tutorial). It is not always desirable to collect ALL of certain items into one quantum stockpile, such as when distributing a material to multiple separate industries. You can link your quantum stockpile to various other stockpiles, ensuring that your dwarves will keep them supplied as necessary. Because quantum stockpiles never fill up like regular stockpiles, it may be a good idea to add a switch to turn them off.

Items dumped from a minecart at a track stop (or dumped by any other means) into open space fall through z-levels until they land on a solid surface. Items falling onto a designated stockpile will automatically be considered part of that stockpile, even if the stockpile is set to disallow those items (they will, however, be automatically moved to a more appropriate stockpile, if available). Items falling on top of a minecart will not fall "inside" the minecart. Use with caution; dwarves have fragile skulls.Bug:5945

Automated propulsion[edit]

Roller[edit]

Main article: Roller

A roller is a powered machine component for the automated propulsion of minecarts. They are built over the top of existing tracks with bMr, requiring a mechanic, (length/4)+1 mechanisms and a rope. Rollers may also be placed directly on ramps to help pull carts up Z levels. Rollers are very useful to maintain a cart's momentum along long routes, to get them to climb Z-levels without dwarfpower involved, and to get them to reach speeds unattainable by guiding dwarves. These devices are variable-length (1-10), variable-direction and variable-speed (see below), all traits that can be set at construction time; a roller uses two units of power per tile it is long.

Single-tile rollers transfer power in all four cardinal directions, while other rollers generally only transfer power perpendicular to their activity direction. Longer rollers can also transfer power along their activity direction if built in the correct order, although this can be hard to accomplish and is easily broken. Rollers cannot be powered from above.

Rollers do not provide acceleration but rather set the cart's velocity to a new value: if a cart moves across an active roller in the direction the roller works and moves slower than the roller's specified speed, the cart will be set to the roller's speed. Carts going faster than the roller are unaffected. A cart going against a roller's movement direction will be sent back the way it came (once again at the roller's speed), unless it was moving extremely fast, well over derailing speed. A cart crossing over a roller perpendicular to its current movement direction will gain the roller's amount of speed in the perpendicular direction without directly changing its forward motion. Without an adjacent wall to constrict its movement, this will typically send a cart off the rails on a diagonal path, completely unable to follow any tracks until it collides with a wall or is otherwise brought to rest.

Because of their one-way nature, rollers are unsuitable for most two-way minecart tracks. However, a minecart set to be guided is not affected by rollers at all[2] — this allows a one-way track to be used in both directions. In addition, unpowered rollers do not affect minecarts.

Care must be taken in glaciers and other extremely cold biomes, since rollers (and the machinery used to power them) will not operate when constructed on natural ice floors.

Impulse ramps[edit]

Carts can be given momentum without rollers or changing z-level through a phenomenon called "impulse ramps". A track ramp which is connected both to a wall and to a floor will always accelerate a cart towards the connected floor tile, no matter where the cart enters the tile from. This means carts can be accelerated as though dropping z-levels, even if the cart doesn't actually change z-level at all.

Example of straight impulse acceleration:

: W a l l
: N o r m a l t r a c k
: T r a c k r a m p ( N E )

If a cart enters from the left, it will speed up on upward track and exit to the right going very very fast - more than one tile every step. If it enters from the right then it will bounce back impulsed by the ramp if it's going slow enough.

The other crazy thing about impulse ramps is that they produce slightly more acceleration than it takes to move a cart up one ramp. So you can just make an upward spiral alternating impulse ramps and regular upward ramps. It takes no power, is quick and cheap to build, requiring only channeling and track carving, and the cart goes up fast, but not so fast that it launches its contents.

Example of an impulse elevator:

z + 0 z + 1 z + 2 z + 3
: W a l l
, , , : T r a c k r a m p
: D o w n R a m p ( e m p t y s p a c e )


A sort of opposite effect to impulse ramps also exists: ramps lacking the proper "up" and "down" connections are treated as flat track, even if they actually go up or down z-levels. This allows building "anti-impulse" slopes consisting entirely of ramps only connected up, which a minecart can travel up forty levels and more, needing no more than a single push.

Controlling traffic[edit]

Switching[edit]

As constructions or tile features, doors and other furniture can be built on tracks. A door or floodgate can be turned on or off by a lever, effectively controlling the flow of automated minecarts. This may be dangerous fun, however.

      ->
A╞════RD════╡B


The roller 'R' pushes the cart east, but until the "departure condition" is fulfilled, the door 'D' remains closed and blocks the path.

Bridges can also act as tracks, but only if they're lowered or not retracted. This property can enable levers to turn tracks on and off. However, care should be taken to ensure that such bridges are never operated while a cart is on top of them, as the cart will be flung off the track. It's worth noting that it's often faster, and cheaper, to construct large bridges than long sections of constructed track.

A powered track switch can be constructed by building a T-junction as illustrated below.

     B╥                  B╥
      ║                   ║
      ║         ->        ║
      ║                   ║
A╞════╚════╡C       A╞════R════╡C

The 'R' is a roller pushing from East to West. If the cart is pushed East from the stop at 'A' while the roller is activated, it will arrive at 'B'. If the roller is not running, it will arrive at 'C'. The switch works by the roller first reversing the incoming cart's movement and the cart then following the track corner.

This switch is very reliable, reacts instantly to on/off signals, and carts of any speed can be switched by this design, although very fast carts will require rollers that are several tiles long, up to three. The requirement for power can be inconvenient or impractical. Non-powered solutions may use controlled derailment, or a connecting bridge.

     B╥
      ║
      ║
A╞════╝D ════╡C

Here the track between A and C is not continuous. The only continuous track is A->B, with a corner (not a T section). Fast moving carts will tend to derail at D and rejoin the track to C. Placing a door at D will prevent the derailment, so the cart continues to B. The door is operated by mechanisms elsewhere (typically, a lever, but some fun can be had with pressure plates).

Since it depends on derailing, this switch requires a very fast cart, faster than what can be achieved with rollers alone. To gain sufficient speed, a cart must be accelerated further, usually by descending several levels or through impulse ramps. The high speed makes the cart much more dangerous and harder to control.

If carts are moving too slowly to derail at the corner, a retractable bridge may be used as a connector between A and C.

     B╥
      ║
      ║
A╞════bbb════╡C

The bridge must overlap the corner. Bridges behave like a track crossing, allowing carts to pass in a straight line. When retracted, the corner reappears, so the carts will continue to B. Bridges take 100 steps to react to a signal, necessitating rather long "lead times" when switching tracks via bridge.

As mentioned above, special care must be taken to make sure the bridge doesn't change state while the cart is passing over it. Retracting bridges will throw the cart, causing it to stop dead. Raising bridges can even crush the cart.

Controlling Speed[edit]

Minecarts can reach extremely high speeds, especially when descending multiple Z-levels. A minecart will derail at a track corner if its speed exceeds 0.5 t/st (tiles per step), unless the route in the direction of travel is blocked:

Will derail at > 0.5 t/st:

in  ═╗-> 
    out

Will not derail at > 0.5 t/st:

in  ═╗O
     |
     v
    out

O is wall.

This behavior can be used to build a "speed limiter", that will ensure that when a minecart exits it is traveling below derail speed:

     OOOO     OOOOO        OOOOO
in  ═╔═╗O     O╔S╗O        O╔S╗O
out ═╬═╝O out ═╗═╝O    out ═╗═╝O
    O╚S╝O     O╚═╝═ in     O╚S╝O
    OOOOO     OOOO          ║OOO
                             in 

O is wall, S is a Track Stop set to High Friction or lower. If the minecart is traveling below derailment speed it will not be affected.

Loading liquids[edit]

Water and magma can also be loaded into minecarts by submerging them to a depth of at least 6/7, and dumped by a constructed track stop. Loading fluids onto minecarts can be difficult because their weight can slow the minecart down greatly. In addition, minecarts will not fill if they are moving too quickly. Curiously, filling a minecart with magma does not injure a dwarf riding it. A minecart will hold enough fluid to increase the depth of a single tile by 2. This amount is listed as 833 units, which weigh 459Γ (water) or 999Γ (magma). An iron or steel cart filled with magma weighs 1313Γ, while an adamantine cart filled with magma weighs 1007Γ.

Quirks[edit]

This little quirk concerns dwarf-managed minecarts and may or may not apply to automatic minecarts. If a track which was previously open becomes blocked (ex. flipping a switch connected to a floodgate you've built on the track to raise it) and the conditions for departure are met, instead of refusing to ride/guide the minecart or ride/guide it until it reaches the obstacle, the dwarf will pick up the minecart off the tracks and haul it to its scheduled destination on foot. If the distance is long enough and the weight of the cart heavy enough (due to being filled with heavy items such as stones), the dwarf may drop the cart because of fatigue/hunger/thirst before reaching the destination. This will cancel that vehicle setting job and make another dwarf come by and attempt to haul the cart to the nearest appropriate stockpile where another dwarf will pick up the cart and attempt to haul it to its initial stop. If the stockpile is far enough from initial stop, this second dwarf who is attempting to place the minecart on its tracks may also drop the minecart out of fatigue/hunger/thirst creating a loop that will go on until a dwarf with enough endurance manages to place the minecart where it belongs.

In fact, it seems dwarves are more than happy to attempt to carry a minecart from one stop to another even if just waiting until the track is open again would be the more sane option.

Dwarves will also carry a minecart to its next stop if the direction specified is incorrect (or invalid). This can often occur when using the default departure settings and forgetting to set the direction of each condition.

Dwarves can admire buildings while riding mine carts. Dwarves will not fall asleep during a ride (at least not from being drowsy). If riding on a continuous powered track loop, the dwarf will die of dehydration/starvation as they can not jump off to get sustenance[3]. Dwarves riding in submerged minecarts will gain experience in swimming.[4]

Physics[edit]

Minecart physics depend greatly on the departure mode set in the route stop conditions.

When set to "Push" or "Ride", minecarts will move according to the regular laws of momentum, gaining speed when going downhill, losing it slowly due to friction when on a flat plane, and more quickly when going uphill. In these modes, minecarts will move along the track in a straight line until they either run off the tracks or encounter a turn. A minecart will continue straight at a T junction if possible but if it is not possible the track is treated as a dead end and may jump track. The cart's behavior also depends on the weight of its contents (including fluids and dwarves): heavily loaded carts are harder to accelerate and to stop, and gain more momentum when going downhill. In either case, dwarves can not push nor ride an unpowered cart up a ramp, bouncing back the direction it came. At best, this is a waste of time; at worst, it will give your cart-pushing dwarf a fun surprise. To solve this, the player can either use Rollers (see below) or set the cart to be Guided.

The difference between "Push" and "Ride" is whether the dwarf will go along with the cart or not. When set to "Push", the dwarf will give the cart an initial push, not enough to go up a ramp, but enough to go some way along flat track, and the dwarf will remain at the first stop, ready for a new job. When set to "Ride", the dwarf will give the cart the same initial push and then hop aboard the cart riding with it to the next stop.

When set to "Guide", minecarts seem to ignore all laws of physics. They:

  • Ignore the weight of any and all items inside. Therefore:
    • Move at the speed of the dwarf that is guiding them. It is thus recommended to pick the most agile of your dwarves for cart-guiding tasks.
  • Ignore working rollers.
  • Will not collide with other guided carts even when a full frontal collision would be expected.
  • Will go up ramps like nobody's business.

This is therefore the recommended method of transport for simple non-powered rail systems, despite it diverting a dwarf from other, potentially more important tasks.

Some samples with behavior:

 A <-> B     A <-> C               A <-> B
   B╥          B╥                     B╥ 
    ║           ║                      ║ 
A╞══╝       A╞══╩══╡C              A╞══╬╗
            You can only go A->B       ╚╝
  Works      when the cart           Works     
             is in Guide mode.       

In the second example above, if you attempt to "Push" from B to A or C, the cart will go careening off of the tracks.

Skipping[edit]

If a minecart is moving fast enough, it can skip over water or magma, making splashes of mist (or magma mist) as it attempts to move on them horizontally. This horizontal movement is independent of the minecart and its content's weight.

Track Jumping[edit]

If a minecart encounters the end of the track or a T junction with no "exit" in its movement direction, it will simply leave the track and continue on its course in a straight line until it encounters an obstacle, slows to a stop, or encounters another (properly aligned) Track even if the tile at which it joins the new track instantly sends it around a corner.

Falling[edit]

When falling, a minecart appears to cause no damage upon collision, possibly to allow cart "stacking" across Z-levels.[5] A dwarf riding in a minecart that is dropped multiple z-levels suffers normal fall damage. Minecarts can fall through up/down stairs.

Stacking[edit]

If a minecart lands on top of another minecart, they may form a stack, with the upper cart on the z-level above the lower. Subsequent carts do not form a stack, but rather quantum stockpile in the same space. This behaviour is useful for megaprojects and trap design with minecarts as the weaponry.

These minecarts on the upper level generally need to be struck with another minecart to move out, or have their support removed. The latter option can be somewhat dangerous fun, however.

Numbers behind the scene[edit]

According to this post:

The minecart has a variable for speed. Speed is measured in tiles/100000 ticks, so a speed of one hundred thousand means one tile per tick. By going down a large number of ramps, a maximum speed of 270,000 can be reached, which presents the limit for most practical applications. Short bursts of (much) higher speeds are possible through carefully planned collisions of high-speed carts.

Every tick the cart accumulates distance units, as well as slows down depending on current tile (speed is reduced by "friction" of the tile). The cart will move to the next tile the tick before accumulating 100000 distance units, (or several tiles in case of great speed), then the leftover distance units are added to the default 100000 distance u. of the next tile. Since most deceleration and acceleration is applied per step, with the notable exception of corners, a cart going at twice the speed of another one can cover about four times the distance in a straight line, but only twice the distance along a winding track with very many corners.

A push will teleport a cart to the beginning of the next tile (NOT the middle!) in one tick with 19990 speed (10 speed is lost due to track friction), while a roller will accelerate a cart to roller speed, and it will start to accumulate regular track friction past the middle of the roller tile. Some track features will affect a minecart when it is past the middle of the previous tile: entering a ramp or a hole/drop will happen when the cart has left the middle of the previous tile, and the ramp will gain additional distance unit depending on the leftover units from the previous tile. When a cart leaves a ramp it will emerge after one tick in the middle of the next regular tile, so its entry coordinate is "50000-speed+friction". Rollers also affect the speed of minecart from the middle of the previous tile.

Friction of tiles:

Tile Friction Comment
Tracks 10
Ground/Floor 200
Unusable ramp 10
Upwards ramp 4910 (10+4900)
Downwards ramp -4890 (10-4900)
Corner track 10 Speed reduced by 1000 upon leaving the corner tile
Track stop (highest) 50000
Track stop (high) 10000
Track stop (medium) 500
Track stop (low) 50
Track stop (lowest) 10
Water Additional (WaterLevel - 1) * 100 See Skipping
Magma Additional (WaterLevel - 1) * 500
Empty space 0

Impulse sources:

Feature Speed
Push 20000
Roller lowest 10000
Roller low 20000
Roller medium 30000
Roller high 40000
Roller Highest 50000

Non-standard uses[edit]

Minecarts include some interesting characteristics that have motivated uses beyond hauling. They can be useful for creating fully-automated quantum stockpiles and garbage disposals. Storing perishable goods (meat, meals, etc.) inside a minecart appears to guard against rot and vermin. Minecarts trigger pressure plates, which means a trap can be designed to trigger when a thief attempts to steal a minecart.

Adventure mode[edit]

In addition to being used for hauling, minecarts can also be ridden in adventure mode. (Adapted from this forum thread)

  1. If the minecart is in your inventory, drop it. If it is already on the ground, proceed to step 2.
  2. Press u when you are 1 tile away from the minecart (or standing on the same tile as the minecart).
  3. You will be presented with the following options:
Minecart adventure mode menu.png
  • If you Push the minecart, it will move a few tiles in the direction you chose. Physics comes into play here, so it will gain/lose speed depending on the usual factors.
  • If you Ride the minecart, you will hop into the minecart, even if you were a tile away, and it will move in the chosen direction with you in it. It will gain/lose speed depending on the usual factors. Whilst the minecart is in motion, you should press . to skip your turn; if you attempt to move whilst the minecart is still in motion, the laws of physics come into play, and you will take damage. Alternatively, you can push the minecart whilst it's still in motion (although it's unclear how one can bend physics so as to push a moving minecart whilst inside the minecart). If you push it in the same direction you are already travelling in, you will greatly increase the minecart's velocity. You can also push it in different directions, and this will cause it to gradually change direction-the amount of pushes this requires depends on the minecart's velocity. Once the minecart has stopped moving, you may move out of it safely, or you may want to give it another push. Note that if you push a minecart right after having ridden it (still on the same tile as the minecart), it will act as though you chose to ride it.

If you want to test this out without creating an adventurer, the object testing arena allows you to spawn minecarts (k-c-n)

Forging and Melting[edit]

  • Metal minecarts cost two metal bars to forge, or one Bug:6230 adamantine wafer. (The latter is a bug in the smithing code - it's actually supposed to cost six.)
  • When a non-adamantine metal minecart is melted down, it will return 1.8 metal bars, for an efficiency of 90%.
  • When an adamantine minecart is melted down, it will produce 1.8 wafers, for an efficiency of 180%.

Bugs[edit]

  • A dwarf will drop her baby, if she has one, when boarding a minecart set to be ridden.
  • Dwarves have no concept of traffic safety and will walk into busy minecart lines to retrieve objects, often with deadly consequences. This is especially problematic in clever applications depending on dwarves riding the carts very frequently, because they have a bad habit of dumping their worn clothes on the tracks after a minecart ride. Adding an automatically-operated hatch cover at the end of such a ride can help prevent unfortunate accidents.
  • Tracks block wagon access to trade depots.Bug:6040
    • This can be avoided by using bridges, which also function as tracks (but do not block wagons).
  • Dwarves cannot guide a minecart through an unlocked door unless another dwarf opens the door.Bug:6056
  • The game will crash after a while if a minecart assigned to a route gets stolen, traded away, or melted at a smelter.Bug:6242
  • It is possible for a creature and minecart moving towards each other to pass without collision if they exchange tiles in the same tick.
  • After a minecart ride, a dwarf will sometimes haul the minecart to a storage stockpile, leaving another dwarf to haul the vehicle back to the route.
  • Minecarts falling onto a floor injure creatures in the tile below the floor.Bug:6068
  • A minecart's initial velocity is not affected by weight, when pushed or launched from rollers.Bug:6296
  • Removing a stop that has a vehicle waiting on it may cause the game to crash.Bug:5980