- 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.
40d:Defense design
This page is one of several inter-related articles on the broader topic of defending your fortress and your dwarves. This page will focus on the physical layout and architecture of a fortress - specific suggestions, examples, diagrams and discussions of combining walls, fortifications, tunnels, channels, bridges, and terrain into a defensible whole.
See the Defense Guide for a general overview of threats and considerations for fortress defense.
For suggestions on training, organizing and deploying soldiers and militia, see Military Design.
Many defenses rely on complex traps as a central part, that are, essentially, the defense themselves. For complex traps that are not a minor/optional part of a larger defensive plan, (but might be adapted or plugged into one) see Trap Design.
- Editors & Contributors - Please see top of discussion page before posting.
Entrance designs
Siege Engines
One effective way to have Siege engines (help) defend your fortress is:
- + - floor
- ═ - wall
- ▼ - ramp
- \ - channel
- ╬ - fortification
One ballista vs 3-wide hallway
|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|╦|═|═|═|═|═ |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|║|▐|▀|▀| |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|╬|◄|═|« |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|║|▐|▄|▄| |═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|╩|═|═|═|═|═
Using this design you can cripple an army using a well timed volley. The hallway can be much longer than shown if you wish, as ballistae have extended ranges well over 100 tiles. The channeled area is necessary, as civilians (siege operators are "civilians") will run when enemies get within about 5-10 tiles of them, regardless of the actual path to that threat.
3 (or more!) ballistae can be put into a "battery" if overlapped - one per tile-width of the hallway, with each ballista aiming down their row of tiles.
|╦|═|═|═| |═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|╦|═|═|╦|═|═|║|▐|▀|▀| |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|║| ║|▐|▀|▀|◄|═|« (~ammo~) |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|╬|▐|▀|▀|◄|═|«|▐|▄|▄| |E|n|t|r|a|n|c|e|+|+|+|+|+|+|+|+|+|+|+|+|▼|\|\|\|\|\|║|◄|═|«|▐|▄|▄| (~ammo~) |═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|╩|▐|▄|▄| (~ammo~) |═|═|═|═|═|═|═|═|═|
Be sure to use fortifications to prevent dwarfs from wandering in front of the ballista to their deaths. If desired (and you have the mandwarfpower to spare), catapults may be put behind those, as they shoot safely over workers in front of them. Altho' less effective than ballistae, it's a little more firepower - and that can't be a bad thing.
Flooded entrance
Using a chamber as your entrance alongside a chamber full of water and some machinery you can flood or drain the entrance at will.
The basic premise requires two levers, two screw pumps and two gear assemblies. The amount of power required and the number of additional components needed to get the power to the screw pumps varies depending on distance/setup. One pump is placed to draw from chamber 1 and dump into chamber 2. The other is set in reverse. A gear assembly is placed next to each pump and connected to the main power system. Each gear is linked to a lever. Now at the flip of a switch you can submerge your entrance with water or magma for easy, secure defense against creatures that aren't amphibious or magma-dwelling, depending.
The picture above shows the design in action. The green pump is currently on while the red has been disconnected through the grey marked axle. The yellow X is just to mark that there is a channel under the axle.
The "Reverse Battlement" design
|'|'|'|'|'|║|+|+|+|║|'|'|'|'|' F |═|═|═|═|═|║|+|+|+|║|═|═|═|═|═ O |.|.|.|.|.|╬|@|+|+|║|.|g|.|g|. R |.|.|.|g|.|╬|@|+|+|║|.|.|.|.|g T |.|.|.|.|.|╬|@|+|+|║|.|.|g|.|. <- Direction <- R |.|.|.|.|g|╬|@|+|+|║|g|.|.|g|g <- of attack <- E |.|.|.|.|.|╬|@|+|+|║|.|g|.|.|. S |═|═|═|═|═|║|+|+|+|║|═|═|═|═|═ S |'|'|'|'|'|║|+|+|+|║|'|'|'|'|'
- . = ground level
- + = bridge/overpass
- ╬ = fortification
- ═ = wall, channel or other obstacle (to force path of attackers)
- @ = marksdwarf
- g = goblin attackers
Note that in this diagram, the fortress interior is to the West, and the enemy forces come from the East. The marksdwarves on the bridge with the fortifications are one level above the goblins (or other attackers), who will pass under the bridge and charge on toward the west. As the first clear from under the bridge, they are targeted from behind (which is one level above), as the marksdwarves wait in ambush. This allows the marksdwarves to face far fewer enemies at any one time, at least to begin with, and any enemy archers must clear the bridge, take their lumps, and then return fire back the other way before the marksdwarves are ever under attack.
For extra safety, hollow this tunnel out from under a ledge of the mountain (so it counts as "surface" and Dwarfs can "stay inside"). The bridge part can then be made out of construction, as soldiers can be ordered to go outside anyway.
If you're feeling especially nasty, make the tunnel really long into the mountain and add a ballista battery (see below). In my current version of the fortress, the goblins have to cross a long series of drawbridges to even get inside the mountain, so the ballista dwarf gets a lot of shots, and I can launch any escaping troops into the air.
(Adding ammo stockpiles, of your best quality bolts, to these stations will speed up reloading for longer sieges/battles. Even adding small, convenient food and alcohol stockpiles is not unheard of. Some designers place access to/from archery ranges very close to these stations, for faster deployment.)
Flooded entrance
Using a chamber as your entrance alongside a chamber full of water and some machinery you can flood or drain the entrance at will.
The basic premise requires two levers, two screw pumps and two gear assemblies. The amount of power required and the number of additional components needed to get the power to the screw pumps varies depending on distance/setup. One pump is placed to draw from chamber 1 and dump into chamber 2. The other is set in reverse. A gear assembly is placed next to each pump and connected to the main power system. Each gear is linked to a lever. Now at the flip of a switch you can submerge your entrance with water or magma for easy, secure defense against creatures that aren't amphibious or magma-dwelling, depending.
The picture above shows the design in action. The green pump is currently on while the red has been disconnected through the grey marked axle. The yellow X is just to mark that there is a channel under the axle.
AI abuse
Taking advantage of the game's Artificial Intelligence and pathfinding is a whole article in itself. Try leaving a door un-forbidden during an attack. When the bad guys approach the door, forbid it, and the enemy will wander off. Unlock it again, and they turn around and head back towards the door again. You can get enemies to march back and forth over a set of traps this way, or lure them deep into a complex trap. This could be automated via pressure plates. This might count as an exploit, or not - that's up to you, and what you consider fun and challenging.
Airlock defenses/buffer zone
Build two walls, each with a drawbridge. Build the trade depot in the buffer zone between them. Keep the outer bridge open, and the inner one closed. When the merchants appear, put crossbows on the walls to guard their approach. Once all the merchants are safely inside, close the outer bridge. Once there's no enemies left in the buffer zone, open the inner bridge so your civilians can start loading up the depot.
The airlock pattern can be useful even without putting the depot there. Let a few siegers in at a time, and crush them. Reset the traps, Rest up the soldiers, and repeat.
Control Room
Have one (large?) room (or several stacked on top of each other) for all defense-related levers, and central to idle dwarves - near your meeting areas and nobles quarters, with one or more halls or stairs leading to it for quick access. Connect a lever to all those doors and hatches as the first lever to be pulled in an emergency, and the respondent will lock themselves in for you, guaranteeing that they will then have nothing else to do but stay there and pull levers.
It may also be an idea to have a second lever to at least one door, for emergency access. And possibly to add a stockpile of booze and food or a well for longer sieges.
Roach motel
Build a long, narrow, and twisty passage, accessible from the outside, but unconnected to your fortress. Build as many simple traps as you like. Place a bait animal inside. Enemy attackers walk right in, and get torn apart by the traps. If any manage to make it to the end, and kill the useless animal, they're surrounded by traps, and no closer to your fortress.
If the roach motel is deep enough underground, you can build a tunnel above it, channel down, and mark the channel a pit/pond. That way, you can "reload" a new bait animal.
Pathing slowdowns
If you're playing on a low-powered machine and you close up all entrances to your fortress during a siege, your game may grind to a halt and/or crash as the siegers continuously fail at pathfinding into your fortress. Bait animals may alleviate this.
Meeting hall as defense
TACTIC You can use a meeting hall zone to attract animals to a given area. This makes a pretty poor defense in general, but in the very early game, it's a way to defend your wagon and stockpiles from thieving animals. Remove the zone later, or it attracts idle dwarves and children.
Guard towers (aka pillboxes)
Build a tower specifically to post archers on, possibly away from your main defenses. This lets you open fire before the enemy approaches your gates. A pillbox can be attached to your walls, or separate, so that the only access is from tunnels below. Thse tunnels can stretch across the map, and only need be 1-tile big if no regular traffic is expected. Construct fortifications on the second or third floor, so your dwarves can fire out. For extra usefulness, build a barracks, archery target, food stockpile, well and dining room in or near the tower. Add a door or hatch to lock them in.
Siege engine turrets
If it's big enough, build a siege engine inside a pillbox. The device needs to on the same lever as the target it will fire at, but this could be across a large gap to a nearby plateau. Only a single tile of fortifications is needed to fire through the wall. You will want to guarantee that enemies do not approach the position and scare the civilian operators - dig a moat, remove some slopes or build some secondary fortifications to keep enemies at a distance. Position the tower to fire where invaders tend to congregate. Since siege operators are civilians, the "dwarves stay underground" order must be off unless this is built as an open room under a ceiling.
Fortunately, siege engines can fire through fortifications, just like normal projectiles. Unfortunately, fortifications will protect enemies from your archery fire (but not siege engine fire.)
3 Bridges
An example of some advanced defensive construction tactics to deal with vile forces of "any" size. (See picture).
- Bridge 1 seals off the entire base
- Bridge 2 forces everyone to take the long, winding, heavily trapped path of death.
- Bridge 3 seals the inside of the fortress
Clever triggering of the bridges allows you to break the hostile forces into smaller chunks to be trapped in the courtyard while being caught in traps and a crossfire of arrows from the fortifications around.
Goblin detour
This particular design works well with plenty of archers, siege engines, and other ranged weaponry.
- ═ - Wall
- ╬ - fortification
- + - Floor, the path the attackers must take
- A space - pit (filled with spikes, water, magma, whatever you prefer)
- @ - Marksdwarves
- 1, 2, 3 - Bridges (3 shown) over pits
|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|E|N|T|R|A|N|C|E|+ |═|═|╦|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|═|1|1|1|═|╦|═|═ |+|@|╬| |+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+| |╬|@|+ |+|@|╬| |+| | | | | | | | | | | | | | | |2|2|2| |╬|@|+ |+|@|╬| |+| | |+| | | |+| | | |+| | | |+|+|+|+| |╬|@|+ |+|@|╬| |+| |+| |+| |+| |+| |+| |+| |+| |+|+|+| |╬|@|+ |+|@|╬| |+| |+| |+| |+| |+| |+| |+| |+| |+|+|+| |╬|@|+ |+|@|╬| |+| |+| |+| |+| |+| |+| |+| |+| |+|+|+| |╬|@|+ |+|@|╬| | |+| | | |+| | | |+| | | |+| | |+|+|+| |╬|@|+ |+|@|╬| | | | | | | | | | | | | | | | | |+|+|+| |╬|@|+ |+|+|╚|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╬|╗| |+|+|+| |╬|@|+ |+|+|+|@|@|@|@|@|@|@|@|@|@|@|@|@|@|@|╬| |+|+|+| |╬|@|+ |+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|@|╬| |+|+|+| |╬|@|+ |+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|@|╬| |+|+|+| |╬|@|+ |═|═|═|═|═|═|═|═|═|═|═|═|═|═|╗|+|+|@|╬| |+|+|+| |╬|@|+ |█|█|█|█|█|█|█|█|█|█|█|█|█|█|║|+|+|@|╬| |+|+|+| |╬|@|+ |█|█|█|█|█|█|█|█|█|█|█|█|█|█|║|+|+|@|╬| |+|+|+| |╬|@|+ |█|█|█|█|█|█|█|█|█|█|█|█|█|█|║|+|+|@|╬| |3|3|3| |╬|@|+
The 3 tile wide lane is for traders, so if you have your trade depot before this location, cut it down to a 1 tile lane to slow down invaders more.