Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0001445Dwarf FortressDwarf Mode -- Militarypublic2010-04-22 22:462017-03-29 18:14
Ghede 
Dwarfu 
normalminorhave not tried
confirmedopen 
0.31.03 
 
0001445: Weapon Racks do nothing.
I have created an armory/training room for my military. I can assign armor stands just fine, and dwarves use them to store armor just fine as well. Weapon Racks cannot be assigned, and dwarves do NOT use them to store weapons. They are fancy decorations at this point.
1. Build a weapon rack.
2. Place a weapon rack.
3. Designate a barracks/armory.
4. Set armed dwarves to stand by.
5. Watch them go to the weapon stockpile and drop them off.
armor, barracks, binary patch, Military, stockpile, weapon
parent of 0003495new  Boxes/bags do not work correctly as barracks items. 
has duplicate 0004269resolved Footkerchief Dwarves don't use weapon racks 
related to 0003395new  Can't assign barracks made out from Cabinets 
related to 0000535acknowledged Toady One Equipping weapons/armor on military is erratic 
related to 0000428acknowledged Toady One Dwarves refuse to train, and other training weirdness 
Not all the children of this issue are yet resolved or closed.
Issue History
2010-04-22 22:46GhedeNew Issue
2010-04-22 22:55GhedeNote Added: 0004678
2010-04-22 22:57GhedeNote Added: 0004679
2010-04-22 23:40FootkerchiefCategoryDwarf Mode -- Buildings, Cages and Chains => Dwarf Mode -- Military
2010-04-23 06:17GhedeTag Attached: barracks
2010-04-23 06:17GhedeTag Attached: Military
2010-04-23 06:17GhedeTag Attached: stockpile
2010-04-23 06:17GhedeTag Attached: armor
2010-04-23 06:17GhedeTag Attached: weapon
2010-04-23 16:12LacTag Detached: armor
2010-04-23 16:13LacTag Attached: armour
2010-04-23 16:16LacTag Detached: armour
2010-04-23 16:16LacTag Attached: armor
2010-06-25 08:44ThrelicusIssue Monitored: Threlicus
2010-06-25 09:40DwarfuIssue Monitored: Dwarfu
2010-06-25 10:19kwielandNote Added: 0009090
2010-09-12 02:49RhenayaNote Added: 0012594
2010-09-12 02:56RhenayaIssue Monitored: Rhenaya
2010-09-12 13:55Hieronymous AlloyIssue Monitored: Hieronymous Alloy
2010-11-15 17:35FootkerchiefRelationship addedparent of 0003495
2010-11-16 13:21FootkerchiefRelationship addedrelated to 0003395
2011-03-21 06:54FootkerchiefRelationship addedhas duplicate 0004269
2012-03-01 07:38ThiefIssue Monitored: Thief
2012-03-01 12:18Granite26Note Added: 0020965
2012-03-01 12:22Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7801
2012-03-01 12:22Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7802
2012-03-01 12:23Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7803
2012-03-01 12:23Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7804
2012-03-01 12:23Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7805
2012-03-01 12:23Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7806
2012-03-01 12:23Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7807
2012-03-01 12:26Granite26Note Edited: 0020965bug_revision_view_page.php?bugnote_id=0020965#r7808
2012-03-01 14:51FootkerchiefRelationship addedrelated to 0000535
2012-03-01 14:52FootkerchiefNote Added: 0020972
2012-03-26 07:58thvazNote Added: 0021741
2012-03-26 07:58thvazIssue Monitored: thvaz
2012-06-08 03:57KogutNote Added: 0022902
2012-06-08 03:59KogutNote Edited: 0022902bug_revision_view_page.php?bugnote_id=0022902#r8534
2012-06-08 04:00KogutNote Edited: 0022902bug_revision_view_page.php?bugnote_id=0022902#r8535
2012-10-27 00:13agNote Added: 0023685
2012-10-27 00:31agIssue Monitored: ag
2012-10-27 14:54arclanceIssue Monitored: arclance
2012-10-28 23:42agNote Added: 0023694
2012-10-29 00:00agTag Attached: binary patch
2014-01-15 14:40Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:09Kirig StonebeardIssue Monitored: Kirig Stonebeard
2014-01-27 11:31FootkerchiefRelationship addedrelated to 0000428
2014-03-25 13:24DwarfuAssigned To => Dwarfu
2014-03-25 13:24DwarfuStatusnew => acknowledged
2014-07-28 14:58DwarfuStatusacknowledged => confirmed
2017-03-29 18:14carbohydratesNote Added: 0036388
2017-06-08 18:51HuntthetrollIssue Monitored: Huntthetroll
2024-03-06 20:03McBaldwinsIssue Monitored: McBaldwins

Notes
(0004678)
Ghede   
2010-04-22 22:55   
Addendum: Armor stand do not appear to work either. Dwarves immediately place their armor on the stands, then remove them and store them in a stockpile.
(0004679)
Ghede   
2010-04-22 22:57   
Additional step I performed and forgot to mention: Set the armory for Squad Equip, Individual Equip, and Training.
(0009090)
kwieland   
2010-06-25 10:19   
You can use the edit button to combine comments, FYI.
(0012594)
Rhenaya   
2010-09-12 02:49   
this issue also extends to barracks from/with cabinets/chests and the clothing they drop, they rather stand around no job as to store them.
however if they have a private room with cabinet, they will store their private clothing there
(0020965)
Granite26   
2012-03-01 12:18   
(edited on: 2012-03-01 12:26)
This should probably be linked to 0000535. If this is handled some of the weirdness associated with it will probably go away.

(0020972)
Footkerchief   
2012-03-01 14:52   
Thanks for the heads up!
(0021741)
thvaz   
2012-03-26 07:58   
This still happens as of 34.06.
(0022902)
Kogut   
2012-06-08 03:57   
(edited on: 2012-06-08 04:00)
This still happens as of 34.11.

According to wiki "When used in a barracks designated for individual and squad equipment, dwarves will prefer to store their weapons on the racks instead of stockpiles. Doing so in concert with armor stands will allow you to create centralized armories for your military."

I tried to create barracks with weapon racks but nothing is stored, everything is left in forge.

Save: http://dffd.wimbli.com/file.php?id=6449 [^]

(0023685)
ag   
2012-10-27 00:13   
I have investigated this yesterday in depth, and there is a whole set of problems here.

1. The racks have to be linked to a specific squad to work (like armor stands, beds etc are to positions), but nothing does this - neither via ui, nor automatically. This is likely an oversight due to the pecularity that racks belong to whole squads, not positions.

2. If you do link them by changing structures in memory, they are still unassigned due to some code using uninitialized variables (likely due to copy&paste error). This patch fixes it for linux:
 
  http://pastebin.com/mt5EUgFZ [^]

3. Finally, even if stuff is put on racks or armor stands, dwarves will quickly come and haul it off to stockpiles. This dfhack tweak fixes it by overriding a handy virtual method:

  https://github.com/angavrilov/dfhack/commit/c5d8bd9db6f56fb133779425f801107a15314eb9 [^]

4. Regarding armor stands, their capacity is implemented in a very silly way: they seem to allow only one item of _each type_, resulting in:

  one shield, one helm/cap, one breastplate/mail shirt
  one greaves/leggings, ONE BOOT, ONE GAUNTLET

This basically mean that you need 2 stands for every squad member due to boots alone; and it is also common to use cap+helm, and breastplate+mail shirt. You can see that I tried to hack this in the tweak above, but it didn't work because not all relevant code uses the vmethod.
(0023694)
ag   
2012-10-28 23:42   
Over the weekend I've made a few more binary patches:

1. Fixing mistaken removal of weapon racks from squad vectors even if assigned:

  v0.34.11 linux: http://pastebin.com/mt5EUgFZ [^] (same as above)
  v0.34.11 windows: http://pastebin.com/09nRCybe [^]

2. Fix the boot and mail shirt + breastplate problem of armor stands by allowing TWO items of the same type instead of one:

  v0.34.11 linux: http://pastebin.com/c45BXqEz [^]
  v0.34.11 windows: http://pastebin.com/Cxqd0GTh [^]

Together with a dfhack plugin and a dfhack script, this appears to mostly fix the issues with squad equipment and barrack storage not being used:

https://github.com/angavrilov/dfhack/blob/master/plugins/fix-armory.cpp [^]
https://github.com/angavrilov/dfhack/blob/master/scripts/gui/assign-rack.lua [^]

Hopefully this research and hack code is clear enough to apply equivalent
fixes to the game itself. It is interesting how the Store Armor and Store
Weapon jobs which apparently haven't been used since 2D still work fine, if
only something creates them :)

There are still various more or less related minor problems:

- Armor stands, cabinets and chests belong to a specific squad member,
  but the member who owns the specific object used to create the barracks
  will use any relevant container in the room, possibly leaving the actual
  owner of that container without place to store his stuff. Due to this quirk,
  it is advisable to always create your armory from a weapon rack.
  The cause of this is that the code enumerating containers also iterates
  over room children, which it probably shouldn't.

- Food is kicked out from backpacks when they are stored in a chest, and
  separately hauled to the squad member's room.

- I'm not sure if ammo is supposed to go anywhere in the barracks; I expect
  it just ends up in the stockpile anyway.

- If the item of clothing a flask is attached to is removed before it,
  the flask drops to the ground, and is even forbidden as a 'death item' if
  the order is set.
  The order of uniform item removal depends purely on the order of
  creation of the items, not on layering or any logical relations.

- Likewise, unless this has been fixed since v0.31.25 (which I doubt), items
  are added to the uniform in the order of creation, which can cause some of
  them to be excluded due to comparing the wrong size sum with the wrong
  permit, e.g. Robe+Breastplate+Cloak+Mail Shirt enumerated in this order
  means no mail shirt equipped.
(0036388)
carbohydrates   
2017-03-29 18:14   
This is still an issue as of 43.05

I tried using the fix-armory plugin, it doesn't seem to do anything without a patched binary. But...the patch is 5 years out of date.

It would be great to be able to use this feature of the game!