My squads die all the time when goblins come

How in the world do I:

A: Train my military to not be pushovers.

and

B: Equip them so that they can kill things.

An "ambush" of 4 goblins tend to kill 4 or 5 or 6 of my dwarven squad members, for some reason, despite them being assigned "individual choice" of weapons, and to train whenever they're not doing anything else ("individual combat drill" is the only thing that I see listed for their activity).


Training: danger rooms (a room full of lever-operated upright wooden training spears). This is considered an exploit by some, because of its absurd effectiveness, but if you want your dwarves to be real good at fighting real fast, this is the way to do it. Remember to use wooden training spears, which are virtually harmless, and not menacing spikes, which are deadly weapons even when made of wood. Stick 10 spears in each trap for maximum effectiveness, and remember to give your dwarves armor, shields and weapons of a type you want them to train with. Removing shields will accelerate the speed of weapon skill training, but will obviously stop shield user training.

Equipment: iron armor at the bare minimum, steel if possible. A dwarf can (and should) wear chain mail, a breastplate, greaves, boots, gloves, a helmet, and a cloak. For weapons, axes and hammers are generally the best, axes excelling against unarmored enemies and hammers against armored enemies. Chance to hit is increased for masterwork (x2) and artifact (x3) weapons (less skilled soldiers will get greater benefits from high-quality weapons than legendary soldiers), so train up your weaponsmith. All dwarves should also carry a shield, you can get away with shields made of wood or inferior metals if you are light on steel.

Scouting: Remember that not all goblins are created equal. There is little you can do to prepare your dwarves to fight Goblin Lashers. People call them Sith Warriors for a reason: whips (and scourges) are effectively lightsabers, penetrating most armor due to a very small contact area and a massive velocity, however high Shield User and Dodger skills will give a good boost to your dwarves' chances. Have a backup plan to deal with an entire squad of Lashers. Goblin Bowmen are also dangerous, try fighting them in winding corridors to prevent them from shooting up your advancing dwarves, or counter them with your own elevated crossbow-wielding dwarves behind fortifications. All other goblin weapon specialties are pretty much equivalent; well-armored and armed dwarves should be able to deal with them relatively safely.


Training dwarves for defense hasn't worked out well for me, so here are other things that I have tried so far for survival, with no silver bullet yet:

Training:

Dwarves suck at training up their skills, apparently. It is exceedingly obtuse to successfully to train up combat skills (due to the complicated interface for armor, weapons, squads, and bad defaults for training), and after training, the loss of parts of your squads is likely to cause a tantrum spiral in your fortress due to lost wives/husbands/fathers, anyway.

To even train at all in the slightest, you have to work around a default that the "minimum required to train" is set at 10 by default, so any squad with less that the absolute maximum will not do anything but the most basic of "individual training".

Danger room:

Complicated to set up, have not got this to work yet.

Dogs:

I have not seen a great effectiveness in assigned war dogs as protectors for dwarves, though the benefit is hard to gauge in the heat of combat while your dwarves are dying. No silver bullet.

Traps:

Stone fall traps are generally insufficient defenses. Cage traps are great, but slow to build and require wood. Weapon traps are tricky due to using up your weapon stores that your dwarves would otherwise use themselves.

Moats & Walls:

Both moats and walls are great obstacles for invaders, but will conflict with traders getting to your depot to trade with you. Also note that a moat, while being the easiest to build by digging a double downward channel, allows goblin archers that come to pick off your dwarves across it. You can use a labyrinth approach with traps to work around that problem, leaving a winding corridor of untrapped space for your traders to wind through, while invaders will be unable to see the traps and will run right into them. Here's a simple example of what I mean by a labyrinth corridor, which invaders will go straight through while traders follow the untrapped path of:

M=Moat or otherwise impassible area

T=Traps

M   M
M   M
M   M
M   MMMMMMM
M         M
M         M
M         M
M         M
MTTTTT    M
MTTTTT    M
MTTTTT    M
MTTTTT    M
M         M
M         M
M         M
M    TTTTTM
M    TTTTTM
M    TTTTTM
M    TTTTTM
M    TTTTTM
M         M
M         M
M         M
M         M
MTTTTT    M
MTTTTT    M
MTTTTT    M
MTTTTT    M

But even a labyrinth approach like this the traps have to be super effective to stop the invaders entirely.

Drawbridges:

When put over a moat and then retracted, these will stop invaders quite well. Unfortunately, when the invasion happens, getting a dwarf to pull the lever to retract the drawbridge is often like herding cats. Bloody, hissing, scared cats. So having one or two of these over an impassible moat is good, but they won't be enough on their own.

Just "Cask of Amontillado" wall everyone in

At the moment, this is the approach that I will probably be pursuing, though I don't have all the details like how to obtain wood or migrants or whether to care about trade figured out yet.