Skip to content

Conversation

SilasD
Copy link
Contributor

@SilasD SilasD commented Sep 19, 2025

  • added quivers, backpacks, and flasks/waterskins to uniform analysis
  • the --drop option now only evaluates clothing as possible items to drop
  • the --free option no longer redundantly reports an improperly assigned item when that item is removed from a uniform
  • the --drop and --free options now only drop items which are actually in a unit's inventory
  • the --all and --drop options, when used together, now print the separator line between each unit's report in the proper place

There are notes in the commits' log messages.

I listed all of these changes as Fixes; arguably the first and second are Misc Improvements.

https://discord.com/channels/793331351645323264/807444467140788254/1394988398187647007
Discord user Dogma reported:
 Hello there! I would like to provide feedback on the "conflicting
 gear" option in DFHack.
 It worked for normal military gear, such as mail shirts and
 gauntlets, where dwarves chose pieces belonging to other soldiers.
 Sadly, the same happened with waterskins, quivers, and backpacks,
 and the problem remains, resulting in dwarves not equipping them
 at all.
 Is there a way to add these items to the problem-fixing function?
Dogma did not open an issue on GitHub.
Experimentation showed that the report is correct.
This change minimizes the number of inventory items which need to be
dropped in order to pick up and wear uniform items.
Per the Wiki and experimentation, only item types which can have the
`LAYER_SIZE` token can block uniform items.
Only the five clothing types can have the `LAYER_SIZE` token.
Quivers and backpacks can be blocked, but cannot block.
Weapons, shields, and flasks cannot block or be blocked.
And most importantly, jewelry items cannot not block uniform items
(experimentally verified) so do not need to be dropped.
When removing an item from a uniform, the item id should also be
removed from the `uniform.assigned_items` vector.
This avoids a redundant report of "an improperly assigned item".
In certain cases involving the --free command-line parameter, items
are moved to the ground even if they are already on the ground, in a
container, or in a building.  An item only needs to be moved to the
ground if it is held by a unit which does not have it assigned to
that units uniform after the --free processing completes.
When the --all and --drop command-line parameters are used together,
each unit's report should be separated by a blank line.
Due to the print-code refactor in DFHack#1490, this separator line was
moved between each unit's basic report and the unit's list of dropped
items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant