"Danger room" is a term used to describe a place your dwarves go to be continually poked by upright spikes. This serves two purposes: first, it trains your dwarves in Armor User skill, Shield User, Dodger, Fighter and to some extent also weapons skills (if they manage to block attacks with them). Second, it helps keep your doctors' skills from rusting and your coffin makers busy (rarely).
The first design challenge is to provide the proper level of lethality. Do not use actual spears. Do not use menacing spikes even if they are made of wood. Only use training spears. Up to ten spears may be placed in a single tile. If you want a lot of coverage and don't have much wood, one will suffice. The more spears are in a tile, the faster a danger room will work. Ten training spears will do just as much damage as one training spear, with the only difference being that bruised ears and broken thumbs might appear a little faster.
 Access control
The second design challenge is access control. If you want your entire fortress to
spank face these perils, then put the spikes in a major hallway. If you want only your military to be trained, put them in or behind a barracks, a patrol route, or some other place civilians are unlikely to go.
The third challenge is providing an appropriate triggering frequency. Some signal must be sent to raise and lower the spikes while the dwarves are on them. This can be accomplished by hooking the spikes to a lever or pressure plate, or by using a repeater. If a lever is used, then it should be near the room, so you can keep track of what's happening in the room while still knowing where the control lever is.
The idea is that as dwarves stand on the trapped tiles, every time the spikes come out of the ground due to the trap being activated, they gain skills in whatever stops it - armor if their armor deflects it, weapon if they block it with their weapon, shield for shield, and dodging if they jump out of the way. Crossbow-armed dwarves gain skill as hammerdwarves, not marksdwarves, because they are using the crossbow as a melee weapon to block. As written here , pick-armed dwarves get trained into legendary miners.
 Specific Design Suggestions
Here are a few specific designs.
 One Tile, extendable
If you set the door to locked, the soldiers will only have the spike tile as their barracks, for great efficiency. They will all stack on this one tile and train. Set the door to Internal to adjust the size of the barracks as needed. You might have to unlock the door for new squads so they can path to the armor stand once.
═════╗ ^ Spikes ^+♫║ + Door ═════╝ ♫ Armor stand
 Simple Minimal Manual Danger Room
Create a 1x4 room with each of the four tiles having upright spikes with training spears in them. A full room will of course require making 40 training spears. As always you can load each tile with less than 10 training spears if you need to, but the more you use the faster they train and considering that you have to use the room manually it makes sense to make the training as fast as possible. Place a door on the room and forbid pets, or pasture all the pets. (See #Caveats below.) Place a lever outside and link the lever to all four spike sets.
Equip your units with full armor, a shield, and ideally make them all wear a cloak to help protect the face. (The cloak will actually stop most of the hits to the body.) Manually order your unit(s) to move to the far tile of the room and lock the door once they're all in. (They won't all move to this tile, but they should move to within 3 tiles of it fitting them all into the room.) (It does not appear to matter if you have a multitude of dwarves packed into 4 tiles.) Add a (P)ull The Lever task to the lever and set it to (r)epeat. Leave the dwarves inside until they start to get unhappy from the long "patrol" then let them leave. This trains the Fighter and Shield skills very quickly. However, if you want to quickly train Weapon skills, make the dwarves unequip the shield before entering the room.
A larger than 1x4 room may work better for training dodging but this is unverified. You can easily enlarge your danger room without constructing excessive training spears and mechanisms by installing statues along the walls. Dwarves will dodge into statue tiles, then step back out onto the spiked floor for more "training".
 Simple Semi-Automated Danger Room
As above, but use Scheduling along with a Burrow to cycle trainees through the room. Define a burrow that covers the inside of the room, then schedule some number of dwarves per unit to "Defend The Burrow". Add a repeating pull the lever task to the lever. The dwarves will rotate through the danger room according to schedule. The constant lever pulling will of course require a dwarf.
 Fully Automated Danger Room
Same as above, but use a Repeater to eliminate the need for a lever pulling dwarf. The advantage is that you no longer need a dwarf to pull the lever repeatedly, but a repeater is somewhat complex to set up and is slower than a repeating lever pull task.
 Semi or Fully Automated Fort-Wide Danger Room
Instead of placing the training spear "spikes" in a room, place them in a high traffic area of the fort and use one of the methods above to set up repeating extension/retraction of the spikes. Over time this will expose most or all of your dwarves to the spear attacks, but it is advisable to make sure that all of the dwarves are at the very minimum wearing a cloak to protect them from injury, and ideally wearing full armor.
Doing this will probably kill all of your animals eventually unless they're confined to a Pasture or otherwise confined, and will eventually kill all infants (and possibly children) unless child-carrying females and children somehow forbidden from the area using a Burrow.
 Coinstar Room
As a complement to a standard danger room, a coinstar or popcorn room trains armor user skills via repeated (unblockable/undodgeable) impacts of small objects such as coins. The safest training material is currently thought to be coins (split into stacks of 15 or smaller), though seeds, socks, leaves, and other small, light objects will work. To construct a coinstar room, first dig a small 1x2 trench, then build two 1x1 retracting bridges on the floor of the trench (shown in green), and connect them to a lever, pressure plate, or repeater (not shown).
Please note that, although the bridges cover the up ramps they are still usable; adding another way out is not necessary. Do, however, remove any loose stones or other large objects in the trench.
To fill your coinstar room, designate a dump zone on the top level immediately adjacent to the trench. After making sure that all other dump zones are disabled (and all other refuse is *not* marked for dumping), dump 100-1000 small objects into the pit (more objects = faster training). Once filled, disable the dump zone and verify that your dwarves didn't dump any platinum bars or loose stone into the pit.
To activate the coinstar room, station a dwarf in the chamber, then have another dwarfull the Lever/R, trigger the pressure plate, or engage the repeater. The objects will be flung about in the chamber, hitting your dwarf repeatedly and providing 9 armor-user xp per impact. When training is complete, remove your trained dwarf with a station order (canceling the original station order will cause your trainee to drop any worn out clothes, which might prove deadly to future occupants).
Training a single dwarf at a time is recommended because only the "top" unit in a stack will be hit by flying objects. This method does not train weapons, shield use, or dodging, but it quickly trains Armor User and, more importantly, increases vital stats. There are some advantages to using slightly larger objects (injuries train willpower and hospital staff), however infections from broken ears can prove quite deadly. See this thread for more information.
Note that pets will attempt to follow soldiers into the danger room, getting perforated in the process, and leaving corpses and causing unhappy thoughts; if there is a refuse stockpile or tomb that the pet can go to, a flood of job cancellation messages may result until the spikes cease their triggering. The same applies if a soldier who is carrying an infant enters the danger room.
Pets (even non-grazers) can be put in a pasture for their safety. Alternately, having the door to the room set to "Keep tightly closed" prevents most pet deaths, but one may occasionally slip through.
To deal with the babies, you can either avoid recruiting (married) females into your military, or you can create male-only squads which you send into the danger room. Once you have dwarves who are very experienced in dodging and shield use, they will be able to train other dwarves much faster than if you simply have beginners training with each other. You can disband your male-only squads when the males are experienced enough, and mix them into all of your squads so that they can help train the rest of the soldiers.
Some players consider children a waste of resources. Letting them get speared does provide extra practice for your medical dwarves, but you'll also need extra tombs, and to make sure there's enough alcohol on hand so the parents can quickly drown their sorrows - legendary fighters cause legendary tantrum spirals.
 Exploitation of danger rooms
If you are not averse to cheating-by-modding, change the required skill for a weapon in the weapon raw text. Dwarves will gain that skill while in a danger room at the same prodigious rate. In this way it is possible to train legendary marksdwarves or even teachers using training axes.
It's also possible to train swimming, by arranging a means of flooding your danger room and locking your military within.
|Military and Fortress Defense|
|Guides||Military quickstart • Interface walkthrough • Defense guide • F.A.Q.|
|Soldier Management||Military overview • Soldiers • Scheduling and alerts • Squads • Equipment|
|Design Tips||Military design • Security design • Trap design|
|Invaders||Ambush • Megabeast • Siege • Thief|