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 "40d:Defense guide"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Combine info from "fortifications" page, which was originally and now is again a redirect to "Fortification")
(And so it begins... da big rewrite)
Line 3: Line 3:
 
There are three important things to consider when planning the defenses for your fortress.  First, you must protect the fortress itself - the buildings, the hallways, the dwarves within it. But second, protecting the dwarves outside and topside as they go about their work is also important.  These two goals can often be rather divergent, as your dwarves may need to wander the open countryside to collect herbs, cut trees, hunt, fish, or otherwise just enjoy nature, and while outside your the bounds of your fortress can be quite vulnerable.  Lastly (and leastly), is game style - you want the game to be "fun" for you, and with some situations it's quite possible to defend yourself into complete boredom, or just go down a road that is not attractive style-wise.  While this article cannot tell you how to have fun, it will comment on that last when appropriate, and you should keep it in mind as well.
 
There are three important things to consider when planning the defenses for your fortress.  First, you must protect the fortress itself - the buildings, the hallways, the dwarves within it. But second, protecting the dwarves outside and topside as they go about their work is also important.  These two goals can often be rather divergent, as your dwarves may need to wander the open countryside to collect herbs, cut trees, hunt, fish, or otherwise just enjoy nature, and while outside your the bounds of your fortress can be quite vulnerable.  Lastly (and leastly), is game style - you want the game to be "fun" for you, and with some situations it's quite possible to defend yourself into complete boredom, or just go down a road that is not attractive style-wise.  While this article cannot tell you how to have fun, it will comment on that last when appropriate, and you should keep it in mind as well.
  
 +
Note - There is not room in this article to expand adequately on every sub-topic - ''please'' see specific articles for a complete discussion as desired.
  
 
=General Guidelines=
 
=General Guidelines=
Line 8: Line 9:
 
While admitting that "Rules are made to be broken", there are some general recommendations that have a proven value in defending a fortress:
 
While admitting that "Rules are made to be broken", there are some general recommendations that have a proven value in defending a fortress:
  
* '''Minimize fortress entrances:''' Have a strong and clear distinction between inside and outside. This usually corresponds to underground and surface, but not always - you can have a complete medieval-style castle complex on the surface.  But each point of entry should be hardened against attack.  Don't make more entrances than really necessary.  If there is a useless opening, wall it off, one way or another.  (Some creatures can destroy doors and drawbridges if they can reach them.)
+
* '''Minimize fortress entrances:''' Have a strong and clear distinction between inside and outside. This usually corresponds to underground and surface, but not always - you can have a complete medieval-style castle complex on the surface.  But each point of entry should be hardened against attack.  Don't make more entrances than really necessary.  If there is a useless or redundant opening, seal it off, one way or another.  (Some creatures can destroy doors and drawbridges if they can reach them.)
  
* '''Concentric circles:''' Think redundancy - one wall may not be enough.  With the existence of door-destroying and bow-wielding attackers, double or multiple hard barriers between the inside and the outside is essential to fend off the worst assaults, and if they get inside one barrier it's nice to have another behind that. The choke points between the circles are where you build traps and doors, and station troops.
+
* '''Concentric circles:''' Think redundancy - one wall may not be enough.  With the existence of door-destroying and bow-wielding attackers, double or multiple hard barriers between the inside and the outside is essential to fend off the worst assaults, and if they get inside one barrier it's nice to have another behind that. Sometimes captives will escape their [[cage]]s ''inside'' your fortress. The choke points between the circles are where you build traps and doors, and station troops.
  
 
* '''Assume the worst:''' Build up your defenses ''before'' the enemy shows up - like right now! Plan on being [[siege]]d by scores of [[goblin]] archers, door-breaking [[troll]]s, invisible [[kobold]] master thieves, dive-bombing [[giant eagle]]s, flame-breathing [[fire imp]]s, angry [[elephants]], and a [[bronze colossus]] - ''all at once''. Hopefully, you will never have to face that kind of threat, but being ready for anything is the best bet, and, more realistically, when things go wrong (and with dwarfs, they will, just believe it) you will have a buffer of defense to fall back on.
 
* '''Assume the worst:''' Build up your defenses ''before'' the enemy shows up - like right now! Plan on being [[siege]]d by scores of [[goblin]] archers, door-breaking [[troll]]s, invisible [[kobold]] master thieves, dive-bombing [[giant eagle]]s, flame-breathing [[fire imp]]s, angry [[elephants]], and a [[bronze colossus]] - ''all at once''. Hopefully, you will never have to face that kind of threat, but being ready for anything is the best bet, and, more realistically, when things go wrong (and with dwarfs, they will, just believe it) you will have a buffer of defense to fall back on.
Line 19: Line 20:
 
::Some [[animal]]s are quite dangerous, but most are easily excluded by the humble [[door]] or [[hatch]], even if it's not [[forbidden]]. Some few are able to destroy doors and hatches, statues and other [[building]]s.  Creature vary in threat and habits.  Some animals are thieves (see below), or eat your food (like [[Grizzly_bear|bear]]s.  Combat is random, and any animal can kill any dwarf - and vice versa.
 
::Some [[animal]]s are quite dangerous, but most are easily excluded by the humble [[door]] or [[hatch]], even if it's not [[forbidden]]. Some few are able to destroy doors and hatches, statues and other [[building]]s.  Creature vary in threat and habits.  Some animals are thieves (see below), or eat your food (like [[Grizzly_bear|bear]]s.  Combat is random, and any animal can kill any dwarf - and vice versa.
  
::Wild animals can appear from the topside, but also from an [[underground river]] or [[underground pool|pool]] that you find by mining into it.
+
::Wild animals can appear from the topside, but also from an [[underground river]] or [[underground pool|pool]] that you find by mining into it.  In an [[evil]] or [[wild]] [[biome]], the creatures can be much tougher and more aggressive.
  
 
:*'''Thieves & child snatchers'''
 
:*'''Thieves & child snatchers'''
Line 45: Line 46:
 
=Elements of a defense=
 
=Elements of a defense=
  
Dwarf Fortress is very open-ended, any number of defensive, engineering, fortification and military principles will work in DF that would have worked in the real high middle ages.  Combine different elements into the defense you want.
+
Dwarf Fortress is very open-ended, any number of defensive, engineering, fortification and military principles will work in DF that would have worked in the real Middle Ages.  Combine different elements into the defense you want.
  
 
A [http://en.wikipedia.org/wiki/Moat Moat] with a drawbridge is perhaps the simplest defense known to Dwarvenkind, and not a bad start. The [http://en.wikipedia.org/wiki/Fortifications Fortifications article on Wikipedia] is also a good resource. But simply shutting the outside world out and allowing invaders to mill about outside your moat is not always a desirable solution. Enemies will still prevent traders from arriving, and prevent any desired outdoor activities. In addition, Dwarf Fortress players often find it enjoyable to perpetrate mass slaughter of invaders rather than glare at them from inside their caves.
 
A [http://en.wikipedia.org/wiki/Moat Moat] with a drawbridge is perhaps the simplest defense known to Dwarvenkind, and not a bad start. The [http://en.wikipedia.org/wiki/Fortifications Fortifications article on Wikipedia] is also a good resource. But simply shutting the outside world out and allowing invaders to mill about outside your moat is not always a desirable solution. Enemies will still prevent traders from arriving, and prevent any desired outdoor activities. In addition, Dwarf Fortress players often find it enjoyable to perpetrate mass slaughter of invaders rather than glare at them from inside their caves.
Line 51: Line 52:
 
For this, you will need a more complicated defense than a passive ditch and walls. One common method of defense is to build a walled tower above the entrance to your fortress, stationing Marksdwarves on the second floor overlooking the drawbridge-entrance. Another is to engineer a very long but narrow entrance, at the end of which are [[Ballista | ballista]]e waiting to unload at unfortunate monsters in the field of fire.  The variations are infinite.
 
For this, you will need a more complicated defense than a passive ditch and walls. One common method of defense is to build a walled tower above the entrance to your fortress, stationing Marksdwarves on the second floor overlooking the drawbridge-entrance. Another is to engineer a very long but narrow entrance, at the end of which are [[Ballista | ballista]]e waiting to unload at unfortunate monsters in the field of fire.  The variations are infinite.
  
 +
==Physical Layout==
 +
These are the [[wall]]s, [[floor]], [[fortification]]s and so on that create the towers and perimeters of your fortress, acting as physical barriers for your dwarves and against threats. However, they always work in conjunction with the other elements.  Creative use of layouts can achieve some quite satisfying results.
  
==Military==
+
:'''Walls'''
The core of any defense plan is the soldiers. A [[sparring|trained]], [[weapon|armed]], and [[armor]]ed [[military]] is the only way to bring the fight to the enemy. Keeping them in position is the tricky part.  
+
:Constructing walls around your entrance is the simplest start, and an essential part of fortress defense, but a wall alone is not a complete defense. Currently, no creature can knock down a wall. Not only does it keep enemies out, your archers can stand on top of the wall and fire down. Keep in mind that this makes them vulnerable to enemy fire. To protect against that, build [[fortification]]s.  
  
===Roughing it===
+
:[[Door]]s and [[hatch]]es are the most obvious way to keep any enemy out. Door can only be double-wide - not enough to seal up an entrance for a [[wagon]].  You can [[forbid]] doors to keep [[humanoid]] enemies out, and your dwarves in.  Outer doors can be closed against animals, to keep beloved [[pet]]s from wandering into enemy fire. A [[floor hatch]] is just a vertical door.
Always have your soldiers carry food. They will each need  a [[backpack]] to carry it. This keeps your soldiers from wandering off to eat. You can also have them carry [[water]] in [[waterskin]]s or [[flask]]s, but this isn't recommended for the long term, as it keeps your soldiers from drinking [[alcohol]]. For an around the clock guard, have them sleep on the ground while on duty. Hopefully the sounds of combat will wake them up before they get killed. Sleeping on the floor causes unhappy [[thought]]s.  
 
  
===Daylight training room===
+
:[[Floodgate|Floodgates]], alone or in a line, may be used as removable walls, since they need no support and disappear when "opened" remotely, although using a wide drawbridge will be much more economical in terms of [[Mechanism]]s. (Be aware that Megabeasts can batter down both raised floodgates and drawbridges, and ''any object'' can prevent a floodgate from closing again, even a single, stray crossbow bolt or confused animal.)
Put a [[weapon rack]] on the surface near your entrance and make it a training room. Training dwarves will be in position if there's trouble. This also helps prevent [[cave adaption]] in your military. You can use an [[archery target]] this way, too.  
 
  
==Doors and hatches==
+
:'''Remote control barriers'''
The most obvious way to keep any enemy out is with a [[door]].  You can [[forbid]] doors to keep [[humanoid]] enemies out, and your dwarves in. Outer doors can be closed against animals, to keep beloved [[pet]]s from wandering into enemy fire. A [[floor hatch]] is just a vertical door.
+
If you link a [[lever]] to a door, hatch cover or floodgate, it becomes impossible for your dwarves to open and close it normally. Pulling the lever is the only way to open it. This keeps your dwarves locked in as well as keeping enemies out. (It's unknown if thieves can bypass a door once it's linked.)
  
==Walls==
+
A [[floodgate]] can be used just like a door, with two differences: A floodgate can be placed next to another floodgate, unlike a door, which needs to be adjacent to a wall. A floodgate is closed by default, and can only be opened with a lever. Be careful not to trap your dwarves.  
Constructing walls around your entrance is the simplest start, and an essential part of fortress defense, but a wall alone is not a complete defense.  Currently, no creature can knock down a wall. Not only does it keep enemies out, your archers can stand on top of the wall and fire down. Keep in mind that this makes them vulnerable to enemy fire. To protect against that, build [[fortification]]s.  
 
  
[[Floodgate|Floodgates]], alone or in a line, may be used as removable walls, since they need no support and disappear when "opened" remotely, although using a wide drawbridge will be much more economical in terms of [[Mechanism]]s. (Be aware that Megabeasts can batter down both raised floodgates and drawbridges, and ''any object'' can stop a floodgate from closing again, even a single, stray crossbow bolt.)
+
As mentioned, a drawbridge works as a door when "raised", sealing the passage it raises against.
  
==Fortifications==
+
You can use automate a door by using a [[pressure plate]] instead of a lever, but there are many complications there.  
Fortifications block movement and allow some missiles to pass through. Projectiles have a chance of being blocked, based on the firer's skill and distance to the fortification. There's no miss chance if the firer is adjacent to the fortification. Keep your marksdwarves close and keep enemies away. Build fortified firing platforms above ground level and put a nice wide moat between the wall and the enemy. Fortifications have no effect on [[siege engine]]s.
 
  
Like Fortifications, Vertical [[Bars]] and Wall [[Grate | Grates]] will also allow projectiles to fire through them while impeding units' movement. Unlike Fortifications, Bars and Grates may be connected to a [[Lever]], and opened or closed remotely - thus, they are good for forming portcullis.  These constructions provide no defense - the missile fire works both ways equally.
+
:'''Moats and bridges'''
 +
:A retractable/raise-able [[bridge]] over a deep trench is an almost airtight defense - only flying creatures can pass it. The moat keeps building-destroyers away from the bridge, and the raised bridge blocks arrow fire. [[Channel]]s may be used to form ditches, or moats. For defensive purposes they do not need to be filled with anything - as in the middle ages, a dry ditch is more than enough to prevent ground units from approaching (though of course, projectiles may be launched over it with impunity). With a retracting [[Bridge]] over the moat, any units or items on top of the bridge will be dropped into the moat (and, if the moat is filled with water, drown unless they can swim out; if it is filled with magma, they burn to death.)
  
==Moats and bridges==
+
:The moat doesn't have to be filled with water or magma. Arguably, a dry moat is a better defense. If you want to build an access/escape route for your moat, consider where it leads - the enemy might use that too.
A retractable/raise-able [[bridge]] over a deep trench is an almost airtight defense - only flying creatures can pass it. The moat keeps building-destroyers away from the bridge, and the raised bridge blocks arrow fire. [[Channel]]s may be used to form ditches, or moats. For defensive purposes they do not need to be filled with anything - as in the middle ages, a dry ditch is more than enough to prevent ground units from approaching (though of course, projectiles may be launched over it with impunity). With a retracting [[Bridge]] over the moat, any units or items on top of the bridge will be dropped into the moat (and, if the moat is filled with water, drown unless they can swim out; if it is filled with magma, they burn to death.)
 
  
The moat doesn't have to be filled with water or magma. Arguably, a dry moat is a better defense. If you want to build an access/escape route for your moat, consider where it leads - the enemy might use that too.
+
:A moat with a non-retractable bridge is still potentially useful: It keeps enemy archers away from your fortifications, and it channels enemies into a narrow area. A drawbridge without a moat is just a big remote control door. This doesn't work with retracting bridges!
  
A moat with a non-retractable bridge is still potentially useful: It keeps enemy archers away from your fortifications, and it channels enemies into a narrow area. A drawbridge without a moat is just a big remote control door. This doesn't work with retracting bridges!
+
:Drawbridges can throw creatures a distance (in a random direction) when the bridge is raised, possibly injuring them on landing. Creatures on top of drawbridges will be utterly destroyed if they are flush against wall and have a floor tile above them, as will anything, friend, foe or object, on a floor that is covered when the drawbridge is lowered. This offensive use of drawbridges is known as the [[Dwarven Atom Smasher]].
  
Drawbridges can throw creatures a distance (in a random direction) when the bridge is raised, possibly injuring them on landing. Creatures on top of drawbridges will be utterly destroyed if they are flush against wall and have a floor tile above them, as will anything, friend, foe or object, on a floor that is covered when the drawbridge is lowered. This offensive use of drawbridges is known as the [[Dwarven Atom Smasher]].
+
:There are three important things to remember: 1) Always build the bridge to raise towards the ''inside'' (so it cannot be destroyed when raised), 2) the [[lever]] has to be pulled by a civilian, not a soldier, and 3) water can freeze solid in cold weather. Also, some rare creatures can cross fluids, even magma. Nothing can climb the walls of a channel.
  
There are three important things to remember: 1) Always build the bridge to raise towards the ''inside'', 2) the [[lever]] has to be pulled by a civilian, not a soldier, and 3) water can freeze solid in cold weather. Also, some rare creatures can swim, even in magma.
+
==Fortifications==
 +
[[Fortification]]s are the marksdwarf's friend. They allow hand-held missile weapons to pass through.  Projectiles have a chance of being blocked, based on the firer's skill and distance to the fortification. There's no miss chance if the firer is adjacent to the fortification. Keep your marksdwarves close and keep enemies away. Build fortified firing platforms above ground level and put a nice wide moat between the wall and the enemy.  Fortifications have no effect on [[siege engine]]s.
  
==Remote control doors==
+
Like Fortifications, Vertical [[Bars]] and Wall [[Grate | Grates]] will also allow projectiles to fire through them while impeding units' movement. Unlike Fortifications, Bars and Grates may be connected to a [[Lever]], and opened or closed remotely - thus, they are good for forming portcullis. These constructions provide no defense - the missile fire works both ways equally.
If you link a [[lever]] to a door, it becomes impossible for your dwarves to open and close it normally. Pulling the lever is the only way to open it. This keeps your dwarves locked in as well as keeping enemies out. It's unknown if thieves can open a door once it's linked.  
 
  
A [[floodgate]] can be used just like a door, with two differences: A floodgate can be placed next to another floodgate, unlike a door, which needs to be adjacent to a wall. A floodgate is closed by default, and can only be opened with a lever. Be careful not to trap your dwarves.
+
==Military==
 
+
A [[sparring|trained]], [[weapon|armed]], and [[armor]]ed [[military]] is the only way to bring the fight to the enemy. Building defenses to keep them safe is easy - keeping them in position is the tricky part. See [[Military design]] for different options.
A [[hatch cover]] can also be used this way.  
 
 
 
As mentioned, a drawbridge works as a door
 
 
 
You can use automate a door by using a [[pressure plate]] instead of a lever, but there are many complications there.  
 
  
 
==Traps==
 
==Traps==
The most reliable way to stop intruders is lots of [[trap]]s. A thief's trap avoidance is subject to chance. A line of traps can wipe out an ambushes entirely, and inflict a lot of damage on a siege.  
+
The most reliable way to stop intruders is lots of [[trap]]s. A line of traps can wipe out an ambushes entirely, and inflict a lot of damage on a siege. A thief's trap avoidance is subject to chance, so the more the better.  However, vast numbers of traps have the potential to take some of the [[fun]] out of the game.
  
===Stone fall trap===
+
There are several types of [[trap]]s that a [[mechanic]] can place in a single tile and that target a single creature, but there are larger, more complex traps that only you can design, using [[lever]]s or [[pressure plate]]s.  (See [[Trap design]].
This is the easiest trap to build, so you can easily build them in large numbers. Building lots of them is an easy way to earn experience for your [[mechanic]], and add to your fort's defenses at the same time. Surround every intersection and stairway.
 
 
 
===Cage trap===
 
A very strong type of trap. Maybe even too strong. Currently, even a wooden or glass [[cage]] can hold indefinitely any creature, even trolls and megabeasts. Also, a cage trap never fails. A large creature can shrug off damage from a stone or weapon trap, but nothing can escape from a cage. Use cage traps as your outermost traps to catch the occasional wandering animal. A wounded [[elephant]] or [[unicorn]] in your front courtyard is not good at all.  
 
  
===Weapon trap===
+
==Animals==
The gold standard of traps. This is the only simple trap that works repeatedly without reloading. They do get jammed, however. View the trap with the '''items in room''' {{key|t}} mode, and if there's a corpse inside the trap, it's jammed. None of the weapons on a jammed trap will function. It may be wiser to have several weapon traps with fewer weapons, rather than a smaller number of ten-weapon traps.
+
Any animal (or dwarf) can act as a sentry. Most animals aren't strong enough to take more than one armoured goblin warrior, and enemies with bows are even worse. The real purpose of guard animals is to spot thieves. Anything will do here, even a kitten will do the job, and some players prefer not to use a useful animal. '' (Note - Some [[tame]]d animals will not fight goblins!)''
  
Using [[crossbow]]s in weapon traps avoids the problem of jamming, but they must be kept loaded with [[ammo]].  
+
Guard animals are a good second line of defense in open entrances after your traps.  A wardog can usually tear a thief apart, and will delay goblin warriors while you respond.  Also, the death of any animal will be [[announcement|announced]], alerting you to the threat if you were not already aware of it.
  
==Guard animals==
+
Most enemies will go after your animals just as blindly as they attack your dwarves. An expendable chained animal can bait enemies into dangerous passages, even into places unconnected to your fortress.
[[Chain]]ed animals are sentries, not fighters. Most animals aren't strong enough to take more than one goblin warrior. Enemies with bows are even worse. The real purpose of guard animals is to spot thieves. Anything will do here, a cat is fine too. Don't use something useful, like a war dog. Put animals in narrow corridors (width 1 or 2), in places where enemy archers can't see them.  
 
  
===Meeting hall as defense===
+
[[Restrain]]ing animals in narrow corridors (width 1 or 2), or in matched pairs against the walls of 3-wide corridors, in places where enemy archers can't fire at them.  
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.
 
 
 
===Bait animals===
 
Most enemies will go after your animals just as blindly as they attack your dwarves. An expendable chained animal can bait enemies into dangerous passages, even into places unconnected to your fortress.
 
  
 
==Siege engines==
 
==Siege engines==
[[Siege engine]]s are not very useful in the current version. Catapults are only useful for training and stone disposal. Ballistas are deadly, but fire expensive ammunition, and hit both friend and foe alike.  
+
[[Siege engine]]s take some planning to use effectively. Both catapults and ballistae can be very deadly, but both have their drawbacks. The most important factors are 1) that, unlike [[crossbow]]s, both can only fire at targets on the same [z-level]], and 2) that they are manned by civilians who will flee if any enemy gets too close. (See [[siege weapon]] for full information and suggestions.)
  
Remember that [[siege operator]]s are civilians. Fortunately, siege engines can fire through fortifications, just like normal projectiles.
 
  
==Pillboxes and turrets==
+
=Considerations=
Build a [[tower]] specifically to post archers on. 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. Carve fortifications on the second or third floor, so your dwarves can fire out. For extra usefulness, build a [[barracks]], [[archery target]], [[food]] [[stockpile]], and [[dining room]] in or near the tower.  
+
Now you know what you might face, and what cards you have in your hand. To that we add complications...
  
===Siege engine turrets===
+
==Surface jobs==
If it's big enough, build a [[siege engine]] inside a pillbox. The device needs to be on ground level. Only a single tile of fortifications is needed to fire through the wall. You may want to build a moat or secondary wall to keep enemies at a distance. Position the tower to fire where invaders tend to congregate. Since [[siege operator]]s are civilians, the "dwarves stay underground" order must be off.
+
There are many times when dwarfs want to work on the surface. [[Wood cutting]], [[gathering plants]], [[hunting]], [[fishing]], [[mining]] exposed [[vein]]s or gems, building defenses,[[growing]] above-ground [[crop]]s, [[Health care|helping wounded comrades]] or recovering dropped items are only the most likely. Often they are alone and vulnerable to wild beasts or [[ambush]]es.
  
==Bridge Land Mines==
+
You can try to wall in huge areas of the map, possibly with drawbridge gates that can open for Caravans, but the larger the area the vaster the project, the further your dwarves will be from existing defenses, and another example of dwarves working above ground.
  
Although this takes quite a few mechanisms and a lot of carpenters to pull of, you might be able to create a minefield on a bridge, create a very long moat and a bridge crossing it, make sure this bridge is not your outermost bridge, this bridge should be at least 20 squares long, but make sure it is no more than 4 squares widethen set up a ton of pressure plates in a checkered pattern, build a floor above the bridge, and make supports next to the pressure plates, then remove the floor tiles not on the supports, destroy the up-stairs on to the floor, and link all your pressure plates to a support, as soon as a goblin walks on them, the floor caves in and makes an explosion knocking him and the friends he has near him off the bridge drowning them.
+
Making smaller enclosures in key areas with underground tunnels leading to them can be easier as a first stepLikewise, tunneling to the inside of an exposed vein of ore keeps your miners sealed from the outside until you are prepared to mine the last tiles, possibly after placing doors or walls just inside that tunnel.
  
This should not be used as the only defense, make sure you have other traps at the ready in case of large [[siege]]s
+
Having military stationed or patrolling nearby is another option.
  
NOTE: This is a very expensive creation and should only be used late in the game when you can spare lots of stone/wood/mechanisms. the bigger the bridge the more effective the trap
+
==Water sources==
 +
Access to [[water]] can be vital. Wounded dwarves need water, so if there's not an underground water source you'll lose valuable soldiers to thirst. Try to have a [[well]] or cistern your dwarves can use safely. Remember to keep an extra [[bucket]] or two available.
  
<!--88888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
Some water sources are good locations for [[fishing]], providing food during longer sieges.
=Considerations=
 
  
 
==Civilians stay underground==
 
==Civilians stay underground==
This setting, in the [[Standing_orders|orders and options]] menu is the easiest way to keep your non-military dwarves out of sight of the enemy. It is far from perfect, as dwarves will do the "entrance dance." They will attempt to leave the fortress, and only cancel jobs once they reach the surface.  
+
This setting, in the [[Standing_orders|orders and options]] menu is the easiest way to keep your non-military dwarves out of sight of the enemy. It is far from perfect, as dwarves will do the "entrance dance." They will attempt to leave the fortress, and only cancel jobs once they reach the surface, as defined by the first "above ground" tiles they hit.  Having entries with a "skylight" before the actual exit can solve this - and building walls around the skylight prevents archers from shooting down into it.  Doesn't protect against flying creatures, though.
  
 
It takes a truly airtight fortress to turn this setting off while there are still enemies outside. It's only safe to turn this setting off once the drawbridges and such have sealed off your fortress entirely. If there's even one exit, your dwarves will use it. Try testing this while it's safe: Raise the bridges, just like you would in a siege, and designate some trees for cutting. If there's a way out, your woodcutters will find it.  
 
It takes a truly airtight fortress to turn this setting off while there are still enemies outside. It's only safe to turn this setting off once the drawbridges and such have sealed off your fortress entirely. If there's even one exit, your dwarves will use it. Try testing this while it's safe: Raise the bridges, just like you would in a siege, and designate some trees for cutting. If there's a way out, your woodcutters will find it.  
Line 152: Line 136:
 
* '''Forbid dropped equipment and corpses.''' Mark every item on the battlefield as [[forbidden]]. This includes any items dropped by dead merchants or scuttled wagons. You can have this done automatically for dwarf and enemy corpses and inventories in the '''orders''' {{key|o}} menu at the '''forbid options''' {{key|F}}.
 
* '''Forbid dropped equipment and corpses.''' Mark every item on the battlefield as [[forbidden]]. This includes any items dropped by dead merchants or scuttled wagons. You can have this done automatically for dwarf and enemy corpses and inventories in the '''orders''' {{key|o}} menu at the '''forbid options''' {{key|F}}.
  
* '''Delete stockpiles and turn off tombs.''' As a preemptive measure, you can delete your stockpiles. Dwarves don't haul things if there's no [[stockpile]] to place them in. Turning off or removing [[coffin]]s stops burials as well.  
+
* '''Delete stockpiles and turn off tombs.''' As a preemptive measure, you can easily delete your Graveyard [[stockpile]]s. Dwarves don't haul things if there's no stockpile to place them in. Turning off or removing [[coffin]]s stops burials as well.  
  
 
* '''Keep them busy.''' Make a bunch of busy-work for your dwarves, just to keep them underground. It's not perfect but it helps. Time to re-organize your stockpiles.
 
* '''Keep them busy.''' Make a bunch of busy-work for your dwarves, just to keep them underground. It's not perfect but it helps. Time to re-organize your stockpiles.
  
==Lever room==
+
==Civilians trapped outdoors==
Be careful where you place the [[lever]]s controlling your drawbridge. Or any lever at all, for that matter. Make sure that the entire path to each lever is [[underground]] or your dwarves might keep canceling the "pull lever" job. You can test this during peacetime, too. Try putting all your defense-related levers in a single room, and put a door on the entrance. Then you can lock your lever-puller inside to ensure rapid response time.
+
Anything that blocks intruders will also block your dwarves. This can cause the problem of dwarves being trapped outside with the enemy, and the enemy ''will'' find them. Having more than one entrance can be useful here, but each requires adequate defenses - the weakest link and all that.  If you make these entrances accessible by drawbridge only, with a (short) moat outside that, and keep the drawbridge up most of the time, having lots of entrances shouldn't be too much of a problem.
 +
 
 +
==Trade depot & caravans==
 +
Factoring in a 3-tile wide access to the [[trade depot]] adds a layer of complexity. Letting merchants in while keeping enemies out requires a careful balance. The merchants can reveal ambushes and thieves like any other creature, and they can arrive in the middle of a [[siege]]. If they do, they can be slaughtered before reaching your doors, and that hurts you, (as well as possibly causing your civilian dwarfs to want to go running out and collect their dropped items.)  Consider sending heavily armoured escorts when expecting a caravan.
 +
 
 +
Only [[wagon]]s need a three tile wide path to the depot, so the [[elves]] and some of the dwarven and human merchants can still get through if it's only 1-tile wide. You will possibly want to build the depot underground, so civilian dwarves can access the depot and goods. Wagons can't use stairs, so you need a three-tile [[ramp]], unless you can dig into the face of a cliff.
 +
 
 +
==Branching corridors==
 +
Enemies will take the most direct path to your fortress, (even if it's not very direct at all). You can use this to your advantage.  Have two paths to the fortress: a long, twisting, three-wide road, and a shorter, one tile wide, trap-filled passage. Attackers will usually prefer the short and deadly path. This makes a good line of fire for a ballista, too.
 +
 
 +
Alternately, you can have a primary, convenient, direct 3-wide path to your fortress open most of the time, with a convoluted detour that is forced (by drawbridges) only during sieges, lined with traps and overseen by marksdwarves.  The possibilities are infinite.
 +
 
 +
==Levers==
 +
Be careful where you place the [[lever]]s controlling your various entrances, traps and other defenses. Or any lever at all, for that matter. Make sure they are either central or close to locations of idle dwarfs, or both.  Near a [[meeting zone]] or bedrooms of [[nobles]] is often a good plan.  Make sure that the entire path to each lever is [[underground]] or your dwarves might be unable to reach them if told to "stay underground". You can test this during peacetime, too. Try putting all your defense-related levers in a single room, and put a door on the entrance. Then you can lock your lever-puller inside to ensure rapid response time.
  
 
Another solution to the problem of rapid response time is to make your lever room double as a [[Screw pump|pump]] room.  Pumping is a good way to build up your dwarves' [[Attribute|attributes]] regardless of whether the pump is doing work or not.  If you want a dedicated lever operator or three, turn off all their labors except pumping, and set the pumps up so that they can be operated exclusively by your dedicated lever operators.  Rotate these positions every so often so the attribute gain will be distributed among multiple dwarves.
 
Another solution to the problem of rapid response time is to make your lever room double as a [[Screw pump|pump]] room.  Pumping is a good way to build up your dwarves' [[Attribute|attributes]] regardless of whether the pump is doing work or not.  If you want a dedicated lever operator or three, turn off all their labors except pumping, and set the pumps up so that they can be operated exclusively by your dedicated lever operators.  Rotate these positions every so often so the attribute gain will be distributed among multiple dwarves.
Line 163: Line 160:
 
For the truly ambitious, the lever room could be spread over multiple levels, and the pumps could work together to power one or more artificial [[Waterfall|waterfalls]].  (Waterfalls work well in this case because their operation is not fortress-critical, and your dwarves like the mist they produce.)
 
For the truly ambitious, the lever room could be spread over multiple levels, and the pumps could work together to power one or more artificial [[Waterfall|waterfalls]].  (Waterfalls work well in this case because their operation is not fortress-critical, and your dwarves like the mist they produce.)
  
==Trade depot==
+
Use [[Notes]] to label each lever and attached device and trap clearly - if you come back to a game after a week and can't remember your levers, they are useless (or, worse, dangerous!)  Color code your levers with different color [[stone]] if that works for you.
Factoring in access to the [[trade depot]] adds a layer of complexity. Letting merchants in while keeping enemies out requires a careful balance. The merchants do reveal ambushes, and they can arrive in the middle of a [[siege]].  
+
 
 +
===AI abuse===
 +
Taking advantage of the game's Artificial Intelligence and [[path]]finding  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 plate]]s. This might count as an [[exploit]], or not - that's up to you, and what you consider fun and challenging.
 +
 
 +
==General Suggestions==
 +
 
 +
(work in progress 08:59, 2 June 2009 (UTC) )
 +
 
 +
For more specific suggestions, see also:
 +
 
 +
:* [[Trap design]] (for specific suggestions, descriptions and blueprints for traps)
 +
:* [[Defense design]] (for specific suggestions, descriptions and blueprints for fortress layout)
 +
:* [[Military design]] (for specific suggestions and suggestions for organizing soldiers & military)
 +
:*
 +
:*
 +
:*
 +
:*
 +
 
 +
[[Category:Guides]]
 +
[[Category:Fortress defense]]
  
[[Wagon]]s need a three tile wide path to the depot. You will probably want to build the depot underground, so civilian dwarves can access the depot. Wagons can't use stairs, so you need a three-tile [[ramp]], unless you can dig into the face of a cliff.
 
  
===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.
+
<!--
 +
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
 +
HIDDEN
 +
COPY/PASTE AREA WHILE EDITING THIS BEAST
  
==Civilians trapped outdoors==
+
THESE ARE TO BE CHECKED FOR REDUNDANCY, THEN MOVED IF/AS APPROP.
Anything that blocks intruders will also block your dwarves. This can cause the problem of dwarves being trapped outside with the enemy. Having more than one entrance can be useful here.  If you make these entrances accessible by drawbridge only, and keep the drawbridge up most of the time, having lots of entrances shouldn't be too much of a problem.
 
  
==Branching corridors==
 
Enemies will take the most direct path to your fortress. You can use this to your advantage. Have two paths to the fortress: a long, twisting, three-wide road, and a shorter, one tile wide, trap-filled passage. Attackers will usually prefer the short and deadly path. This makes a good line of fire for a ballista, too.
 
  
This isn't a perfectly reliable method, but surprisingly effective.  
+
===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.  
  
===AI abuse===
+
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.
Taking advantage of pathfinding AI is a whole guide 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. This might count as an [[exploit]].
 
  
 
===Roach motel===
 
===Roach motel===
Line 188: Line 201:
  
 
If the roach motel is deep enough underground, you can build a tunnel above it, channel down, and mark the channel a [[Activity_zone#Pit.2FPond|pit]]/pond. That way, you can "reload" a new bait animal.
 
If the roach motel is deep enough underground, you can build a tunnel above it, channel down, and mark the channel a [[Activity_zone#Pit.2FPond|pit]]/pond. That way, you can "reload" a new bait animal.
 
==Water sources==
 
Access to [[water]] can be important. Wounded dwarves need water, so if there's not an underground water source, you'll lose valuable soldiers to thirst. Try to have a [[well]] or cistern your dwarves can use safely. Remember to keep an extra [[bucket]] or two available.
 
  
 
==Pathing slowdowns==
 
==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.
 
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.
 +
 +
 +
===Roughing it===
 +
Always have your soldiers carry food. They will each need  a [[backpack]] to carry it. This keeps your soldiers from wandering off to eat. You can also have them carry [[water]] in [[waterskin]]s or [[flask]]s, but this isn't recommended for the long term, as it keeps your soldiers from drinking [[alcohol]]. For an around the clock guard, have them sleep on the ground while on duty. Hopefully the sounds of combat will wake them up before they get killed. Sleeping on the floor causes unhappy [[thought]]s.
 +
 +
===Daylight training room===
 +
Put a [[weapon rack]] on the surface near your entrance and make it a training room. Training dwarves will be in position if there's trouble. This also helps prevent [[cave adaption]] in your military. You can use an [[archery target]] this way, too.
 +
 +
 +
===Stone fall trap===
 +
This is the easiest trap to build, so you can easily build them in large numbers. Building lots of them is an easy way to earn experience for your [[mechanic]], and add to your fort's defenses at the same time. Surround every intersection and stairway.
 +
 +
===Cage trap===
 +
A very strong type of trap. Maybe even too strong. Currently, even a wooden or glass [[cage]] can hold indefinitely any creature, even trolls and megabeasts. Also, a cage trap never fails. A large creature can shrug off damage from a stone or weapon trap, but nothing can escape from a cage. Use cage traps as your outermost traps to catch the occasional wandering animal. A wounded [[elephant]] or [[unicorn]] in your front courtyard is not good at all.
 +
 +
===Weapon trap===
 +
The gold standard of traps. This is the only simple trap that works repeatedly without reloading. They do get jammed, however. View the trap with the '''items in room''' {{key|t}} mode, and if there's a corpse inside the trap, it's jammed. None of the weapons on a jammed trap will function. It may be wiser to have several weapon traps with fewer weapons, rather than a smaller number of ten-weapon traps.
 +
 +
Using [[crossbow]]s in weapon traps avoids the problem of jamming, but they must be kept loaded with [[ammo]].
 +
 +
 +
X Fortunately, siege engines can fire through fortifications, just like normal projectiles.
 +
 +
 +
 +
==Bridge Land Mines==
 +
 +
Although this takes quite a few mechanisms and a lot of carpenters to pull of, you might be able to create a minefield on a bridge, create a very long moat and a bridge crossing it, make sure this bridge is not your outermost bridge, this bridge should be at least 20 squares long, but make sure it is no more than 4 squares wide.  then set up a ton of pressure plates in a checkered pattern, build a floor above the bridge, and make supports next to the pressure plates, then remove the floor tiles not on the supports, destroy the up-stairs on to the floor, and link all your pressure plates to a support, as soon as a goblin walks on them, the floor caves in and makes an explosion knocking him and the friends he has near him off the bridge drowning them.
 +
 +
This should not be used as the only defense, make sure you have other traps at the ready in case of large [[siege]]s
 +
 +
NOTE: This is a very expensive creation and should only be used late in the game when you can spare lots of stone/wood/mechanisms. the bigger the bridge the more effective the trap
 +
 +
 +
===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.
 +
 +
==Pillboxes and turrets==
 +
Build a [[tower]] specifically to post archers on. 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. Carve fortifications on the second or third floor, so your dwarves can fire out. For extra usefulness, build a [[barracks]], [[archery target]], [[food]] [[stockpile]], and [[dining room]] in or near the tower.
 +
 +
===Siege engine turrets===
 +
If it's big enough, build a [[siege engine]] inside a pillbox. The device needs to be on ground level. Only a single tile of fortifications is needed to fire through the wall. You may want to build a moat or secondary wall to keep enemies at a distance. Position the tower to fire where invaders tend to congregate. Since [[siege operator]]s are civilians, the "dwarves stay underground" order must be off.
 +
 +
  
 
=Examples=
 
=Examples=
Line 208: Line 263:
 
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.
 
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.
  
 
+
END HIDDEN SECTION
[[Category:Guides]]
+
8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
[[Category:Fortress defense]]
+
-->

Revision as of 08:59, 2 June 2009

In Dwarf Fortress, you will often find yourself beset by hostile creatures looking to murder your Dwarves and take their things. Protecting your fortress from intruders is a challenging task and a complex topic. A wide variety of creatures can threaten your dwarves, and there is no one approach or philosophy that perfectly addresses them all. Fortress layout, military organization and training, traps, and more all contribute to the overall "defense" and survivability of your fortress and the dwarves that live and work there and in the world around it, and likewise no one article can include every last detail. This guide will pull from many other articles, but will prefer to refer to those rather than re-post information that is already found (and better placed) there.

There are three important things to consider when planning the defenses for your fortress. First, you must protect the fortress itself - the buildings, the hallways, the dwarves within it. But second, protecting the dwarves outside and topside as they go about their work is also important. These two goals can often be rather divergent, as your dwarves may need to wander the open countryside to collect herbs, cut trees, hunt, fish, or otherwise just enjoy nature, and while outside your the bounds of your fortress can be quite vulnerable. Lastly (and leastly), is game style - you want the game to be "fun" for you, and with some situations it's quite possible to defend yourself into complete boredom, or just go down a road that is not attractive style-wise. While this article cannot tell you how to have fun, it will comment on that last when appropriate, and you should keep it in mind as well.

Note - There is not room in this article to expand adequately on every sub-topic - please see specific articles for a complete discussion as desired.

General Guidelines

While admitting that "Rules are made to be broken", there are some general recommendations that have a proven value in defending a fortress:

  • Minimize fortress entrances: Have a strong and clear distinction between inside and outside. This usually corresponds to underground and surface, but not always - you can have a complete medieval-style castle complex on the surface. But each point of entry should be hardened against attack. Don't make more entrances than really necessary. If there is a useless or redundant opening, seal it off, one way or another. (Some creatures can destroy doors and drawbridges if they can reach them.)
  • Concentric circles: Think redundancy - one wall may not be enough. With the existence of door-destroying and bow-wielding attackers, double or multiple hard barriers between the inside and the outside is essential to fend off the worst assaults, and if they get inside one barrier it's nice to have another behind that. Sometimes captives will escape their cages inside your fortress. The choke points between the circles are where you build traps and doors, and station troops.
  • Assume the worst: Build up your defenses before the enemy shows up - like right now! Plan on being sieged by scores of goblin archers, door-breaking trolls, invisible kobold master thieves, dive-bombing giant eagles, flame-breathing fire imps, angry elephants, and a bronze colossus - all at once. Hopefully, you will never have to face that kind of threat, but being ready for anything is the best bet, and, more realistically, when things go wrong (and with dwarfs, they will, just believe it) you will have a buffer of defense to fall back on.

Threats

  • Wild animals
Some animals are quite dangerous, but most are easily excluded by the humble door or hatch, even if it's not forbidden. Some few are able to destroy doors and hatches, statues and other buildings. Creature vary in threat and habits. Some animals are thieves (see below), or eat your food (like bears. Combat is random, and any animal can kill any dwarf - and vice versa.
Wild animals can appear from the topside, but also from an underground river or pool that you find by mining into it. In an evil or wild biome, the creatures can be much tougher and more aggressive.
  • Thieves & child snatchers
Many creatures are "thieves" in the general sense - tribes of rhesus macaques or raccoons offer their own potential headaches, grabbing items of value and running. But a creature with a career title of Thief has a few additional nasty surprises, namely being invisible until spotted by your dwarves or domestic animals, being able to bypass locked or forbidden doors, and some imperfect ability to avoid triggering traps, though some are better at it than others. Kobolds and goblins are individually more dangerous than animals, but when spotted there's an alert message, either "Protect the hoard!" or "Protect the children!", as appropriate.
  • Ambushes
An ambush is a small number of enemies (less than ten) that are invisible until spotted, but are easier to spot than thieves. The alert message is "An ambush! Curse them!" They skulk around the outside of your fortress, looking for wandering dwarves or caravans entering or leaving.
  • Siege
A siege is a large number of armed and organized attackers that are announced as soon as they appear on the map. The alert message is "A vile force of darkness has arrived!" While siegers are on the map, the word "SIEGE" appears in the top corners of the screen. Siegers are organized into a number of squads, each squad having a different weapon choice. Some sieges bring creatures with the armed attackers. If you are at war with a civilization, expect annual sieges at least.
  • Enemy archers
Attackers with bows or crossbows are worth separate mention as they are much, much more threatening than those with melee weapons. Out-shooting them with your marksdwarves is risky, and charging them with melee fighters is even worse. Special techniques are needed to shield your dwarves from the deadly rain of arrows.
  • Building destroyers
Some creatures have BUILDINGDESTROYER tag in their data file. This gives them the fearful capacity of tearing apart your doors and bridges and anything else that is built with the b + C keys. (This does not include walls.)
  • Flying animals
Currently, without modding, the only flying creatures are wild animals, like the giant eagle. Be aware.
  • Megabeasts
A megabeast is a particularly powerful and dangerous creature, such as a dragon or titan. Meagabeasts appear alone, with an alert message that mentions the beast by name. They often have unique characteristics which present unusual challenges, but are universally dangerous.


Elements of a defense

Dwarf Fortress is very open-ended, any number of defensive, engineering, fortification and military principles will work in DF that would have worked in the real Middle Ages. Combine different elements into the defense you want.

A Moat with a drawbridge is perhaps the simplest defense known to Dwarvenkind, and not a bad start. The Fortifications article on Wikipedia is also a good resource. But simply shutting the outside world out and allowing invaders to mill about outside your moat is not always a desirable solution. Enemies will still prevent traders from arriving, and prevent any desired outdoor activities. In addition, Dwarf Fortress players often find it enjoyable to perpetrate mass slaughter of invaders rather than glare at them from inside their caves.

For this, you will need a more complicated defense than a passive ditch and walls. One common method of defense is to build a walled tower above the entrance to your fortress, stationing Marksdwarves on the second floor overlooking the drawbridge-entrance. Another is to engineer a very long but narrow entrance, at the end of which are ballistae waiting to unload at unfortunate monsters in the field of fire. The variations are infinite.

Physical Layout

These are the walls, floor, fortifications and so on that create the towers and perimeters of your fortress, acting as physical barriers for your dwarves and against threats. However, they always work in conjunction with the other elements. Creative use of layouts can achieve some quite satisfying results.

Walls
Constructing walls around your entrance is the simplest start, and an essential part of fortress defense, but a wall alone is not a complete defense. Currently, no creature can knock down a wall. Not only does it keep enemies out, your archers can stand on top of the wall and fire down. Keep in mind that this makes them vulnerable to enemy fire. To protect against that, build fortifications.
Doors and hatches are the most obvious way to keep any enemy out. Door can only be double-wide - not enough to seal up an entrance for a wagon. You can forbid doors to keep humanoid enemies out, and your dwarves in. Outer doors can be closed against animals, to keep beloved pets from wandering into enemy fire. A floor hatch is just a vertical door.
Floodgates, alone or in a line, may be used as removable walls, since they need no support and disappear when "opened" remotely, although using a wide drawbridge will be much more economical in terms of Mechanisms. (Be aware that Megabeasts can batter down both raised floodgates and drawbridges, and any object can prevent a floodgate from closing again, even a single, stray crossbow bolt or confused animal.)
Remote control barriers

If you link a lever to a door, hatch cover or floodgate, it becomes impossible for your dwarves to open and close it normally. Pulling the lever is the only way to open it. This keeps your dwarves locked in as well as keeping enemies out. (It's unknown if thieves can bypass a door once it's linked.)

A floodgate can be used just like a door, with two differences: A floodgate can be placed next to another floodgate, unlike a door, which needs to be adjacent to a wall. A floodgate is closed by default, and can only be opened with a lever. Be careful not to trap your dwarves.

As mentioned, a drawbridge works as a door when "raised", sealing the passage it raises against.

You can use automate a door by using a pressure plate instead of a lever, but there are many complications there.

Moats and bridges
A retractable/raise-able bridge over a deep trench is an almost airtight defense - only flying creatures can pass it. The moat keeps building-destroyers away from the bridge, and the raised bridge blocks arrow fire. Channels may be used to form ditches, or moats. For defensive purposes they do not need to be filled with anything - as in the middle ages, a dry ditch is more than enough to prevent ground units from approaching (though of course, projectiles may be launched over it with impunity). With a retracting Bridge over the moat, any units or items on top of the bridge will be dropped into the moat (and, if the moat is filled with water, drown unless they can swim out; if it is filled with magma, they burn to death.)
The moat doesn't have to be filled with water or magma. Arguably, a dry moat is a better defense. If you want to build an access/escape route for your moat, consider where it leads - the enemy might use that too.
A moat with a non-retractable bridge is still potentially useful: It keeps enemy archers away from your fortifications, and it channels enemies into a narrow area. A drawbridge without a moat is just a big remote control door. This doesn't work with retracting bridges!
Drawbridges can throw creatures a distance (in a random direction) when the bridge is raised, possibly injuring them on landing. Creatures on top of drawbridges will be utterly destroyed if they are flush against wall and have a floor tile above them, as will anything, friend, foe or object, on a floor that is covered when the drawbridge is lowered. This offensive use of drawbridges is known as the Dwarven Atom Smasher.
There are three important things to remember: 1) Always build the bridge to raise towards the inside (so it cannot be destroyed when raised), 2) the lever has to be pulled by a civilian, not a soldier, and 3) water can freeze solid in cold weather. Also, some rare creatures can cross fluids, even magma. Nothing can climb the walls of a channel.

Fortifications

Fortifications are the marksdwarf's friend. They allow hand-held missile weapons to pass through. Projectiles have a chance of being blocked, based on the firer's skill and distance to the fortification. There's no miss chance if the firer is adjacent to the fortification. Keep your marksdwarves close and keep enemies away. Build fortified firing platforms above ground level and put a nice wide moat between the wall and the enemy. Fortifications have no effect on siege engines.

Like Fortifications, Vertical Bars and Wall Grates will also allow projectiles to fire through them while impeding units' movement. Unlike Fortifications, Bars and Grates may be connected to a Lever, and opened or closed remotely - thus, they are good for forming portcullis. These constructions provide no defense - the missile fire works both ways equally.

Military

A trained, armed, and armored military is the only way to bring the fight to the enemy. Building defenses to keep them safe is easy - keeping them in position is the tricky part. See Military design for different options.

Traps

The most reliable way to stop intruders is lots of traps. A line of traps can wipe out an ambushes entirely, and inflict a lot of damage on a siege. A thief's trap avoidance is subject to chance, so the more the better. However, vast numbers of traps have the potential to take some of the fun out of the game.

There are several types of traps that a mechanic can place in a single tile and that target a single creature, but there are larger, more complex traps that only you can design, using levers or pressure plates. (See Trap design.

Animals

Any animal (or dwarf) can act as a sentry. Most animals aren't strong enough to take more than one armoured goblin warrior, and enemies with bows are even worse. The real purpose of guard animals is to spot thieves. Anything will do here, even a kitten will do the job, and some players prefer not to use a useful animal. (Note - Some tamed animals will not fight goblins!)

Guard animals are a good second line of defense in open entrances after your traps. A wardog can usually tear a thief apart, and will delay goblin warriors while you respond. Also, the death of any animal will be announced, alerting you to the threat if you were not already aware of it.

Most enemies will go after your animals just as blindly as they attack your dwarves. An expendable chained animal can bait enemies into dangerous passages, even into places unconnected to your fortress.

Restraining animals in narrow corridors (width 1 or 2), or in matched pairs against the walls of 3-wide corridors, in places where enemy archers can't fire at them.

Siege engines

Siege engines take some planning to use effectively. Both catapults and ballistae can be very deadly, but both have their drawbacks. The most important factors are 1) that, unlike crossbows, both can only fire at targets on the same [z-level]], and 2) that they are manned by civilians who will flee if any enemy gets too close. (See siege weapon for full information and suggestions.)


Considerations

Now you know what you might face, and what cards you have in your hand. To that we add complications...

Surface jobs

There are many times when dwarfs want to work on the surface. Wood cutting, gathering plants, hunting, fishing, mining exposed veins or gems, building defenses,growing above-ground crops, helping wounded comrades or recovering dropped items are only the most likely. Often they are alone and vulnerable to wild beasts or ambushes.

You can try to wall in huge areas of the map, possibly with drawbridge gates that can open for Caravans, but the larger the area the vaster the project, the further your dwarves will be from existing defenses, and another example of dwarves working above ground.

Making smaller enclosures in key areas with underground tunnels leading to them can be easier as a first step. Likewise, tunneling to the inside of an exposed vein of ore keeps your miners sealed from the outside until you are prepared to mine the last tiles, possibly after placing doors or walls just inside that tunnel.

Having military stationed or patrolling nearby is another option.

Water sources

Access to water can be vital. Wounded dwarves need water, so if there's not an underground water source you'll lose valuable soldiers to thirst. Try to have a well or cistern your dwarves can use safely. Remember to keep an extra bucket or two available.

Some water sources are good locations for fishing, providing food during longer sieges.

Civilians stay underground

This setting, in the orders and options menu is the easiest way to keep your non-military dwarves out of sight of the enemy. It is far from perfect, as dwarves will do the "entrance dance." They will attempt to leave the fortress, and only cancel jobs once they reach the surface, as defined by the first "above ground" tiles they hit. Having entries with a "skylight" before the actual exit can solve this - and building walls around the skylight prevents archers from shooting down into it. Doesn't protect against flying creatures, though.

It takes a truly airtight fortress to turn this setting off while there are still enemies outside. It's only safe to turn this setting off once the drawbridges and such have sealed off your fortress entirely. If there's even one exit, your dwarves will use it. Try testing this while it's safe: Raise the bridges, just like you would in a siege, and designate some trees for cutting. If there's a way out, your woodcutters will find it.

  • Screen the entrance. Build a simple wall around your entryway. This will keep your dwarves safe from enemy fire while doing the entrance dance.
  • Seal the entrance. Prevents the entry dance, but also blocks your soldiers, which can trap them underground.
  • Forbid dropped equipment and corpses. Mark every item on the battlefield as forbidden. This includes any items dropped by dead merchants or scuttled wagons. You can have this done automatically for dwarf and enemy corpses and inventories in the orders o menu at the forbid options F.
  • Delete stockpiles and turn off tombs. As a preemptive measure, you can easily delete your Graveyard stockpiles. Dwarves don't haul things if there's no stockpile to place them in. Turning off or removing coffins stops burials as well.
  • Keep them busy. Make a bunch of busy-work for your dwarves, just to keep them underground. It's not perfect but it helps. Time to re-organize your stockpiles.

Civilians trapped outdoors

Anything that blocks intruders will also block your dwarves. This can cause the problem of dwarves being trapped outside with the enemy, and the enemy will find them. Having more than one entrance can be useful here, but each requires adequate defenses - the weakest link and all that. If you make these entrances accessible by drawbridge only, with a (short) moat outside that, and keep the drawbridge up most of the time, having lots of entrances shouldn't be too much of a problem.

Trade depot & caravans

Factoring in a 3-tile wide access to the trade depot adds a layer of complexity. Letting merchants in while keeping enemies out requires a careful balance. The merchants can reveal ambushes and thieves like any other creature, and they can arrive in the middle of a siege. If they do, they can be slaughtered before reaching your doors, and that hurts you, (as well as possibly causing your civilian dwarfs to want to go running out and collect their dropped items.) Consider sending heavily armoured escorts when expecting a caravan.

Only wagons need a three tile wide path to the depot, so the elves and some of the dwarven and human merchants can still get through if it's only 1-tile wide. You will possibly want to build the depot underground, so civilian dwarves can access the depot and goods. Wagons can't use stairs, so you need a three-tile ramp, unless you can dig into the face of a cliff.

Branching corridors

Enemies will take the most direct path to your fortress, (even if it's not very direct at all). You can use this to your advantage. Have two paths to the fortress: a long, twisting, three-wide road, and a shorter, one tile wide, trap-filled passage. Attackers will usually prefer the short and deadly path. This makes a good line of fire for a ballista, too.

Alternately, you can have a primary, convenient, direct 3-wide path to your fortress open most of the time, with a convoluted detour that is forced (by drawbridges) only during sieges, lined with traps and overseen by marksdwarves. The possibilities are infinite.

Levers

Be careful where you place the levers controlling your various entrances, traps and other defenses. Or any lever at all, for that matter. Make sure they are either central or close to locations of idle dwarfs, or both. Near a meeting zone or bedrooms of nobles is often a good plan. Make sure that the entire path to each lever is underground or your dwarves might be unable to reach them if told to "stay underground". You can test this during peacetime, too. Try putting all your defense-related levers in a single room, and put a door on the entrance. Then you can lock your lever-puller inside to ensure rapid response time.

Another solution to the problem of rapid response time is to make your lever room double as a pump room. Pumping is a good way to build up your dwarves' attributes regardless of whether the pump is doing work or not. If you want a dedicated lever operator or three, turn off all their labors except pumping, and set the pumps up so that they can be operated exclusively by your dedicated lever operators. Rotate these positions every so often so the attribute gain will be distributed among multiple dwarves.

For the truly ambitious, the lever room could be spread over multiple levels, and the pumps could work together to power one or more artificial waterfalls. (Waterfalls work well in this case because their operation is not fortress-critical, and your dwarves like the mist they produce.)

Use Notes to label each lever and attached device and trap clearly - if you come back to a game after a week and can't remember your levers, they are useless (or, worse, dangerous!) Color code your levers with different color stone if that works for you.

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.

General Suggestions

(work in progress 08:59, 2 June 2009 (UTC) )

For more specific suggestions, see also:

  • Trap design (for specific suggestions, descriptions and blueprints for traps)
  • Defense design (for specific suggestions, descriptions and blueprints for fortress layout)
  • Military design (for specific suggestions and suggestions for organizing soldiers & military)