Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0002335Dwarf FortressDwarf Mode -- Militarypublic2010-06-15 03:212010-08-11 23:43
Creidieki 
Toady One 
normalmajoralways
resolvedfixed 
0.31.06 
0.31.11 
0002335: Squad equipment permanently unusable after disbanding squad (with save)
I've developed a minimal-test-case for getting one of the equipment bugs shortly after embarking. The resulting fortress has seven dwarfs, one military dwarf and one weapon; the dwarf refuses to equip the weapon. A save after the problems is included.

The short version seems to be "without closing the military screen, remove all dwarfs from a squad, then disband the squad. Their equipment will never be used again, even if you make a new squad with the same dwarfs".

1) Start game with a (copper spear) and no other weapons.
2) Create a weapon stockpile; wait for the dwarfs to move the spear into it. (might not be necessary).
3) Create a squad with the "metal armor" uniform. Put one dwarf in it. (From the main game screen, press m, c, down, enter, right, right, enter, escape.
4) Wait for the dwarf to pick up the (copper spear).
5) Go to the military screen, and without closing it, remove the dwarf from his squad and disband the squad. (From the main game screen, press m, right, enter, left, d, escape).
6) Wait for the dwarf to put the (copper spear) back in the stockpile.
7) Create a new squad; the old militia commander will automatically be in it. (m, c, down, enter, escape).
8) The dwarf refuses to pick up the copper spear.


I've seen this bug in a lot of mature fortresses that have (otherwise functional) arsenal dwarfs. There are =steel breastplates= in the armor stockpiles, and the dwarfs end up wearing leather armor because they can't find anything metal. I haven't found a workaround (forbidding/reclaiming the items doesn't work, for example).
A save is at:
http://dffd.wimbli.com/file.php?id=2514 [^]

(This save actually includes two different weapons, a (copper spear) and a =copper spear=. The first time I created the squad, my dwarf equipped the =copper spear=. The second time, he ignored the good spear and took the (copper spear). I created the squad a third time, and now he won't equip either.
Save Included
child of 0000535acknowledged Toady One Equipping weapons/armor on military is erratic 
Issue History
2010-06-15 03:21CreidiekiNew Issue
2010-06-15 05:48Kyle_SoloTag Attached: Save Included
2010-06-15 05:50Kyle_SoloNote Added: 0008496
2010-06-15 06:01FootkerchiefRelationship addedchild of 0000535
2010-07-03 12:13FootkerchiefTag Attached: Save Needs Testing
2010-07-03 12:13FootkerchiefNote Added: 0009584
2010-07-03 12:14FootkerchiefSummaryReproducible equipment-bug save file => Squad equipment permanently unusable after disbanding squad (with save)
2010-07-06 16:18CreidiekiNote Added: 0009699
2010-07-13 06:05Toady OneNote Added: 0010126
2010-07-13 06:05Toady OneStatusnew => resolved
2010-07-13 06:05Toady OneFixed in Version => 0.31.11
2010-07-13 06:05Toady OneResolutionopen => fixed
2010-07-13 06:05Toady OneAssigned To => Toady One
2010-08-11 23:43DwarfuTag Detached: Save Needs Testing

Notes
(0008496)
Kyle_Solo   
2010-06-15 05:50   
Main equipment bug page: http://bay12games.com/dwarves/mantisbt/view.php?id=535 [^]
(0009584)
Footkerchief   
2010-07-03 12:13   
Does this save still cause the problem in 31.08?
(0009699)
Creidieki   
2010-07-06 16:18   
Yup. The bug still reproduces with the given instructions in a new 31.08 fortress, and the save file still exhibits the bug when loaded in 31.08.
(0010126)
Toady One   
2010-07-13 06:05   
Yeah, it was skipping the equipment freeing code for empty positions on squad disband. It bailed on the whole loop pass when it failed to find a dwarf instead of just the unit cleaning stuff. This one should be fixed for 0.31.11.