Dwarf Fortress

Dwarf Fortress

Not enough ratings
Hod's Simple Minecart Magma Loading
By Hodhandr
Aka "how to get magma into the damn minecarts with minimal loss of dwarfpower"

So you found magma, but it's in the caverns (or deeper) and a bit exposed, not to mention far from your stockpile.
Each magma-powered workshop need at least one tile of at least 4/7 magma in a hole below any of the perimeter tiles, so that's not so much. Can't be that hard, right?

Wrong. Pump stacks are expensive, both in material cost and performance. Magma pistons... I don't feel confident touching that, even with a hundred hours (so far) on Steam and hundreds before that.

How about minecarts? Setting up a basic route with an auto-dump track stop isn't that hard, but... how the heck do you get the magma into the cart in the first place? Without getting the cart stuck in magma?

Well, after reading up on the physics of minecarts and their operation, and a lot of experimentation, let me tell you!
   
Award
Favorite
Favorited
Unfavorite
Preface
First off: This guide touches on several huge topics, but I will not go into much detail to each, just enough to get a functional magma loading system with a single minecart which dumps its lava in one spot.
I will be linking to the wiki[dwarffortresswiki.org] and other resources where relevant, and I know of them.
Really, the wiki is your friend with anything DF related - I usually have several tabs open at all times, despite having clocked over a hundred hours on steam and many more before that. The official Discord[discord.gg] is also a good place to get answers, but please, try the wiki first.

This method of moving magma relies on a fairly simple mechanic:[dwarffortresswiki.org]
When a minecart is submerged in a 6/7 (or 7/7) tile of liquid, it will be filled with two units of liquid from that tile. This applies to water as well as magma, but water is much easier (and safer) to work with, especially with such small amounts - pond/pit zones plus buckets will to the same with water with much less effort.
The TL;DR
If you're a veteran and just want the blueprint with none of the explanation:


Z=0 (first tile above magma)

The 4 tiles from minecart to track stop are the ones that matter. Rotate as needed.

Z=-1 (highest tile with magma)

Any channel with magma will do. Safety-grate/bars and shutoff bridge for safety/maintenance recommended.


Track stop settings:
Default (no dump, max friction)

Route:
  • "Start" (minecart location): Push [into magma] immediately always
  • "Brakes" (track stop location): Guide [towards "Magma Dump"] track stop
  • "Magma dump" (wherever you need it): Guide to Stop1
Taking inventory
So, what do you need to follow this guide?
Well, obviously you need acces to magma. In this guide we'll be assuming you have magma with a surface below where you want it to go, so you can safely channel to it from above. If that is not the case, such as with a tall volcano, here's[dwarffortresswiki.org] some other resources you can use to learn how to safely tap the magma.
(Though if the magma's surface is higher than the target location, maybe just use gravity?)


But what else? No much, actually, but working with magma does mean certain things must be magma-safe[dwarffortresswiki.org].

Something to build with
Doesn't need to be magma-safe, and can be anything. Wood, clay, stone, gold, you name it.

One magma-safe minecart
Sadly no wood*, so the easiest route is closed, so a metal minecart of nickel, iron, or platinum is the way to go.
* Some speak of a mushroom-tree called "Nethercap" in the deep caverns

Dwarf power
You didn't think you could build or operate this without at least one dwarf, did you? Oh, and you'll need to do some digging, so you'll need one of them to be a miner with a pick.

Safety and maintenance
Optional, but for safety you probably want:
  • One magma-safe metal bar or grate
  • One magma-safe building material for a bridge
  • At least one magma-safe mechanism for connecting to the bridge.
  • Magma-safe components for a pump
Of these, the bar/grate is the simplest and "most necessary" and will keep you safe against most things (magma crabs...).
The bridge in the magma helps with safety, but the bigger reason is for closing the magma flow in case a cart gets stuck, or maintenance in general.
The pump is just for maintenance. Much cheaper than a whole stack, and you probably want one available when working with magma anyway.
Some info about magma and magma workshops
The surface of the magma looks like this, with varying brightness:


Sub-surface it will look like this, with even brightness:

...but it might have a bunch of 7's if you have enabled "show water/magma depth".

I recommend turning this on if you haven't already. It has the hotkey ' f ', and this icon next to the minimap:


You need a depth of 4/7 under at least one tile along the perimeter of the workshop, ie, the outer tiles. Extra tiles have no effect, and the center must have a solid block. Each minecart will move 2 units of magma at a time, meaning that once the target depth has been reached, one more minecart can safely dump its load. After that... roasted dwarves.

As mentioned we'll be assuming the surface of the magma is below your target location, so we can tap it from above. From here on out, we will consider the first tile of air above the magma to be Z=0, and the topmost tile of magma to be Z=-1.
Tips and notes
If you absolutely need to stop a dwarf from doing something with the minecart, now, find the minecart and forbid it (little lock icon). You can permit it again immediately, or when whatever was a problem is fixed.

If you lose track of the minecart (especially if its invisible after filling with magma), use the "Stocks" menu/list at the top bar and just search for "[material] minecart" to find out where it is. Some smart guy might have decided to carry it somewhere...

Minecart route "Stops" and "track stops" are not the same. You can have a route stop without a track stop, and vice versa. if your cart is moving by physics ("Push" or "Ride" orders), you should have a route stop for any track stop with high enough friction to stop the cart, or your dwarves will come to finish the route... by picking up the cart and hauling it to the destination. Even if there's perfectly fine tracks going there.

Magma is dangerous. !!FUN!! you might even say. Moving minecarts (that are not in "Guide" mode or hauled) are also dangerous. Moving minecarts with magma... Well, let's just say it's a potential weapon as much as potential way your dwarves can blunder their way to death.

Magma (very slowly) evaporates if it is 1/7 deep. That means that if you spill one cartload somewhere, it should sort itself out in due time. It also means that if the route is long enough, some magma in the workshop pit might evaporate if you use a 2x2 pit like me. That's not really a problem, but if you don't like seeing three tiles of 4/5 and one 5/5 moving around, maybe just do single-tile pits.

Magma, like water, also flows diagonally, albeit slower. Be careful so you don't break into magma before you're ready.

If your minecart does get stuck in magma you'll have to close off the channel and pump out the magma. Closing off is why we have the bridge, and at least you only need one screw pump for that, not a full stack...
Building the room
First, dig out a 4x1 or bigger area. I recommend at least 5 long for "moving minecart and magma" reasons, but a 4 long straight will do.








Second, build a 2-long channel. It needs one open tile on each side, consider it the middle of the 4x1 line.








[Z=-1] On the level below, dig from the channels to one tile away from magma. Warning: Magma, like water can flow diagonally, so make sure you don't accidentally give your dwarves a scalding bath.


Finally, carve or build tracks across the channel. You probably want the tracks leading to both sides of the 4x1 strip, too.

In addition, build one track stop with default settings (no dumping, maximum friction) at one end of the strip. it does not need to be magma-safe.

You probably want this to be the side dwarves are least likely to be at for safety reasons. If you are constructing tracks rather than carving them, you need to wait for the tracks to be finished before you can place it.
Optional: Safety and maintenance
This part is optional, but strongly recommended.

[Z=-1] Remember this area?
I will have magma flowing from the left here, to the ramps to the right



Put a magma-safe bar/grate between the tile the magma will flow into and the ramps, and keep in mind that magma can flow diagonally. Inside that, put a magma-safe bridge, facing outwards.
In other words:
magma -> grate -> bridge -> ramps

[Z=-1] Lower level with safety&maintenance put in place.




Somewhere else, put a lever (deos not need to be magma-safe).
Link said lever to the bridge in the magma channel using a magma-safe mechanism for the target.

When that's done, test it so you know it works, and double-check that the bridge is made of a magma-safe material... and the mechanism in it is, too.




Linking using magma-safe mechanisms
If you have trouble having it use your magma-safe mechanisms, you can make and link a stockpile to it using this icon on the lever, top right next to the quill(writing feather). Use the icon with the arrow pointing towards the workship, in case that's not obvious.
While at it, click the quill and rename/label the lever so you remember what it does later!

The settings should the stockpile should be: Custom->none
Under Furniture, allow any Core and Total Quality. (Maybe not artifact, those can be better used elsewhere).
Under "Type", allow "Mechanisms". And for "Stone/Clay", and/or "Metal", enable ONLY your magma-safe materials.
Linking material-/quality-specified stockpiles to workshops can be very handy for various things, and especially "Magma-safe Mechanisms", if you're working with magma.
Minecart routes 101
The panel for minecart routes can be opened with the hotbar at the bottom, or the hotkey 'H' (that's uppercase, so shift+h).

Your first minecart stop
To begin, add a new route, and rename it using the quill to "Magma Delivery" or something.

Add a new stop (icon left of "minecart+") and place on the opposite side of the channel compared to the track stop you build earlier. Click the "Conditions" icon (math symbols) and remove everything.

Add a new condition.
- Change to "push" mode by clicking the person pushing a cart.
- Change to "always" by clicking the <= icon
- Change the direction to be pushed into the pit by clicking the arrow
It should now say "Push off [your direction] immediately always (at least 0%)"

Second stop
Before adding your second stop, click it and rename it to "Magma Brakes" or something.
Then add a new stop on the track stop. It will get the same name!
Replace all conditions with "Guide [direction] immediately always" where direction is the tracks going towards your magma delivery area and/or back to the "Start" stop (but not into the magma!)
In my case that's east.

Testing
Now just add your magma-safe minecart using the "Minecart+" icon and let it run.
You should see your dwarves push it down into the pit (and it will roll back up), and then guide it around back to start if your tracks let them - otherwise they'll just pick it up and haul it.

"Pausing" the stop
Then, for the "Start" stop, click the plus icon to change the condition so becomes "Push off [your direction] immediately when full of desired items". This will stop them from wasting their time and/or causing accidents while you do the rest of the stuff. They should place it on the "Start" stop and then not touch it.
Later, when you want to re-activate the stop, just invert the condition and it should become "immediately always" again.

Breaching the magma and filling the cart
It is time to breach the magma!
Caution: This guide assumes the topmost magma tile is at Z=-1, so the tile with the room is safely above the magma. If this is not the case, see the links under "Taking inventory"

Find the tile you want to mine, in my case the one south of the empty tile here.

Then, on the level above, order the tile above to be channeled. Mine a path there if you haven't already.



Now is a good time to make a manual save if you aren't sure you did it right - once the magma is breached, you can't undo!

Let them mine it out, and see the channel fill.

Then construct a wall in the tile you just opened you you don't have a hole in your defenses. Technically the wall can be just about any material, but I went with a mica block, my (primary) local magma-safe stone.



Success!



And/or roasted dwarves. But such is the price of progress (and learning as you go).

Now we re-enable the minecart stop...

Pause, pause!



Where did the minecart go?

As of the time of writing (v50.05) there's a bug/missing texture, so magma-filled minecarts are invisible. If you mouse over the stop, you will find that the minecart is there, and if you click it, it will be filled with 833 units of magma. Which is 2/7 worth.Don't ask me about the math there.

If you don't do anything else they will keep pushing the cart, round'n'round. Maybe change a condition so they stop it for now?
One smoking hot delivery, coming up
Now you just need a location to bring the magma to. It can be a single 1x1 hole for a single workshop, but I'll be using a 2x2 hole supporting 4 workshops:




You need a track stop orthogonally (driectly) adjacent to the hole, and set it to dump in the direction of the hole In my case I need to dump south, so the settings look like this.

Then, add a third stop to the minecart route, on the new track stop. I labeled mine "Magma dump". Remove all conditions, and give it a new one: "Guide [track direction back to magma source] immediately always"

Double check that there is continuous tracks between the second stop (the one after filling with magma), and then add a new condition to the second stop: "Guide [track direction to magma dump] immediately always".

If you're not sure you did everything right, now might be a good time to manually save so you can roll back if something is messed up.

And then... just let it play.



Congratulations you have moved two units of magma to (hopefully) where you wanted/needed it. Assuming you set up everything correctly, your dwarves should continue brining up magma with minimal oversight. Just make sure you pay enough attention to stop them before they overfill. Workshops need one tile tile of be at least 4/7 to work, and gets no benefit from any more. One tile can only hold 7/7, and going higher will overflow, which could be... unfortunate.
Changelog
2023-01-20: Added short information about how/why this works and fixed some typos.
2023-01-06: Reworked with simpler and easier design. Reorganised chapters and text somewhat. Added a couple new tips.
14 Comments
McOrigin 21 Feb, 2023 @ 3:08pm 
I did not know you could fill mine carts in a stockpile and then haul those filled minecarts to a different stockpile. That's neat! Thanks for the idea.
Terrakotta 14 Feb, 2023 @ 10:06am 
Well, i prefer to make iron minecart stockpile, submerge it with in lava with pump, pump out the lava (not back to magma sea or first pump will get submerged in lava, just destroy it with bridge or leave it in a separate room), designate new iron minecart stockpile with few wheelcarts where i want to set up my whatever (workshops, swimming pool for nobles, you know, whatever) that takes from first stockpile and done, dwarfs will quickly bring the lava where i need it with wheelcarts and it scales with number of minecarts i make.

Sadly it means I need to micromanage the output as I need to manually tell dwarfs to change minecart to a full one (so no lava moats this way), but its not that much harder from keeping dwarfes from filling the hole more than 3 times in your auto version. As a bonus I can set the output anywhere where I want it (like a surface) without need to build tracks all the way to it, wheelcarts replace that.
Hodhandr  [author] 26 Jan, 2023 @ 8:41am 
That's what I though too - that or a bunch of down-ramps (impluse or not), but research and experimentation shows that nope, don't need those!
This is so much simpler and easier. And it works!
scottbot 25 Jan, 2023 @ 2:00pm 
Wait so pushing the cart will give it enough momentum to pop up the opposite hill with a full cart of magma? I figured I’d need powered rollers for a case like this.
Been doing something similar except w/ a manual drain and waiting for the magma to evaporate before guiding the cart out of the pit
Hodhandr  [author] 22 Jan, 2023 @ 11:58pm 
Uh, I believe what you're explaining is the states of matter called "liquid" and then "solid", am I right?
Unfortunately, while my dwarves don't care about the heat from magma, they don't particularly like temperatures lower than 200K, much less then 63K to freeze the air, so I think I'll stick to just building tracks in the air if I need that :P
Old Man Jenkins 22 Jan, 2023 @ 8:08am 
You have to have REALLY dense air. The air has to be so dense that the atoms go from bouncing around to loosely bonded together but with some space between them so they can move around each other. From there you have to condense it even further (I usually use a combination of higher pressure and lower temperature) until the air is SO dense that the atoms stop moving around and settle into a regular formation. From there it's usually pretty easy to carve into it, just heat up the parts you wanna carve into a track!
Hodhandr  [author] 20 Jan, 2023 @ 11:40am 
I mean, if you can carve the tracks in the air, I'd be rather impressed.
But do tell me how you achieved it!
We've all been there with facepalm moments :P
Old Man Jenkins 20 Jan, 2023 @ 10:04am 
Ohhhh I see it now *facepalm*. I didn't see that the tracks were carved in the channel, I thought they were on top of the magma channel, that makes a ton of sense.
Hodhandr  [author] 20 Jan, 2023 @ 2:44am 
@Old Man Jenkins: A minecart submerged in 6/7 (or 7/7 magma) will be filled with 2 units of magma. Same applies with water, but that's a LOT easier (and generally less dangerous) to move.

I mentioned this in the previous version, but apparently I removed it and didn't re-add it anywhere. Oops!
Updated the guide to have this -slightly- important information.
Old Man Jenkins 19 Jan, 2023 @ 8:28am 
In general I think it's an elegant design. I'm a big fan of simplicity, and I don't really see anywhere you could make this simpler. Apart from buttfucking your framerate, the other issue with a pump stack is you still have to get the magma were you want it.

I've read through the guide a couple times, though, and maybe I'm missing something but I don't see how the magma actually gets into the cart. It's in a channel below the track, but how does it end up in the minecart? Also I did the math and if 833 units is 2/7 then 1/7 is 416.5, meaning a full tile of magma is 2915.5 units.

@NissaAnimist what happened with your setup?