-
Notifications
You must be signed in to change notification settings - Fork 207
Labor Control Overlay #1463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Labor Control Overlay #1463
Conversation
…L_RIGHT') added gui.simulateInput(dfhack.gui.getCurViewscreen(), 'STANDARDSCROLL_RIGHT') reason: in the event that the user does not select a unit and the selection is only the labor choices(by default). This line will select the first unit on the list.
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
I haven't tried it so it may be buggy or non-functional, but there's a bit of code in gui/manipulator that seems to deal with work details, does this help you avoid the UI approach? https://github.com/DFHack/scripts/blob/master/gui/manipulator.lua#L657 |
I think 7 as a default is reasonable compared to 100
Hello ryanbennitt It’s definitely possible to make this run instantly using an interface. However, achieving that would require significantly more code and interactions with variables that I don’t fully understand yet. Yesterday, while working on a different program, I experimented with enabling and disabling the checkbox for all labors. Visually, everything appeared to work correctly, but the dwarves didn’t actually perform the tasks. Because of that, I believe sticking with a true macro is the best option for simplicity. Previously, before using this labor control overlay interface, I relied on a third-party macro tool called VoiceAttack, which I still use for other tasks. Also, if someone runs this program extremely fast say, within 1 frame it does execute successfully, but the checkboxes may appear disabled even though they are actually enabled. I was surprised to see this behavior, but confirmed that if the user exits and re-enters the labor menu, all the labors are indeed selected and locked as expected. This is the path to enable/disable the checboxes: gui/gm-editor df.global.plotinfo.labor_info.work_details[x].flags |
Recording.2025-06-01.122635.1.mp4
Select Lock Overlay
This is a DFHack overlay plugin for Dwarf Fortress that simulates the selection and locking of multiple units within the Work Details screen. It provides a simple UI interface to batch-toggle units' labor assignments, either by selecting, locking, or both.
Features
LABOR/WORK_DETAILS
viewscreen.Select only
,Lock only
, orSelect + Lock
.Usage
Once the plugin is loaded and you're in the
Work Details
screen (e.g.,y
->Work Details
), the overlay will automatically appear.Use the Mode dropdown to select what action(s) to simulate:
Select only
: Just toggles unit selection.Lock only
: Just toggles the lock status.Select + Lock
: Toggles both selection and lock.Adjust the number of entries to apply actions to (default is 100).
Press the RUN button (or the hotkey defined for it) to execute the actions.