Advice on mass-digging projects
(If you have any digging-related questions, just ask away on the talk/discussion page, or PM me on the Bay12 forums. I think this is mostly all still relevant to 0.31, but as it was written for 40d, if there are minor discrepancies... my bad guys)
Did a thing a while ago that was substantially difficult to dig out. It involved about a million pieces of stone, winding, suspended walkways, large open-air caverns, variably widening and closing ceilings for little pocket caverns, slowly curving arches, and a whole bunch of other things like that. So compiled is a bunch of advice I've garnered from my experiences, largely copy/pasted from the aforelinked thread. FYI, all references I make to 'the fort,' 'the cavern,' etc. are just basically referring to a big cavern I dug in a fort of mine.
How many miners should I enlist?
It is absolutely possible to have too many miners. Simple 1z side-tunnel designations can take forever when you have every miner wanting to take turns digging out a piece of a tiny area from hundreds of tiles away – one by one, in order. A team of 33, which is what I had for both halves of the main fort, is far too many. Due to pathing, a dwarf can dig its way deep into a designated area and then find itself 2 whole tiles away from another chunk of stone – and then run all the way back to the northwest-most designation to start over, often deciding to change z-levels as well and run to a distant stairwell too. When you have this many miners working for you, they frequently dig out all the stone around each other and spend most of their time running back and forth instead of digging.
A good number of miners for a project of any substantial size would be around 4-10. It may not seem like that many, but if your miners are getting crowded, they dig each other out of stone and cause the aforementioned pathing lag.
Is it okay to cheat on a project like this?
In some cases, yes. It is absolutely necessary to give your dwarves [SPEED:0], for example, even if it's just for the period of time in which you are digging out the project. Things like this can take an unreasonably long time - for example, the two halves of the main cavern took me about a week each in real-time. Playing at regular speed would simply make this impossible to accomplish. You will also likely need to edit some stone in the raws, as mentioned below. You will also realistically have to use Dtil's Unpause utility; it will take a very long time to dig out the cavern and it's best to simply leave DF unpaused and minimized while you do other things (with a good amount of food, booze, and defense prepared in advance) so the endless hordes of 'you have struck ___!' popups can be avoided. Be careful if you know there's hidden features within your designated area, of course. Cheating is generally frowned upon, but as these changes make the project possible, they are acceptable.
How do I get rid of all this loose stone? My FPS is crying!
You will probably dig out a couple hundred thousand stone undertaking this. I myself dug out what I calculate to be a little over a million, which for reference is enough to build Flarechannel twice. There are a few ways to get rid of all this loose crap, all of which you will probably have to use.
- Favoured Profession: Refuse Hauler: Using Dwarf Therapist, turn on refuse hauling on everybody you can spare, including the miners (who should be done digging when you begin dumping). Getting rid of stone is your top priority in order to keep a fort like this within a manageable FPS range. Leave your administration, military (obviously) and food/drink dwarves free and enlist everyone else. Your dwarves should also have [SPEED:0] as mentioned above.
- Atom Smashing: Before you start dumping it's a good idea to place a 3x2 drawbridge in the center of the dumping area and raise it, then placing a 2x2 dumping zone in the crushing area. When you're done make absolutely sure there's nobody on or near the bridge, then smush everything and deconstruct the thing.
- Wanted: Chasm Tiles: Disclaimer-- this note is only applicable for version 40d. I don't care if you embark with a chasm, a bottomless pit, a magma pipe, or an underground river: You absolutely need somewhere to dump things where it will disappear forever and not simply accumulate. I suggest UG rivers personally because their chasms are small and manageable plus can be easily worked into the architecture of the fort plus the water supply is handy. If you use a magma pipe, remember to extend a bridge out or something to make sure that your dwarves are dumping their items directly into the 'lava flow' tiles and not onto the rocky floor of the pipe.
- Clearance Sale: Everything Must Go!: If you don't need it, do away with it. Towards the end of Undergrotto I had finished furnishing all my rooms and so forth, and decided to chasm every bit of furniture I had that wasn't masterwork. This isn't all that necessary, but I was dawdling between 0 and 3 FPS so every little bit helped. If you need FPS that badly it's also a reasonable idea to figure out what you need and how much and only make exactly that much.
- Magic Vaporizing Stone: This is the big one, and out of all the methods the most absolutely necessary. From the beginning of the game, if you're starting fresh rather than beginning a project like this in a pre-existing fort, pick a sort-of rare large stone cluster type and make absolutely everything out of that. Use the Economic Stone mod to help with this if you like. This is to make sure that when you destroy all that loose rock you won't also vaporize masterworks or more importantly mechanisms, mechanized furnishings, or pumps. Once you are done digging, open up your raws and set all the undesirable stone types (esp. the layer stone) to have [MELTINGPOINT_10000] and [BOILINGPOINT_10010]. It's important to leave this until you're done digging; the FPS hit will be a big one rather than a continuous one this way. Now reload the game and press '.' to forwards everything one frame. Go and get some food. When you come back, the screen will be filled with pleasant red mist and you can unpause. Once the mist is gone, go back into the raws and remove the tokens. It's a very good idea to save a backup before you do this.
And as a bonus pre-digging aid:
- Softcore Rock: Giving rock types the [SOIL] tag may or may not cause them to stop dropping stone - it's kind of random due to weird biome interactions. However, it's worth a try; and additionally is faster to dig out so generally worth it.
What kind of digging designations should I use?
There are three methods: Using up/down stairs and channelling out from above, using regular digging designations and mass-collapsing the whole thing afterwards, and starting from the top and slowly ramping downwards. Each has its own pros and cons and is suited for different situations.
- Up/Down Stairs and Channelling
This is the most arduous method and also the one I recommend. IMO it's absolutely worth it if you have the patience. Areas that will eventually become flat, designate as up-stairs. Ramps can be designated as ramps, but remember to leave undesignated squares above them. And everything else is up/down stairs. The main pro to this is obviously access, as you basically have flying dwarves. Plus if you want to do anything crazy like smooth and engrave the whole cavern it works really well. The obvious downside is that you have to channel everything away from the top down, which effectively means you have to designate everything twice, but for access purposes it's unbeatable so I think it's worth it. To avoid cave-ins, you just have to channel out all the stairs directly above all the ramps; if you don't do this, there's a pretty good chance that the dwarves will channel out a layer from below and leave the stairs directly above the ramps floating there, and ka-boom. You really just have to be careful that nobody tantrums on the stairs, since if your dwarves fall or trip or something, it's a long way down.
The best choice for a project like this, or any other asymmetrical cavern of variable width and height.
- Regular Digging and Mass-Collapsing
The main problem with this is that you have to leave access stairwells between floors, which causes your miners to waste probably 7/10 or something of their time on the job running back and forth between their mining spot and the stairwell since they will want to change floors every time they decide to dig elsewhere. If you designate everything at once you can just slowly add to the access stairwell one level at a time as they finish each level to avoid that problem, but then your issue becomes regular access: If you have ramps between levels for the final product, unless you leave out designating them to the end your miners will be able to sidestep your controlled stairwell access. You could use a different method for the levels that dwarves will be walking around and then using this method for the purely open-air levels, but then you have to worry about killing everyone below when you collapse it, so it's not so handy there. Also collapsed floors will destroy your pretty natural ramps, and it's not fun designating channels above your ramps on every single level in order to protect them. All you have to do when you're done is channel out all supporting tiles on each level, which doesn't take too long, and then get rid of the access stairwell and clear out your dwarves. Avoiding cave-ins isn't really an issue because you're kind of going that direction. It's also very unlikely you'll accidentally cause them.
Not so great for caverns, but works fine for square and cubic rooms.
- Ramping Downwards
This method is generally pretty terrible for this sort of project. For one thing, you can't designate everything at once, which for planning purposes is absolutely necessary. You're also really likely to mess up and accidentally carve out more than you should by ramping below a ceiling you wanted to keep. I've used this a lot, and if you really want to the trick is to use regular dig designations at the edges of the ramping area as your cavern opens up downwards. It's a huge pain in the ass to remember, too. There are numerous other downsides to this, too, like the fact that ramp-carving is way more laggy than other dig methods, and the likelihood of causing cave-ins through easy mistakes. I also need to stress again that you never dig out more than one floor at a time with this no matter what, since that's a good way to kill some of your miners. There are also a lot of rules to using ramps and you might cut off your miners from food, booze, and beds if you're not familiar with them.
Good for digging outdoor pits and sometimes 2z or 3z-high rooms. Otherwise avoid.
How do I plan out something like this?
Digging out square areas is easy to plan regardless of how many rooms and offshoot tunnels you have. This goes double if your rooms are the same shape from top to bottom, no matter how high they extend. When you want to create natural curving rooms that open up and taper non-uniformly at many different points, the difficulty level rises high enough to spit on your house from here.
The first thing you need to do is a flat layout sketch of where you want things to be. You can ignore height here; in between plateaus simply outline the area you'll be adding ramps to in a shade of gray and assume you'll figure out the difference later. This is the (crappy) rough layout sketch for Undergrotto: http://img695.imageshack.us/img695/541/img2199n.jpg. To determine what level your plateaus are going to be, sketch them out separately in a profile shot - you should already have an idea of what's going to be higher than what. A few heightmapping sketch for Undergrotto are here: http://img294.imageshack.us/img294/7189/img2201w.jpg. Try and estimate the difference between the plateaus and assign one of them an arbitrary level number from your game (ie. I picked 134 as the lowest level of the cavern, 4z above the map's bottom, and figured everything out from there). Now you can go back to the layout map and scribble the numbers onto each plateau for future reference. It's designating time!
You can certainly plan everything in MS Paint layer-by-layer or in some sort of 3D planner but good luck copying your designation out tile-by tile over a massive space like this, so here’s my advice: Outline everything on the bottom-most z-level you're using. For plateaus, use designation type A (in this case I used regular dig designations) and sometimes B if you have two that are side-by side (maybe up/down stairs), and use a third separate designation to mark the soon-to-be winding rampways connecting these together (anything but actual ramps, try channels). Everything should be all on the one layer when you're done. Once you’ve decided what height you want each plateau to be, go to the rampway designated spots and mark off ramps from one plateau to the other using as many sets of ramps as needed to match the height difference. Place your ramps as if they needed support – don’t miss the diagonals; visualizers connect any ramp touching a wall tile and the effect looks great. Now what you need to do is copy this large designation mark for mark up a z-level at a time, copying everything except the stuff that’s reached its proper floor (you could jump more z-levels at a time but it’s a lot harder to copy up multiple-z than it is to go one at a time). Once everything’s been placed, black out the extra copies of certain layers you made so nothing overlaps and everything’s on its right layer. Then change all the non-ramp designations to up-tile designations. This is tedious. Your designated area should look something like this.
Now you get to fill in all the empty space between up-stairs and ramp designations with up-down stair designations. This takes a while too, sorry. Continue up keeping the walls the same shape until you've reached the topmost plateau for simplicity; from there you can taper away the tops of each pocket of the cavern. The exact shape of your cavern is really at your discretion; personally I have a lot of experience with MS Paint and I hand-design all my circles, so I based the slow tapers of my ceilings off of that knowledge. Slow curves are pretty, though. At this stage I suggest uploading your designation map to the DFMA so you can zoom out and look at everything to make sure it’s right. This is effectively a photo-negative of your cavern. Mine looked like this for the bottom half of the cavern and this for the top.
It’s time to dig. Due to weird pathfinding, your miners will probably work their way towards the north-western end of your designations and slowly move their way up z-level by z-level until they start over from the bottom again. When you’re finally done, remove the last up-stairs while avoiding removing the natural ramps and pop open a visualizer to check out your cavern!
Other random yet useful stuff
Weaponizing and Farming Fish
Working from my experiments here: http://www.bay12games.com/forum/index.php?topic=51538.msg1106553#msg1106553. Still need to test it out; gonna need to see how the buggers do against actual enemies but the regular pet-farming side is worked out. I'll expand this section to include everything important from the link when I'm done.
The original idea: I had wanted to see about the practicalities of catching and taming fish (specifically carp) and letting them swim in channels beside the dwarves of the fort. Then I would try and turn them into war/hunting fish and leave them in the moat for defense. To allow the dwarves and carp to interact I would have a raised 3/7-filled room with a kennel in it that would sit above the 7/7 waterways where the carp could be collected and dragged to be trained further. My first attempt at this led to a number of findings. I reference carp specifically, but this applies to all fish.
- Carp drown in water less than 4/7. In order to keep the carp from drowning in the cages, they must be caught at a level of 4/7+. This allows the cages (wooden or otherwise all work equally well) to be transported anywhere without the carp drowning as it enters a sort of statis while caged. If caught in 3/7 or less water, it will continue drowning in its cage and you will have a lovely corpse to display.
- Animals are trained directly at their cages, and as this does not trigger the "oh fuck im not in the water" response there's no drowning concerns. It is thus easy to farm fish; in the case of sturgeon, which are huge and have a nice pet value, this can be highly profitable. Also a good aesthetic for a portside fortress.
- Unless you want to set up a big floodgate/door system, the best way to catch carp is from ponds. To keep the water level high enough it is important that the room below is smaller than the pond you are draining. Just litter the floor with cages and a single up-stair and channel it out from under when you're ready. Afterwards, drain and collect. In my test all but one fell through and into the cages, though I don't think there's a way to make this process work in a non-luck-based way.
- Dwarves can swim/walk freely in 3/7 and below water, but refuse to go into 4/7 water (it's a myth that they will, it's =< 3/7 or bust), and carp drown in anything less than 4/7 water. Therefore it is impossible to have 'meeting' points between the dwarf half and the carp half. This makes having a 4/7 room a waste, and it a better tactic to just put the things into 7/7 water.
- It is absolutely possible to have an accessible 4/7 (or any water level really) room above a 7/7 tunnel with other open spots - just use a baffle (diagonal tile) to keep the taller room from depressurizing. The tunnels will still be perfectly accessible. However due to the previous point making a room like this is purposeless.
- Carp cannot be war/hunting-trained, but can be tamed easily. You can tame a creature fine while it's caged, but for advanced training you need to drag the pet to the kennels, which is impossible with the water differences.
- Carp cannot be adopted if uncaged. Even a dwarf with swimming raw'd in forced to stand beside the carp will forego regular activity because the water is there. And if the dwarf is not in the water with the carp they cannot see/path to the carp and thus will not adopt them. This is due to how pathfinding is hard-coded into the game for deep water (4/7+); the dwarf simply cannot accept that there is anything in a deep-water tile.
- It may be possible to get a carp-preferring dwarf to adopt a caged carp. No results yet but testing in progress.
- Carp are boring as shit. Because underwater meeting zones don't count as meeting-zone-eligible tiles, carp will not path to hang out in the water where you want them to. They will in effect sit exactly where they were released FOREVER unless chased by enemies.
- An unskilled hauler can drag a fish a little over 40 tiles before it air-drowns, which probably makes it safe to pit your carp from up to 30 tiles away, but for the safety of the fish it's better to build the cage closer and then remove it. If you don't want to tame a hostile fish, you should definitely build the cage directly beside the pit.
However, these findings led to a different idea: Weaponization. We all know fish, notably carp, are overpowered and will fight back fiercely if they have nowhere to run. By pitting carp into 1x1 pits of water (even as stray without war training) we have carp that will always fight back, always being cornered. This makes the 8 tiles surrounding the pit a potential attack zone, and by placing these pits at 3 tile intervals we can create a pit-field that enemies will constantly be threatened in. In order to allow for wagon accessibility, a winding path through the field can be created; it is winding so that enemies have no direct line into the fortress that will not take them into the danger zone.
The benefits of such a defense are thus: Your defender cannot be pathed to, so enemies will not attack them until attacked (or standing adjacent if an archer). The defender immediately feels threatened and pulls the (let's say... kobold) into the water. The defender attacks repeatedly while the kobold panics and tries to escape from drowning. Your defender now has a name, and soon a title. Meanwhile, no other enemies in its squad know what attacked their friend nor that there ARE any enemies around and continue on their merry way, horror-movie-style. If injured, the carp is still able to perform its duties admirably; if killed it is easily replaced. For additional defense, many carp can be pitted in each pit should a good breeding system get underway over the years.
Testing of this is underway - currently my assumptions about weaponization are hypothetical but I am confident they will work out. If it works how I imagine, you can have an incredibly well-defended fort with no drawbridge and no doors sealing the entrance. I've yet to have a siege or ambush, though, so results are pending.
The 'Perfect' Power Plant
Thought up a design idea here: http://www.bay12games.com/forum/index.php?topic=51302.msg1100425#msg1100425. Should be hypothetically the best possible use of space for a power plant. Gonna reformat it for wiki-style later and remove the link, but for now that should be enough.
Just went ahead and tried this out. If you use a high-powered source and a single 1-tile-wide drainage tunnel at the bottom, the waterwheel room will quickly become completely flooded with 7/7 blocks of flowing water. Waterwheels will operate just fine on top of each other so long as they're all equally submerged; the bottom-level wheels do need water underneath them as well though (even if they're submerged). So this setup is hypothetically the absolute best possible for optimal power, minimal space:
- | _ = Walls w = north/south waterwheel attached to single gear assembly + = n/s horizontal wooden axle attaching to wherever you want your power to go
z n+1 (the topmost level; dry)
|+| _______|+| |wwwwwwww+| |wwwwwwww*| |wwwwwwww | -----------
z n (the top submerged level - water flow enters from arrows)
____________ |wwwwwwww <-- |wwwwwwww* <-- |wwwwwwww___<--
z 1-(n-1) (repeat for as many levels as you like)
_________ |wwwwwwww|_ |wwwwwwww*| |wwwwwwww|
z 0 (drainage passage on left)\
________ __| | __ | |________|
The chamber is 100% open-air; waterwheels would have to be installed one at a time to hang off one another. You could easily make this setup as tall, wide, or long as you liked; the water input would be far superior to the output and the entire room would fill up with perfect flow.
Couldn't you also use a pump stack to recycle the water? --Einstein9073 22:21, 24 June 2010 (UTC)
Ideal UG River Damming
This is basically always worth doing, even if only for FPS purposes. If your river originates on the map, it'll pour from a 5x5 square with missing corners tagged as 'Waterfall,' which are water-generating tiles. That's what I'll be explaining how to dam. If your river originates offscreen, you can simply dam it near its origination point with a straight line, which is easier, but I won't explain specifically.
You'll need three rock layers counting from above the topmost open-air layer of river. If the Waterfall tiles are on z.0, there will be some open air on z.1, which means we'll be digging out z.2, isolating some hanging rock on z.3, and digging out z.4. Here's a coded diagram of what to dig on z.0:
~ = 'Waterfall' * = regular water where we will be dropping rock . = regular water X = wall - = dug-out floor XXXXXXXXX XX~~~XXXX X~~~~~XXX X~~~~~*.X X~~~~~*.. XX~~~**.. XXX***... XXXXX....
z.2 is centered around the *s on z.0 (we're ignoring z.1, the dam will fall straight through it):
= = dug areas corresponding to the damming area XXXXXXXX XXXX---X XXXX-=-X XXX--=-X X---==-X X-===--X X-----XX XXXXXXXX
z.3 is largely the same as z.2 except that the damming area is left as undug rock:
XXXXXXXX XXXX---X XXXX-X-X XXX--X-X X---XX-X X-XXX--X X-----XX XXXXXXXX
And z.4 is exactly the same as z.2. Before you continue, build a support either on top of the undug damming rock or directly below it (we'll say below for now) and hook it up to a faraway lever. Now we will channel out z.3 to look like this: (additional dug areas simply for miner access)
o = channeled hole XXXXXXXXXX XXXXXX-XXX XXXXX-o-XX XXXX-oXo-X XXX--oXo-X XX-ooXXo-X X-oXXXo-XX XX-ooo-XXX XXX---XXXX XXXXXXXXXX
Now the dam is only being held up by the support and the floor connections on z.4; so let's take care of those. We'll be channelling out the same spots but in reverse this time:
XXXXXXXX XXXX-o-X XXXXo=oX XXX-o=oX X-oo==oX Xo===o-X X-ooo-XX XXXXXXXX
Now clear the area out and pull the lever. The dam will fall through the floor below and into the river, perfectly blocking of your Waterfall tiles, which are now tappable as a very powerful infinite water source.