Skip to content

Importing old work details breaks Mechanics Workshop (and Jewelers) #5503

Description

@fusionconfused

I noticed a bug that makes it impossible to construct a mechanics workshop. Other workshops are unaffected as far as I noticed.

Image

Heres how to recreate the bug:

  1. Replace your settings-manager.json with this one. This should enable you to load my bugged details.
  2. Start a new embark
  3. Chop a tree to get construction material
Image
  1. Go to your labor menu/work details
Image
  1. Load the work details using DFHack (Miners, Wooders, Animal stuff should be the names of the first 3 work details)
Image
  1. Assign a dwarf to a work detail. Check some boxes. (I only tested it when clicking miners)
Image
  1. Try to build a Mechanics Workshop and a Jewelers Workshop.
Image
  1. You will see "N/A" will be assigned to the construction task. Forever.
Image
  1. (Setting it to high priority or setting a specific material won't do anything)

Even creating a "everybody does this" work detail with every work detail check-marked wont make it possible to construct the workshop.
Image

Sidenote: I did a session with this bug and the jeweler workshop started working for no apparent reason in my fort after quite a while. Probably while reassigning work details once i had more dwarves, not sure.

If you load the work detail list but don't check mark anything (i.e. apply the changes) there isnt any issue.

Activity

  1. Alistair-Afton commented on Sep 16, 2026

    @Alistair-Afton
    Contributor

    Fixed in DFHack/scripts#1631 (stacked on DFHack/scripts#1630).

    Root cause: importing work details updated each detail's allowed labors but never recomputed the units' effective labor flags, so workshops depending on the imported details found no workers until something else triggered recomputation. The fix calls dfhack.units.setAutomaticProfessions() for all citizens after import — the same call the game makes when applying work details through the labor UI — which also removes the documented caveat about needing to make a manual change first.

    While in there, saved built-in details now also match by icon when names differ (e.g. details renamed by the user or a DF update), the settings file is re-read on each load so mid-session file swaps are seen, and malformed entries are skipped instead of erroring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions