TUXDB - LINUX GAMING AGGREGATE
 NEWS TOP_PLAYED GAMES ITCH.IO CALENDAR CHAT WINE SteamDeck
 STREAMERS CREATORS CROWDFUNDING DEALS WEBSITES ABOUT
 PODCASTS REDDIT 

 

SUPPORT TUXDB ON KO-FI

MENU

ON SALE

New Twitch streamer aggregation implemented (#FuckTwitch) due to Twitch's API issues (more info on my Discord )



Name

 DFHack - Dwarf Fortress Modding Engine 

 

Developer

 The DFHack Team 

 

Publisher

 The DFHack Team 

 

Tags

 Action 

 Indie 

 Strategy 

Casual 

 

RPG 

 

Adventure 

 

Simulation 

 

Free to play 

 

Sports 

 

MMO 

 

Racing 

 

Singleplayer 

 

Multiplayer 

 

 Co-op 

 

 Early Access 

Release

 2023-04-13 

 

Steam

News

 35 

 

Controls

 Keyboard 

 

 Mouse 

 

 Partial Controller Support 

 

 Full Controller Support 

 

Players online

 n/a 

 

Steam Rating

 n/a 

Steam store

 https://store.steampowered.com/app/2346660 

 


LINUX STREAMERS (0)




DFHack 50.13-r2

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Localization support[/h3]
You can now install both DFHack and the Dwarf Fortress localization project for translating essential parts of the DF UI into your native language!



It currently has good support for:
  • Spanish
  • Italian
  • Russian
  • German
  • Portuguese (Brazil)
  • Chinese (simplified)
  • Korean
  • French
  • Polish

The translations are done by volunteers. Please consider contributing to the translations if you are bilingual -- these translations help make Dwarf Fortress more accessible to non-English speakers.

More details at the Dwarf Fortress localization project home page: https://github.com/dfint
[h3]Adventure mode support[/h3]


Dwarf Fortress adventure mode is currently available on DF's Steam beta branch. DFHack supports the adventure beta on its own adventure-beta branch. Please make sure you are subscribed to DFHack's adventure-beta branch if you are running the DF adventure beta!



We are going through our back catalog and steadily updating adventure mode tools. Moreover, we are modifying existing tools as necessary to be useful for adventure mode.



Here's what's been validated so far:
  • flashstep: teleport the adventurer to the mouse cursor
  • ghostly: allow the adventurer to walk through walls
  • gui/create-item: create arbitrary items
  • gui/reveal: reveal the map beyond your cone of vision
  • gui/sandbox: create units or trees (or items too)
  • gui/unit-info-viewer: get extended information on the selected unit
  • resurrect-adv: bring your adventurer back to life
  • reveal-adv-map: reveal hidden world map tiles
  • reveal-hidden-sites: reveal hidden world map sites
  • reveal-hidden-units: reveal hidden units on the local map
  • unretire-anyone: start an adventure as anybody in the world

In addition, all tools that aren't mode-specific, such as the mod manager and the new markdown unit/item description export, should work just fine too. If you try to use a tool in adventure mode and it doesn't behave as you'd expect, please tell us so we can improve the experience!
[h2]Expectations for the adventure mode beta[/h2]
DFHack needs to release a new compatible build whenever a new DF beta is pushed, just like we need to release a new compatible build whenever a stable DF version is released.

The good news is that DFHack now has a process in place to automatically build a compatible DFHack version when a new DF beta drops. DFHack should be compatible with new DF betas within 15 minutes. Sometimes, however, Steam gets one update but not the other. If you get a message that DFHack does not recognize the version of Dwarf Fortress, try going into the app settings in your Steam client for both DFHack and Dwarf Fortress, click on Installed Files, and click the Verify integrity of game files button. That will poke Steam to ensure that both DF and DFHack are fully updated.



In addition to compatibility bumps, the adventure-beta branch of DFHack will be updated frequently as DFHack's support for adventure mode is improved.
[h3]Export unit and item descriptions[/h3]
This release includes a unit/item description exporter that will write details about the selected unit or item to a formatted markdown text file.



Just select a unit or item and hit the Ctrl-t hotkey (or select markdown from the DFHack logo context menu)! The text will be written to a file in your Dwarf Fortress game directory, named after your current world. If you export multiple times, the text will be appended to the same file, so feel free to run markdown on all your forgotten beasts and expensive artifacts. The whole list will be ready for you when you're done.


[h3]Quick switch favorites for building planner materials[/h3]


When you want to use a specific material for construction, say because you are designing a pattern in your tavern floor, it can be annoying to have to set the material filter each time. Now, you can set your favorite material filters and quickly switch among them with the new building planner favorites panel!



Your favorites are saved with your fort, so they'll be there for you if you save and load the game.

You can also rename a favorite by shift-clicking on the name.
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • Updated for adventure mode:
    • reveal
    • gui/sandbox, gui/create-item, gui/reveal
  • adaptation: (reinstated) inspect or set unit cave adaptation levels
  • fix/engravings: fix corrupt engraving tiles
  • flashstep: (reinstated) teleport your adventurer to the mouse cursor
  • ghostly: (reinstated) allow your adventurer to phase through walls
  • markdown: (reinstated) export description of selected unit or item to a text file
  • resurrect-adv: (reinstated) allow your adventurer to recover from death
  • reveal-adv-map: (reinstated) reveal (or hide) the adventure map
  • unretire-anyone: (reinstated) choose anybody in the world as an adventurer
[h2]New Features[/h2]
  • DFHack and the Dwarf Fortress translation project can now both be run at the same time
  • buildingplan: quick material filter favorites on main planner panel
  • instruments: new subcommand instruments order for creating instrument work orders
[h2]Fixes[/h2]
  • blueprint: correctly define stockpile boundaries in recorded stockpile ("place") blueprints when there are adjacent non-rectangular stockpiles of identical types
  • caravan: don't include undiscovered divine artifacts in the goods list
  • combine: respect container volume limits
  • dig:
    • refresh count of tiles that will be modified by "mark all designated tiles on this z-level for warm/damp dig" when the z-level changes
    • don't affect already-revealed tiles when marking z-level for warm/damp dig
  • gui/quantum: fix processing when creating a quantum dump instead of a quantum stockpile
  • logistics: include semi-wild pets when autoretrain is enabled
  • modtools/create-item: now functions properly when the reaction-gloves tweak is active
  • prospect: don't use scientific notation for representing large numbers
  • quickfort:
    • don't designate multiple tiles of the same tree for chopping when applying a tree chopping blueprint to a multi-tile tree
    • fix detection of valid tiles for wells
  • suspendmanager: fully suspend unbuildable dead ends (e.g. buildling second level of a wall when the wall top is only accessible via ramp, causing the planned wall to be pathable but not buildable)
  • zone:
    • fix display of distance from cage/pit for small pets in assignment dialog
    • refresh values in distance column when switching selected pastures when the assign animals dialog is open
[h2]Misc Improvements[/h2]
  • Dreamfort: move wells on services level so brawling drunken tavern patrons are less likely to fall in
  • New commandline options for controlling the Cloud Save coprocess when launching from Steam. See the dfhack-core documentation for details.
  • caravan: display who is in the cages you are selecting for trade and whether they are hostile
  • combine: reduce combined drink sizes to 25
  • deathcause: automatically find and choose a corpse when a pile of mixed items is selected
  • dig:
    • warm/damp/aquifer status will now be shown in mining mode for tiles that your dwarves can see from the level below
    • warm/damp/aquifer status will now be shown when in smoothing/engraving modes
  • flashstep: new keybinding for teleporting adventurer to the mouse cursor: Ctrl-t (when adventure map is in the default state and mortal mode is disabled in DFHack preferences)
  • gui/autobutcher: add shortcuts for butchering/unbutchering all animals
  • gui/launcher: add button for copying output to the system clipboard
  • gui/quantum:
    • add option for whether a minecart automatically gets ordered and/or attached
    • when attaching a minecart, show which minecart was attached
    • allow multiple feeder stockpiles to be linked to the minecart route
  • markdown: new keybinding for triggering text export: Ctrl-t (when unit or item is selected)
  • prioritize: add PutItemOnDisplay jobs to the default prioritization list -- when these kinds of jobs are requested by the player, they generally want them done ASAP
  • regrass:
    • can now add grass to stairs, ramps, ashes, buildings, muddy stone, shrubs, and trees
    • can now restrict area of effect to specified tile, block, cuboid, or z-levels
    • can now add grass in map blocks where there hasn't been any
    • can now choose specific grass type
  • stockpiles: support import and export "desired items" configuration for route stops
  • unretire-anyone: new keybinding for adding a historical figure to the adventurer selection list in the adventure mode setup screen: Ctrl-a
[h2]API[/h2]
  • dfhack.items.getReadableDescription(): easy API for getting a human-readable item description with useful annotations and information (like tattered markers or who is in a cage)
  • Items::createItem: now returns a list of item pointers rather than a single ID, moved creator parameter to beginning, added growth_print and no_floor parameters at end
  • World::getAdventurer: returns current adventurer unit
  • World::ReadPauseState: now returns true when the game is effectively paused due to a large panel obscuring the map. this aligns the return value with the visual state of the pause button when in fort mode.
[h2]Lua[/h2]
  • dfhack.internal.setClipboardTextCp437Multiline: for copying multiline text to the system clipboard
  • dfhack.items.createItem: return value and parameters have changed as per C++ API
  • dfhack.world.getAdventurer: returns current adventurer unit
[h2]Documentation[/h2]
  • Quickfort Blueprint Library: add demo videos for pump stack and light aquifer tap blueprints
  • Update docs for dependency requirements and compilation procedures


[ 2024-05-10 02:15:31 CET ] [ Original post ]

DFHack 50.13-r1

This release is for the non-beta 50.13 release of DF. For the DF v51.01 adventure mode beta, please subscribe to the DFHack adventure-beta beta branch on Steam. The adventure-beta DFHack branch includes everything in this release as well.



This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Point and click quantum stockpiles[/h3]


Run gui/quantum and you'll get a visual, interactive interface for creating quantum stockpiles.

Quantum stockpiles simplify fort management by allowing a small stockpile to contain a large number of items. This reduces the complexity of your storage design, lets your dwarves find items more efficiently, and increases FPS. Until now, though, they were a bit fiddly to set up and it was easy to make a mistake that would prevent them from working correctly.

Quantum stockpiles work by linking a feeder or "input" stockpile to a one-tile minecart hauling route. Whenever an item from the feeder stockpile is placed in the minecart, the minecart is tipped and the item spills out onto an adjacent tile. The single-tile "output" stockpile in that adjacent tile holds all the items spilled out of the minecart and is your quantum stockpile. You can also choose to not have a receiving stockpile and instead have the minecart dump into a pit (perhaps a pit filled with magma).

The gui/quantum UI will walk you through the steps:
  • Select a stockpile to be the feeder by clicking on it.
  • Set configuration (like what the quantum stockpile will be named) with the onscreen options.
  • Click on a free tile on the map to build the minecart stop and (optionally) designate the output stockpile.

If there are minecarts available, one will be automatically assigned to the track stop for you. If you dont have a free minecart, gui/quantum will enqueue a manager order to make a wooden one. Once it is manufactured, youll have to run assign-minecarts all to assign it to the route, or you can open the (H)auling menu and assign the minecart manually. The quantum stockpile will not function until the minecart is in place.



See the wiki for more information on quantum stockpiles.

[h3]Extended unit info summary[/h3]


This handy lookup tool will give you detailed (but non-spoilery) data on the currently selected unit and their race. Among other things, it will tell you if a creature needs grass or lays eggs. It will even tell you the unit's current size in cubic centimeters.

If you have any ghosts walking (floating?) around, you'll get some interesting info on them as well : )
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • gui/quantum: (reinstated) point and click interface for creating quantum stockpiles or quantum dumps
  • gui/unit-info-viewer: (reinstated) give detailed information on a unit, such as egg laying behavior, body size, birth date, age, and information about their afterlife behavior (if a ghost)
[h2]Fixes[/h2]
  • Fixed incorrect DFHack background window texture when DF is started in ascii mode and subsequently switched to graphics mode
  • Fixed misidentification of visitors from your own civ as residents; affects all tools that iterate through citizens/residents
  • cursecheck: act on selected unit only if a unit is selected
  • exterminate: don't classify dangerous non-invader units as friendly (e.g. snatchers)
  • gui/create-item:
    • properly restrict bags to bag materials by default
    • allow gloves and shoees to be made out of textiles by default
  • open-legends: don't interfere with the dragging of vanilla list scrollbars
[h2]Misc Improvements[/h2]
  • gui/gm-unit: changes to unit appearance will now immediately be reflected in the unit portrait
  • open-legends: allow player to cancel the "DF will now exit" dialog and continue browsing
  • suspendmanager: Account for walls planned on the z-layer below when determining accessibility to a job
[h2]Structures[/h2]
  • biome_type: add enum attrs for caption and plant_raw_flags
[h2]Documentation[/h2]
  • autoclothing: add section comparing autoclothing and tailor to guide players choosing which to enable


[ 2024-04-23 18:04:33 CET ] [ Original post ]

DF adventure mode beta support

We've been working with Tarn and Putnam in the lead-up to this beta, and DFHack is prepared to keep pace with DF beta updates. If you're on the DF beta Steam branch, please also subscribe to the DFHack adventure-beta Steam branch to keep the two apps in sync.


[ 2024-04-17 18:13:25 CET ] [ Original post ]

DFHack 50.12-r3

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Open legends mode directly from an active fort[/h3]
The long-awaited, much-requested feature is here: you can now jump into legends mode without retiring your current fortress!



When you run open-legends, you'll get a dialog explaining what is about to happen and you will be prompted to save your game. The dialog gives you a clickable link that will do an autosave, or you can exit the dialog to do a named manual save and come back to open-legends afterwards. Then you can hop right into legends mode and dig into your world's history as it exists right now!



It's important to save your game because entering legends mode disrupts the state of the game. You can't safely jump back into your fort afterwards. DFHack takes steps to protect your savegame and will exit to desktop when you're done browsing legends mode. You can relaunch DF and load your saved game to continue. This isn't ideal, but it is much easier than the current process: saving to a new timeline, retiring your fort, loading up the world anew for a legends session, browsing, and then deleting (or forgetting to delete) the extra timeline.

Many thanks to Rumrusher, who provided the key insight that allowed this feature to work again!

Here's how it looks from end to end:


[h3]Dig through warm or damp tiles without interruption[/h3]
DF has a safety feature: when your miners uncover a warm or damp tile, any dig designation on that tile will be canceled. This is to protect you from blithely mining your way into a lake or an underground magma pool. However, this also means that if you want to dig through a warm or damp area, you will have to monitor as tiles become unhidden and re-designate your digging for every. single. tile. This is very very very painful. Digging through light aquifers or above magma is an exercise in frustration. Many players completely avoid aquifers for this reason.



There is now a new icon in the mining toolbar. In graphics mode, it looks like a pickaxe with a drop of water and a lava flow behind it. In ASCII mode, it looks like two tildes (~~). Click it (or hit the Ctrl-D hotkey), and you can enable warm and/or damp dig mode. Tiles that you subsequently designate for digging will have a special marker on them (or will blink red/blue in ASCII mode), and they will not be canceled if the designated tile turns out to be warm or damp (respectively).

This means that you can dig without interruption under lakes or through light aquifers.



If you enable both damp dig and vanilla autodig, e.g. to mine out a mineral vein, the damp dig marker will propagate along with the autodig. This allows you to seamlessly automine veins that cross under lakes or through aquifers. Note that if you autodig through an aquifer, you might want to smooth the walls as you go, otherwise the water might build up behind your miners and trap them.



You'll also notice that light and heavy aquifers have new icons (or, in ASCII, blink patterns) that distinguish them from each other and from non-leaky "just damp" tiles.



The new toolbar and aquifer icons are distributed with DFHack and are derived from vanilla assets. This is done with permission from Bay 12. Thank you Tarn!

There are also some new tools and new functionality in existing tools that go along with warm and damp dig:
  • gui/aquifer allows you to see, add, remove, and modify aquifers
  • gui/reveal now highlights aquifer tiles, even when not in mining mode. It also gained an alternate reveal mode where only aquifers are shown and no tiles are actually unhidden. This allows you to designate your digging with knowledge of where aquifers are, but will not spoil the caverns or other underground surprises.
  • gui/blueprint captures warm and damp dig markers as part of the generated blueprints
  • gui/quickfort reproduces warm and damp dig markers stored in blueprints, and additionally allows you to apply any blueprint with warm and/or damp dig markers
  • the aquifer_tap
[h3]Unlink buildings from levers[/h3]


When viewing levers or the buildings they are linked to, you will now see buttons for unlinking and freeing unlinked mechanisms. This allows you to repurpose levers without deconstructing them, and allows you to retrieve unused mechanisms from unlinked buildings.


[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • aquifer: commandline tool for creating, draining, and modifying aquifers
  • gui/aquifer: interactive aquifer visualization and editing
  • open-legends: (reinstated) open legends mode directly from a loaded fort
[h2]New Features[/h2]
  • blueprint:
    • designations and active dig jobs are now captured in generated blueprints
    • warm/damp dig markers are captured in generated blueprints
  • buildingplan: add overlays for unlinking and freeing mechanisms from buildings
  • dig:
    • designate tiles for damp or warm dig, which allows you to dig through damp or warm tiles without designations being canceled
    • damp and warm tile icons now remain visible when included in the designation selection box (graphics mode)
    • aquifer tiles are now visually distinct from "just damp" tiles (graphics and ascii modes)
    • light aquifer tiles are now visually distinct from heavy aquifer tiles (graphics and ascii modes)
    • autodig designations that are marked for damp/warm dig propagate the damp/warm tag when expanding to newly exposed tiles
  • gui/notify: optional notification for general wildlife (not on by default)
  • gui/quickfort: add options for setting warm/damp dig markers when applying blueprints
  • gui/reveal: new "aquifer only" mode to only see hidden aquifers but not reveal any tiles
  • quickfort: add options for setting warm/damp dig markers when applying blueprints
[h2]Fixes[/h2]
  • fix behavior of Linux Steam launcher on systems that don't support the inotify API
  • fix rendering of resize "notch" in lower right corner of resizable windows in ascii mode
  • agitation-rebalance: fix calculated percent chance of cavern invasion
  • armoks-blessing: fix error when making "Normal" attributes legendary
  • emigration: remove units from burrows when they emigrate
  • fix/loyaltycascade: fix edge case where loyalties of renegade units were not being fixed
  • gui/launcher: don't pop up a result dialog if a command run from minimal mode has no output
  • quickfort:
    • stockpiles can now be placed even if there is water covering the tile, as per vanilla behavior
    • reject tiles for building that contain magma or deep water
  • stonesense: fix a crash with buildings made of unusual materials (such as campsite tents made out of organic "walls")
  • suspendmanager: prevent cancellation spam when an item is preventing a building from being completed
[h2]Misc Improvements[/h2]
  • aquifer_tap blueprint: now designates in damp dig mode for uninterrupted digging in a light aquifer
  • pump_stack blueprint: now designates in warm and damp dig mode for uninterrupted digging through warm and damp tiles
  • agitation-rebalance: when more than the maximum allowed cavern invaders are trying to enter the map, prefer keeping the animal people invaders instead of their war animals
  • gui/control-panel: add alternate "nodump" version for cleanowned that does not cause citizens to toss their old clothes in the dump. this is useful for players who would rather sell old clothes than incinerate them
  • gui/reveal: show aquifers even when not in mining mode
  • keybinding: you can now assign keybindings to mouse buttons (if your mouse has more than the three buttons already used by DF)
  • tailor: allow turning off automatic confiscation of tattered clothing
[h2]Removed[/h2]
  • drain-aquifer: replaced by aquifer drain --all; an alias now exists so drain-aquifer will automatically run the new command
[h2]API[/h2]
  • Buildings :: checkFreeTiles: now takes a allow_flow parameter to control whether water- or magma-filled tiles are valid
  • Units :: citizensRange: c++-20 std :: range filter for citizen units
  • Units :: forCitizens: iterator callback function for citizen units
  • Units :: paintTile, Units :: readTile: now takes an optional field specification for reading and writing to specific map compositing layers
[h2]Lua[/h2]
  • dfhack.gui.matchFocusString: focus string matching is now case sensitive (for performance reasons)
[h2]Structures[/h2]
  • name many previously-unknown map-related fields and flag bits
  • job_type: new job class type: "Carving" (for smoothing and detailing)
  • unit_action_data_attack (unit_move_attackst): identify flags
[h2]Documentation[/h2]
  • Lua API: documented existing enum:next_item(index) function


[ 2024-04-11 22:07:12 CET ] [ Original post ]

DFHack 50.12-r3rc1

This beta release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]What needs testing[/h2][h3]Dig through warm or damp tiles without interruption[/h3]
DF has a safety feature: when your miners uncover a warm or damp tile, any dig designation on that tile will be canceled. This is to protect you from blithely mining your way into a lake or an underground magma pool. However, this also means that if you want to dig through a warm or damp area, you will have to re-designate every. single. tile. as it becomes unhidden. This is very very very painful. Digging through light aquifers or above magma is an exercise in frustration. Many players completely avoid aquifers for this reason.

There is now a new icon in the mining toolbar. In graphics mode, it looks like a pickaxe with a drop of water and a lava flow behind it. In ASCII mode, it looks like two tildes (~~). Click it (or hit the Ctrl-D hotkey), and you can enable warm and/or damp dig mode. Tiles that you subsequently designate for digging will have a special marker on them (or will blink blue/red in ASCII mode), and they will not be canceled if the designated tile turns out to be warm or damp (respectively).

This means that you can dig without interruption under lakes or through light aquifers. If you enable both damp dig and vanilla autodig, e.g. to mine out a mineral vein, the damp dig marker will propagate along with the autodig. This allows you to automine veins that cross under lakes or through aquifers. Note that if you autodig through an aquifer, you might want to smooth the walls as you autodig, otherwise the water might build up behind your miners and trap them.

You'll also notice that light and heavy aquifers have new icons that distinguish them from each other and from non-leaky "just damp" tiles.

The new toolbar and aquifer icons are distributed with DFHack and are derived from vanilla assets. They are used with permission from Bay 12.

There are also some new tools and new functionality in existing tools for warm and damp dig:
  • gui/aquifer allows you to see and edit aquifers
  • gui/reveal now highlights aquifer tiles, even when not in mining mode
  • gui/blueprint captures warm and damp dig markers
  • gui/quickfort reproduces warm and damp dig markers stored in blueprints, and additionally allows you to apply any blueprint with warm and/or damp dig markers
[h3]Open legends mode directly from an active fort[/h3]
The long-awaited, much-requested feature is here: you can now jump into legends mode without retiring your current fortress.

When you run open-legends, you'll get a dialog explaining what is about to happen and you will be prompted to save your game. The dialog gives you a clickable link that will do an autosave, or you can exit the dialog to do a named manual save and then come back to open-legends. Then you can hop right into legends mode and dig into your world's history!

Legends mode, however, disrupts the state of the game. You can't safely jump back into your fort afterwards. DFHack takes steps to protect your savegame and will exit to desktop when you're done browsing legends mode. You can relaunch DF and load your savegame to continue. This isn't ideal, but it is much easier than the current process: saving to a new timeline, retiring your fort, loading up the world anew for a legends session, browsing, and then deleting (or forgetting to delete) the extra timeline.
[h3]Unlink levers[/h3]
When viewing levers or the buildings they are linked to, you will now see buttons for unlinking and freeing unlinked mechanisms. This allows you to repurpose levers without deconstructing them, and allows you to retrieve unused mechanisms from unlinked buildings.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]New Tools[/h2]
  • aquifer: commandline tool for creating, draining, and modifying aquifers
  • gui/aquifer - interactive aquifer visualization and editing
  • open-legends: (reinstated) open legends mode directly from a loaded fort
[h2]New Features[/h2]
  • blueprint:
    • designations and active dig jobs are now captured in generated blueprints
    • warm/damp dig markers are captured in generated blueprints
  • buildingplan: add overlays for unlinking and freeing mechanisms from buildings
  • dig:
    • designate tiles for damp or warm dig, which allows you to dig through damp or warm tiles without designations being canceled
    • damp and warm tile icons now remain visible when included in the designation selection box (graphics mode)
    • aquifer tiles are now visually distinct from "just damp" tiles (graphics and ascii modes)
    • light aquifer tiles are now visually distinct from heavy aquifer tiles (graphics and ascii modes)
    • autodig designations that are marked for damp/warm dig propagate the damp/warm tag when expanding to newly exposed tiles
  • gui/notify: optional notification for general wildlife (not on by default)
  • gui/quickfort: add options for applying blueprints with warm and/or damp dig markers
  • gui/reveal: new "aquifer only" mode to only see hidden aquifers but not reveal any tiles
  • quickfort: add options for applying blueprints with warm and/or damp dig markers
[h2]Fixes[/h2]
  • fix behavior of Linux Steam launcher on systems that don't support the inotify API
  • fix rendering of resize "notch" in lower right corner of resizable windows in ascii mode
  • armoks-blessing: fix error when making class "Normal" attributes legendary
  • fix/loyaltycascade: fix lookup of associated unit metadata when the metadata list is sparse (that is, the script was sometimes failing to fix the loyalties of renegade units because it was failing to find those units' metadata)
  • quickfort:
    • stockpiles can now be placed even if there is water covering the tile, as per vanilla behavior
    • reject tiles for building that contain magma or deep water
[h2]Misc Improvements[/h2]
  • aquifer tap blueprint: now designates in damp dig mode for uninterrupted digging in a light aquifer
  • pump stack blueprint: now designates in warm and damp dig mode for uninterrupted digging through warm and damp tiles
  • gui/control-panel: add alternate "nodump" version for cleanowned that does not cause citizens to toss their old clothes in the dump. this is useful for players who would rather sell old clothes than incinerate them
  • gui/reveal: show aquifers even when not in mining mode
  • keybinding: you can now assign keybindings to mouse buttons (if your mouse has more than the three buttons already used by DF)
  • tailor: allow turning off automatic confiscation of tattered clothing
[h2]Removed[/h2]
  • drain-aquifer: replaced by aquifer drain --all; an alias now exists so drain-aquifer will automatically run the new command
[h2]API[/h2]
  • Buildings :: checkFreeTiles: now takes a allow_flow parameter to control whether water- or magma-filled tiles are valid
  • Units :: citizensRange: c++-20 std :: range filter for citizen units
  • Units :: forCitizens: iterator callback function for citizen units
  • Units :: paintTile, Units :: readTile: now takes an optional field specification for reading and writing to specific map compositing layers
[h2]Lua[/h2]
  • dfhack.gui.matchFocusString: focus string matching is now case sensitive (for performance reasons)
[h2]Structures[/h2]
  • name many previously-unknown map-related fields and flag bits
  • job_type: new job class type: "Carving" (for smoothing and detailing)
  • unit_action_data_attack (unit_move_attackst): identify flags
[h2]Documentation[/h2]
  • Lua API: documented existing enum:next_item(index) function


[ 2024-04-04 09:59:30 CET ] [ Original post ]

DFHack 50.12-r2

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Taking the frustration out of irritation[/h3]
agitation-rebalance alters the mechanics of irritation-related attacks, that is, agitated surface wildlife and cavern invaders, so they are less constant and are more responsive to ongoing player behavior.

Many people find the constant vanilla irritation attacks to be overwhelming, or at least un-fun. This gameplay mod tempers the retaliation so once you get attacked, you won't get attacked again until you specifically provoke nature further. Instead of hitting a threshold and then getting a never-ending stream of attackers, chances of a subsequent attack smoothly ramp up over time in proportion to your tree-chopping, fishing, or noise-making activity in the relevant area.

If you're just confused by the whole agitated animal and cavern invasion thing, there is an overview of how the vanilla system works here: https://docs.dfhack.org/en/stable/docs/tools/agitation-rebalance.html#how-the-df-agitation-system-works
[h3]How to use[/h3]
Open up gui/control-panel and go to the "Gameplay" tab. Turn on agitation-rebalance. If your game difficulty settings for "Enemies" are at any of the vanilla presets, that's all you have to do. If you have customized the difficulty settings, say to disable cavern invaders because you found them annoying, run this command:

agitation-rebalance preset lenient

If you want a tougher experience, you can instead run:

agitation-rebalance preset strict

And if you want the visible monitor that shows the current threat level on the surface and in the caverns, run:

agitation-rebalance enable monitor



Many thanks to rome of oxtrot for digging through the DF logic to identify the formulas used to calculate the chances of agitation and invasion. This mod would not have been possible without her dedicated research.
[h3]Fixing longstanding vanilla bugs[/h3]
This release features solutions for no fewer than three longstanding vanilla bugs.
[h3]fix/stuck-worship[/h3]
fix/stuck-worship fixes prayer so units don't get stuck in uninterruptible "Worship!" states.

You may have noticed that some dwarves can never satisfy their need to worship. They get stuck praying to the same god over and over, but they never seem to get enough. Their job is listed as a purple "Worship!", which means that the need is so strong that they are unable to do anything else. Despite having needs to pray to several different gods, the dwarf only ever prays to one, even if they have already satisfied their need for that particular god. This fix ensures that each god gets their fair share of prayer time.

If you have dwarves that are already stuck in a Worship! loop and have a backlog of gods they need to pray to, it may still take them a few days to pray themselves out of that hole. However, after a month or so, your fort should seem more productive and when your dwarves worship, it should be a friendly (interruptible) green instead of a dire (uninterruptible) purple.



[h3]fix/noexert-exhaustion[/h3]
fix/noexert-exhaustion fixes an issue with assigning necromancers, vampires, and intelligent undead to military training. These kinds of units aren't supposed to ever get exhausted -- in game RAW language, they have the NOEXERT token. However, military training ignores that token and makes them tired anyway. Unfortunately, because of NOEXERT, these units also never recover from being tired, which gets them stuck in an exhausted state. With this fix running, they are properly kept free of exhaustion, even when training in the military.
[h3]fix/ownership[/h3]
fix/ownership detects and fixes the case where multiple citizens claim the same item, preventing "Store owned item" job loops as each "owner" takes turns at stealing the item back from the other owner's room.

All three are enabled by default, so you don't have to do anything special to benefit from them. You should just see your forts working a little bit smoother now.
[h3]Instrument component lookup[/h3]
Instruments. How do they work?

Well, nobody really knows (except maybe Tarn), but now at least you can follow a recipe to get their parts assembled.

The new instruments command provides information on how to craft the instruments used by the player civilization. Each component is listed along with the required raw materials. Moreover, you can see which instruments are hand held and which need to be "built" as stationary buildings, in case you're looking for a specific type for your taverns and temples.


[h3]Automatically retrain partially trained livestock[/h3]
This one is for those who like to domesticate wild animals. A newborn animal inherits the training level of its parents. If the parents were not yet fully domesticated, the newborn won't be either. If you don't notice that the animal was born and that it doesn't have a trainer assigned, the partial training will decay over time. Eventually the animal will revert to wild, possibly attacking your dwarves or other livestock.

The autoretrainer watches for newborn partially-trained livestock and assigns a trainer. That's it.

You can enable it from the Pets/Livestock screen (under "Creatures"), or you can autostart it for new forts in gui/control-panel.




[h3]Skill level and labor type restrictions for workshops[/h3]



This is a new overlay for workshop and furnace buildings where you can configure the workshop to only accept general work orders that pertain to specific labors. For example, if you have general manager workorders set up to produce weapons and armor, you can configure one forge to only accept armoring jobs and a different forge to only accept Weaponsmithing jobs. General workorder jobs for armor will only be distributed to the one specialized in Armoring, and general workorder jobs for weapons will only be distributed to the one specialized in Weaponsmithing. Then you can assign a master armorer and a master weaponsmith to the respective forges to make more productive use of their abilities.

As an alternative to assigning specific workshop masters, you can leave the workshop at "This workshop is free for anybody to use" and instead set limits for the worker's skill level. Then, only citizens that have a skill level within that range will come to do jobs at that workshop. For example, if you have many highly skilled armorers, you can set the labor restriction to Armoring and the skill limits to Master and above. Then, any of your available skilled armorers can come to complete jobs at that forge. When one armorer needs rest, falls in the well, or gets eaten by a forgotten beast, the others can immediately take up the slack without requiring micromanagement from the player.



Veteran players may remember this as a vanilla feature in pre-v50 Dwarf Fortress. This is actually still the case. The DFHack overlay simply provides a UI for the vanilla feature hiding beneath the surface, just like the civilian alert.

The labor and skill restrictions can also be set from quickfort blueprints. The four Craftsdwarf's workshops on the Dreamfort industry level, for example, are now automatically specialized for Stonecrafting, Woodcrafting, Bone Carving, and miscellaneous tasks, respectively.
[h2]Announcements[/h2][h3]New Linux Steam launch behavior[/h3]
This one's just for the Linux folks. It's important that playtime metrics get to both DF and DFHack, so we updated our launcher on Linux to ensure that both DFHack and DF get marked as "running" when you're playing the game from the Steam client, regardless of which "game" you selected to launch.

This brings the Linux launcher in line with what we have for the Windows launcher and should ensure that both DF and DFHack have proper accounting for playtime for Linux players.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • agitation-rebalance: alter mechanics of irriation-related attacks so they are less constant and are more responsive to recent player bahavior
  • devel/block-borders: (reinstated) highlights boundaries of map blocks or embark tile blocks
  • fix/noexert-exhaustion: fix "Tired" NOEXERT units. Enabling via gui/control-panel prevents NOEXERT units from getting stuck in a "Tired" state
  • fix/ownership: fix instances of multiple citizens claiming the same items, resulting in "Store owned item" job loops
  • fix/stuck-worship: fix prayer so units don't get stuck in uninterruptible "Worship!" states
  • instruments: provides information on how to craft the instruments used by the player civilization
  • modtools/if-entity: (reinstated) modder's resource for triggering scripted content depending on the race of the loaded fort
  • modtools/item-trigger: (reinstated) modder's resource for triggering scripted content when specific items are used
[h2]New Features[/h2]
  • exterminate: new "disintegrate" kill method that additionally destroys carried items
  • gui/settings-manager: add import, export, and autoload for work details
  • logistics: autoretrain will automatically assign trainers to your partially-trained (but not yet domesticated) livestock. this prevents children of partially-trained parents from reverting to wild if you don't notice they were born
  • orders: add overlay for configuring labor and skill level restrictions for workshops
  • quickfort: allow setting of workshop profile properties (e.g. labor, skill restrictions) from build blueprints
  • sort: updated and reinstated military status/squad membership/burrow membership filter for work animal assignment screen
  • stocks: add button/hotkey for removing empty categories from the stocks list
[h2]Fixes[/h2]
  • autochop: fix underestimation of log yield for cavern mushrooms
  • autoclothing: don't produce clothes for dead units
  • caravan: fix trade price calculations when the same item was requested for both import and export
  • catsplosion: only cause pregnancies in adults
  • control-panel: fix filtering not filtering when running the list command
  • gui/launcher:
    • fix detection on Shift-Enter for running commands and autoclosing the launcher
    • fix history scanning (Up/Down arrow keys) being slow to respond when in minimal mode
  • gui/notify:
    • prevent notification overlay from showing up in arena mode
    • don't zoom to forbidden depots for merchants ready to trade notification
  • logistics:
    • don't melt/trade/dump empty containers that happen to be sitting on the stockpile unless the stockpile accepts those item types
    • don't send autotrade items to forbidden depots
[h2]Misc Improvements[/h2]
  • Dreamfort:
    • the four Craftsdwarf's workshops on the industry level are now specialized for Stonecrafting, Woodcrafting, Bone Carving, and miscellaneous tasks, respectively
    • update embark profile recommendations and example embark profile
  • Many tools that previously only worked for citizens or only for dwarves now work for all citizens and residents, e.g. fastdwarf, rejuvenate, etc.
  • When launched from the Steam client on Linux, both Dwarf Fortress and DFHack will be shown as "Running". This ensures that DF has proper accounting for Linux player usage.
  • allneeds:
    • select a dwarf in the UI to see a summary of needs for just that dwarf
    • provide options for sorting the cumulative needs by different criteria
  • autobutcher: prefer butchering partially trained animals and save fully domesticated animals to assist in wildlife domestication programs
  • autodump: can now teleport items loosely stored in buildings (clutter)
  • buildingplan:
    • remember player preference for whether unavailable materials should be hidden in the filter selection dialog
    • sort by available quantity by default int he filter selection dialog
  • clean: protect farm plots when cleaning mud
  • control-panel: enable tweaks quietly on fort load so we don't spam the console
  • devel/tile-browser: simplify interface now that SDL automatically normalizes texture scale
  • dwarfvet:
    • automatically unassign animals from pastures when they need treatment so they can make their way to the hospital. reassign them to their original pasture when treatment is complete.
    • ignore animals assigned to cages or restraints
  • exterminate: make race name matching case and space insensitive
  • gui/gm-editor: support opening engraved art for inspection
  • gui/launcher:
    • add interface for browsing and filtering commands by tags
    • add support for history search (Alt-s hotkey) when in minimal mode
    • add support for the clear command and clearing the scrollback buffer
  • gui/notify: Shift click or Shift Enter on a zoomable notification to zoom to previous target
  • gui/teleport: add global Ctrl-Shift-T keybinding (only available when DFHack mortal mode is disabled)
  • prioritize: print out custom reaction and hauling jobs in the same format that is used for prioritize command arguments so the player can just copy and paste
  • suspendmanager: improve performance when there are many active jobs
  • tweak: add quiet option for silent enablement and disablement of tweaks
[h2]API[/h2]
  • Units :: getCitizens: now includes residents by default
  • Units :: isForgottenBeast: property check for forgotten beasts
  • Units :: isGreatDanger: now includes forgotten beasts
  • Units :: isResident: property check for residents (as opposed to citizens)
[h2]Lua[/h2]
  • helpdb: search_entries now returns a match if all filters in the include list are matched. previous behavior was to match if any include filter matched.
  • dfhack.units.getCitizens: now includes residents by default
  • dfhack.units.isForgottenBeast: make new units method available to Lua
  • matinfo.decode: now directly handles plant objects
  • widgets.Label: *pen attributes can now either be a pen or a function that dynamically returns a pen
[h2]Structures[/h2]
  • activity_event: identify fields and type values
  • plant_tree_info: define tree body and branch flags
  • plotinfo.hauling: name fields related to the hauling route panel
  • unit: identify and define many previously unknown fields, types, and enums
[h2]Documentation[/h2]
  • introduction: refresh getting started content
  • overlay-dev-guide: updated examples and troubleshooting steps
  • quickstart: refresh quickstart guide


[ 2024-03-21 18:10:42 CET ] [ Original post ]

DFHack next feature poll

We're running a poll on Reddit for which DFHack features you'd like to see next! Please vote here:

https://www.reddit.com/r/dwarffortress/comments/1bj5bjs/poll_what_big_feature_should_dfhack_tackle_next/


[ 2024-03-20 06:04:26 CET ] [ Original post ]

DFHack 50.12-r2rc2

This beta release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]What needs testing?[/h2][h3]agitation-rebalance updates[/h3]
agitation-rebalance has seen significant internal improvements, especially around the calculations of chance of invasion. In the previous beta, after a cavern invasion, you'd see the cavern danger level immediately drop to None and then, after sufficient subsequent irritation, it would jump to High in one go.

Now, after clearing an invasion, you'll see your chances of a subsequent invasion smoothly increase from Low to High as you chop more trees and make more noise, which is much closer to the behavior `agitation-rebalance` provides on the surface for agitated wildlife attacks. Moreover, if you have the monitor panel visible, you will not see the danger level of the caverns update until you clear the current invasion. This is to avoid spoiling exactly when and where a cavern invasion has occurred. This mod is supposed to fix the mechanics of irritation -- it's not supposed to spoil the surprise when it happens!
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • fix/ownership: fix instances of multiple citizens claiming the same items, resulting in "Store owned item" job loops
  • modtools/if-entity: (reinstated) modder's resource for triggering scripted content depending on the race of the loaded fort
[h2]Fixes[/h2]
  • autoclothing: don't produce clothes for dead units
  • caravan: fix trade price calculations when the same item was requested for both import and export
[h2]Misc Improvements[/h2]
  • Many tools that previously only worked for citizens or only for dwarves now work for all citizens and residents, e.g. fastdwarf, rejuvenate, etc.
  • allneeds:
    • select a dwarf in the UI to see a summary of needs for just that dwarf
    • provide options for sorting the cumulative needs by different criteria
  • buildingplan: persist hiding of unavailable materials between filterselection invocations
  • dwarfvet:
    • automatically unassign animals from pastures when they need treatment so they can make their way to the hospital. reassign them to their original pasture when treatment is complete.
    • ignore animals assigned to cages or restraints
  • gui/notify: Shift click or Shift Enter on a zoomable notification to zoom to previous target
  • prioritize: print out custom reaction and hauling jobs in the same format that is used for prioritize command arguments so the player can just copy and paste
[h2]API[/h2]
  • Units :: getCitizens: now includes residents by default
  • Units :: isResident: property check for residents (as opposed to citizens)
[h2]Lua[/h2]
  • dfhack.units.getCitizens: now includes residents by default
[h2]Structures[/h2]
  • activity_event: identify fields and type values
  • unit: identify and define many previously unknown fields, types, and enums


[ 2024-03-17 23:29:18 CET ] [ Original post ]

DFHack 50.12-r2rc1

This beta release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]What needs testing?[/h2]
There are several large new features for this release that could use testing and feedback.
[h3]agitation-rebalance smooths out agitated creature attacks and cavern invasions[/h3]


This is the one that needs the most feedback, especially from people who have found the cavern invasions to be frustrating. The basic question is: after you turn this mod on, do you still find the caverns frustrating? Do you feel like the caverns are more fun to explore and utilize?

If you're just confused by the whole agitated animal and cavern invasion thing, there is an overview of how the vanilla system works here: https://docs.dfhack.org/en/latest/docs/tools/agitation-rebalance.html#how-the-df-agitation-system-works

The tl;dr is that your actions annoy nature, and nature retaliates..endlessly. Many people find the constant nature of the retaliation to be overwhelming. This mod tempers the retaliation so once you get attacked, you won't get attacked again until you specifically provoke nature further.

How to use


Open up gui/control-panel and go to the "Gameplay" tab. Turn on agitation-rebalance. If your difficulty settings are at any of the vanilla presets, that's all you have to do. If you have customized the difficulty settings, say to disable cavern invaders, run this command in gui/launcher:

agitation-rebalance preset lenient

If you want a tougher experience, you can instead run:

agitation-rebalance preset strict

If you want the visible monitor that shows your current chances of being attacked by nature, run:

agitation-rebalance enable monitor
[h3]fix/stuck-worship[/h3]


You may have noticed that some dwarves can never satisfy their need to worship. They get stuck praying to the same god over and over, but they never seem to get enough. Their job is listed as a purple "Worship!", which means that the need is so strong that they are unable to do anything else. The issue is that despite having needs to pray to several different gods, the dwarf only prays to one, even if they have already satisfied their need for that particular god. This fix ensures that each god gets their fair share of prayer time.

The fix is on by default -- it will start up as soon as you install this beta and load a fort -- but we'd like some verification that it works well in a wide variety of fort setups. If you have dwarves that are already stuck in a Worship! loop and have a backlog of gods they need to pray to, it may still take them a few days to pray themselves out of that hole. However, after a month or so, does your fort seem more productive than it was before? When your dwarves worship, is is now a friendly green instead of a dire purple?
[h3]work details import/export[/h3]


If you go to the Work Details screen (under "Labor"), you'll now see buttons for exporting, importing, and auto-importing your work details for new forts. Try it out! does it make setting up new forts easier?
[h3]autoretrain livestock[/h3]


This one is for those who like to domesticate wild animals. A newborn animal inherits the training level of its parents. If the parents were not yet fully domesticated, the newborn won't be either. If you don't notice that the animal was born and that it doesn't have a trainer assigned, the partial training will decay over time, and eventually the animal will revert to wild, possibly attacking your dwarves or other livestock.

The autoretrainer watches for newborn partially-trained livestock and assigns a trainer. That's it.

You can enable it from the Pets/Livestock screen (under "Creatures")
[h3]labor and skill restrictions for workshops[/h3]


This is a new overlay for workshop and furnace buildings where you can configure the workshop to only accept general work orders that pertain to specific labors (the list of allowed labors is different for every workshop).

For example, by default, all weapon, armor, and blacksmithing general manager orders get sent to all forges. With labor restrictions, you can designate specific forges to handle just weapons, just armor, or just metalsmithing. Then, you can assign appropriate legendary masters to each forge, and they will only receive orders for appropriate products.

Or, instead of assigning a workshop master, you can restrict the skill level to Master and above and leave the workshop at "This workshop is free for anybody to use.". This will allow any citizen that is at least a master of armorsmithing to use the workshop to complete the jobs there.

With labor and skill restrictions, you can simplify your work orders, leaving them generalized and not tied to specific shops. The restrictions will self-organize the orders so they get completed at the right places with the right pool of people, even if one or two masters meet an untimely demise.

Veteran players may remember this as a vanilla feature in pre-v50 Dwarf Fortress. This is actually still the case. The DFHack overlay simply provides a UI for the vanilla feature hiding beneath the surface, just like the civilian alert. There was a previous announcement and discussion of this feature here.
[h2]New Linux Steam launch behavior[/h2]

This one's just for the Linux folks. It's important that DF playtime metrics get to DF, so we updated our launcher on Linux to ensure that both DFHack and DF get marked as "running" when you're playing the game from the Steam client. If you're on Linux, could you try:
  • Launching DFHack from the Steam client
  • Launching DF from the Steam client

In both cases, Steam should show that both DF and DFHack are "running". Could you report back whether this is the case for you on your system?
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • agitation-rebalance: alter mechanics of irriation-related attacks so they are less constant and are more responsive to recent player bahavior
  • fix/stuck-worship: fix prayer so units don't get stuck in uninterruptible "Worship!" states
  • instruments: provides information on how to craft the instruments used by the player civilization.
  • modtools/item-trigger: (reinstated) modder's resource for triggering scripted content when specific items are used
[h2]New Features[/h2]
  • exterminate: new "disintegrate" kill method that additionally destroys carried items
  • gui/settings-manager: add import, export, and autoload for work details
  • logistics: autoretrain will automatically assign trainers to your partially-trained (but not yet domesticated) livestock. this prevents children of partially-trained parents from reverting to wild if you don't notice they were born
  • orders: add overlay for configuring labor and skill level restrictions for workshops
  • quickfort: allow setting of workshop profile properties (e.g. labor, skill restrictions) from build blueprints
  • sort: updated and reinstated military status/squad membership/burrow membership filter for work animal assignment screen
  • stocks: add button/hotkey for removing empty categories from the stocks list
[h2]Fixes[/h2]
  • autochop: fix underestimation of log yield for cavern mushrooms
  • catsplosion: only cause pregnancies in adults
  • control-panel: fix filtering not filtering when running the list command
  • gui/launcher:
    • fix detection on Shift-Enter for running commands and autoclosing the launcher
    • fix history scanning (Up/Down arrow keys) being slow to respond when in minimal mode
  • gui/notify:
    • prevent notification overlay from showing up in arena mode
    • don't zoom to forbidden depots for merchants ready to trade notification
  • logistics:
    • don't melt/trade/dump empty containers that happen to be sitting on the stockpile unless the stockpile accepts those item types
    • don't send autotrade items to forbidden depots
[h2]Misc Improvements[/h2]
  • Dreamfort: the four Craftsdwarf's workshops on the industry level are now specialized for Stonecrafting, Woodcrafting, Bone Carving, and miscellaneous tasks, respectively
  • When launched from the Steam client on Linux, both Dwarf Fortress and DFHack will be shown as "Running". This ensures that DF has proper accounting for Linux player usage.
  • autobutcher: prefer butchering partially trained animals and save fully domesticated animals to assist in wildlife domestication programs
  • autodump: can now teleport items loosely stored in buildings (clutter)
  • clean: protect farm plots when cleaning mud
  • control-panel: enable tweaks quietly on fort load so we don't spam the console
  • devel/tile-browser: simplify interface now that SDL automatically normalizes texture scale
  • exterminate: make race name matching case and space insensitive
  • gui/gm-editor: support opening engraved art for inspection
  • gui/launcher:
    • add interface for browsing and filtering commands by tags
    • add support for history search (Alt-s hotkey) when in minimal mode
    • add support for the clear command and clearing the scrollback buffer
  • gui/teleport: add global Ctrl-Shift-T keybinding (only avaiable when DFHack mortal mode is disabled)
  • suspendmanager: improve performance when there are many active jobs
  • tweak: add quiet option for silent enablement and disablement of tweaks
[h2]API[/h2]
  • Units :: isForgottenBeast: property check for forgotten beasts
  • Units :: isGreatDanger: now includes forgotten beasts
[h2]Lua[/h2]
  • helpdb: search_entries now returns a match if all filters in the include list are matched. previous behavior was to match if any include filter matched.
  • dfhack.units.isForgottenBeast: make new units method available to Lua
  • matinfo.decode: now directly handles plant objects
  • widgets.Label: *pen attributes can now either be a pen or a function that dynamically returns a pen
[h2]Structures[/h2]
  • plant_tree_info: define tree body and branch flags
  • plotinfo.hauling: name fields related to the hauling route panel
[h2]Documentation[/h2]
  • introduction: refresh getting started content
  • overlay-dev-guide: updated examples and troubleshooting steps
  • quickstart: refresh quickstart guide


[ 2024-03-12 09:40:52 CET ] [ Original post ]

DFHack 50.12-r1

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]Fixes[/h2]
  • gui/design: no longer comes up when Ctrl-D is pressed but other DFHack windows have focus
  • gui/notify: persist notification settings when toggled in the UI
[h2]Misc Improvements[/h2]
  • gui/launcher: developer mode hotkey restored to Ctrl-D
  • sort: squad assignment overlay rewritten for compatiblity with new vanilla data structures and screen layouts
[h2]Removed[/h2]
  • burrow: removed overlay 3D box select since it is now provided by the vanilla UI
  • sort: removed Search widgets for screens that now have vanilla search
[h2]API[/h2]
  • Gui :: getWidget: retrieve a vanilla DF widget by name or index
[h2]Lua[/h2]
  • dfhack.gui.getWidgetChildren: retrieve a list of child widgets for a given widget container
  • dfhack.gui.getWidget: retrieve a vanilla DF widget by hierarchy path, with each step specified by a widget name or index
>


[ 2024-03-06 21:18:02 CET ] [ Original post ]

DFHack 50.11-r7

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Extended notification and quick-zoom panel[/h3]


There are some things that the game doesn't notify you about, despite being very useful to know. The DFHack notification panel fills in those gaps. A small panel will now appear in the lower left corner when you're on the main map and specific conditions are met:
  • When agitated creatures enter the map. Clicking on the notification will zoom you to the first one. You can zoom to each agitated creature in turn by repeatedly clicking on the notification (or hitting the Enter key).
  • When invaders (or other hostiles) enter the map. You can zoom to each individual hostile just like you can for agitated creatures.
  • When a production mandate is nearing its deadline and someone will soon be punished for violating the mandate. Clicking on the notification will open the nobles screen so you can see what you're supposed to be producing. It will be the icon in angry red.
  • When a dwarf is in a strange mood. The notification will tell you what stage of the mood they are in (finding workshop, gathering materials, working on artifact) and will tell you if they can't find what they are looking for or are otherwise stuck.
  • When you have agreed to build a guildhall or temple, but have not yet done so. Clicking on the notification will give you details about what it was that you agreed to build.
  • When a merchant finishes unloading goods and is ready to trade. Clicking on the notification will zoom you to the trade depot.
  • When a unit is starving or stranded. Clicking on the notification will zoom you to the unit(s).
  • When a "curious" creature enters the map that will seek to steal your stuff.

If there are notifications you'd rather not see, click on the gear icon on the notification window and turn those notifications off. Don't worry if you don't see the notification window at all -- if there aren't any notifications to show, the notification window won't be visible. You can still get to the configuration interface by running gui/notify directly.


[h3]Tweak's bugfixes[/h3]


The tweak tool has been reinstated, along with its library of small tweaks that improve the UI or fix bugs from the DF bug tracker. These tweaks are on by default, but can be disabled (if you so wish) on the "Bug Fixes" tab of gui/control-panel.

It includes the following tweaks/fixes:
  • adamantine-cloth-wear: Prevents adamantine clothing from wearing out while being worn (Bug 6481).
  • craft-age-wear: Fixes crafted items not wearing out over time (Bug 6003). With this tweak, items made from cloth and leather will gain a level of wear every 20 in-game years.
  • eggs-fertile: Displays an indicator on fertile eggs.
  • fast-heat: Improves temperature update performance by ensuring that 1 degree of item temperature is crossed in no more than 100 ticks when updating from the environment temperature. This reduces the time it takes for temperature to reach equilibrium and improves FPS when there are many items.
  • flask-contents: Names filled waterskins, flasks, and vials according to their contents, the same way other containers such as barrels, bins, and cages are named. (Bug 4914)
  • partial-items: Displays percentages on partially-consumed items such as hospital cloth.
  • reaction-gloves: Fixes reactions to produce gloves in sets with correct handedness (Bug 6273).


[h3]Animal assignment UI improvements[/h3]


The DFHack animal assignment screen now displays the distance the creature is from the selected pasture/pit/cage/restraint. You can now also sort by distance.

There is now also an indicator for how many creatures you have assigned to the pasture/pit/cage/restraint.
[h3]Toggle animal designations from the animal info sheet[/h3]


When viewing the info sheet for an animal, you'll now get a small panel that allows you to mark (or unmark) the animal for butchering, gelding, or adoption. If the animal is not already domesticated, you'll also get a toggle for whether a trainer is assigned.


[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • add-thought: (reinstated) add custom thoughts to a dwarf
  • combat-harden: (reinstated) set a dwarf's resistence to being affected by visible corpses
  • devel/input-monitor: interactive UI for debugging input issues
  • gui/notify: display important notifications that vanilla doesn't support yet and provide quick zoom links to notification targets.
  • gui/petitions: (reinstated) show outstanding (or all historical) petition agreements for guildhalls and temples
  • list-waves: (reinstated) show migration wave information
  • make-legendary: (reinstated) make a dwarf legendary in specified skills
  • pet-uncapper: (reinstated, renamed from petcapRemover) allow pets to breed beyond the default population cap of 50
  • tweak: (reinstated) a collection of small bugfixes and gameplay tweaks
  • undump-buildings: (reinstated) remove dump designation from in-use building materials
[h2]New Features[/h2]
  • cleanowned: Add a "nodump" option to allow for confiscating items without dumping
  • tweak: Add "flask-contents", makes flasks/vials/waterskins be named according to their contents
[h2]Fixes[/h2]
  • autoclothing: Fix enabled behavior
  • caravan: display book and scroll titles in the goods and trade dialogs instead of generic scroll descriptions
  • dig-now: fix digging stairs in the surface sometimes creating underworld gates.
  • dig: overlay that shows damp designations in ASCII mode now propertly highlights tiles that are damp because of an aquifer in the layer above
  • fix/retrieve-units: prevent pulling in duplicate units from offscreen
  • gui/blueprint: changed hotkey for setting blueprint origin tile so it doesn't conflict with default map movement keys
  • gui/control-panel: fix error when toggling autostart settings
  • gui/design: clicking the center point when there is a design mark behind it will no longer simultaneously enter both mark dragging and center dragging modes. Now you can click once to move the shape, and click twice to move only the mark behind the center point.
  • gui/launcher: developer mode hotkey changed from Ctrl-D to Alt-D so as not to conflict with the hotkey for gui/design
  • item: avoid error when scanning items that have no quality rating (like bars and other construction materials)
  • source: fix issue where removing sources would make some other sources inactive
  • strangemood: correctly recognize Stonecutter and Stone Carver as moodable skills, move the Mason's boosted mood chance to the Stone Carver, and select Fell/Macabre based on long-term stress
  • warn-stranded:
    • don't complain about units that aren't on the map (e.g. soldiers out on raids)
    • when there was at least one truly stuck unit and miners were actively mining, the miners were also confusingly shown in the stuck units list
  • gui.View: getMouseFramePos: function now detects the correct coordinates even when the widget is nested within other frames
  • Gui:: makeAnnouncement, Gui:: autoDFAnnouncement: don't display popup for all announcement types
  • Gui:: revealInDwarfmodeMap: properly center the zoom even when the target tile is near the edge of the map
  • Units:: getVisibleName: don't reveal the true identities of units that are impersonating other historical figures
[h2]Misc Improvements[/h2]
  • autonestbox: assign egg layers to the nestbox they have chosen if they have already chosen a nestbox
  • buildingplan: use closest matching item rather than newest matching item
  • caravan: move goods to trade depot dialog now allocates more space for the display of the value of very expensive items
  • exportlegends: make progress increase smoothly over the entire export and increase precision of progress percentage
  • extinguish: allow selecting units/items/buildings in the UI to target them for extinguishing; keyboard cursor is only required for extinguishing map tiles that cannot be selected any other way
  • gui/autobutcher: ask for confirmation before zeroing out targets for all races
  • gui/mod-manager: will automatically unmark the default mod profile from being the default if it fails to load (due to missing or incompatible mods)
  • gui/quickfort:
    • can now dynamically adjust the dig priority of tiles designated by dig blueprints
    • can now opt to apply dig blueprints in marker mode
  • item:
    • change syntax so descriptions can be searched for without indicating the --description option. e.g. it's now item count royal instead of item count --description royal
    • add --verbose option to print each item as it is matched
  • probe: act on the selected building/unit instead of requiring placement of the keyboard cursor for bprobe and cprobe
  • regrass: also regrow depleted cavern moss
  • zone:
    • animal assignment dialog now shows distance to pasture/cage and allows sorting by distance
    • animal assignment dialog shows number of creatures assigned to this pasture/cage/etc.
[h2]Removed[/h2]
  • gui/create-tree: replaced by gui/sandbox
  • gui/manager-quantity: the vanilla UI can now modify manager order quantities after creation
  • warn-starving: combined into gui/notify
  • warn-stealers: combined into gui/notify
[h2]API[/h2]
  • Gui focus strings will now include dwarfmode/Default if the only other panel open is the Squads panel
  • Gui module Announcement functions now use DF's new announcement alert system
  • Gui:: addCombatReport, Gui:: addCombatReportAuto: add versions that take report * instead of report vector index
  • Gui:: MTB_clean, Gui:: MTB_parse, Gui:: MTB_set_width: new functions for manipulating markup_text_boxst
  • Gui:: revealInDwarfmodeMap: unfollow any currently followed units/items so the viewport doesn't just jump back to where it was
  • toupper_cp437(char), tolower_cp437(char): new MiscUtils functions, return a char with case changed, respecting CP437
  • toUpper, toLower: MiscUtils functions renamed to toUpper_cp437 and toLower_cp437, CP437 compliant
[h2]Lua[/h2]
  • Overlay framework now respects active and visible widget attributes
  • dfhack.gui announcement functions use default arguments when omitted
  • dfhack.units.getCitizens now only returns units that are on the map
  • dfhack.upperCp437(string), dfhack.lowerCp437(string): new functions, return string with all chars changed, respecting CP437 code page
[h2]Structures[/h2]
  • buildings_other: add correct types for civzone building vectors
  • job_skill: correct moodable property for several professions


[ 2024-03-03 07:41:08 CET ] [ Original post ]

DFHack 50.11-r5

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2]
The end-of-year holidays have brought a surge of DFHack development! There are many new features and tools to play with. In order to keep these highlights to a reasonable length, we can't even go through them all in detail -- see the Changelog section for a full list.
[h3]Be master of your domain with gui/embark-anywhere[/h3]


By popular request, you can now ask Armok to allow you to embark wherever you please!

If you run gui/embark-anywhere when youre choosing a site for embark, you can bypass any warnings the game gives you about potential embark locations. Want to embark in an inaccessible location on top of a mountain range? Go for it! Want to try a brief existence in the middle of the ocean? Nobody can stop you! Want to tempt fate by embarking inside of a necromancer tower? !!FUN!!

Any and all consequences of embarking in strange locations are up to you to handle (possibly with other armok tools).

The DFHack logo isn't shown on the embark screen (since it would cover the vanilla embark size adjustment widgets), but DFHack hotkeys still work, so you can still bring up the logo menu with Ctrl-Shift-C. There is also a convenience hotkey for running gui/embark-anywhere directly: Ctrl-A, which is only active when on the site choosing screen.

Note that this command (and its hotkey) will not be shown for those who have DFHack's "Mortal Mode" enabled in the gui/control-panel Preferences tab.


[h3]Bulk item management[/h3]


The new item commandline tool allows you to filter items in you fort by various properties (item type, material, wear-level, quality, etc.), and perform bulk operations like forbid, dump, melt, and their inverses. With one command, you can hide all boulders that are not in stockpiles, or mark all metal items that are less than masterwork quality for melting!

This tool also provides the underlying logic for a planned (but not yet written) GUI-based item management screen.




[h3]Squad equipment assignment fixing tool[/h3]


When you look at your squad equipment, there will be a new button that says "Detect conflicts". This will bring up a report of squad equipment issues, like:
  • squad members assigned to labors that cause issues with military uniforms: mining, hunting, and tree chopping
  • a single piece of equipment assigned to multiple squad members
  • citizens retaining squad membership (and equipment configuration) from previous forts (this can happen with migrants from forts that you have retired)

There's a button at the top of the report that attempts to fix all the problems. It will remove assignments for conflicting gear or will force your dwarves to drop what they have so they can pick it up in the correct order. Remember to click "Update equipment" after running the fixer so that new equipment gets assigned to units that need it.

It may take a few tries (give your dwarves some time to go get their new gear before you try again), but your forever-yellow equipment icons should finally turn green!


[h3]Visualize biome boundaries with gui/biomes[/h3]


If you have embarked at the intersection of two or more biomes, you may have trouble finding a place for your farm plots so that you can grow the crops you want. gui/biomes can show you where the boundaries are, and will also give you information about the biomes themselves, such as their savagery rating.


[h3]Bulk building management with gui/mass-remove[/h3]


gui/mass-remove has been around for a while, but has received a significant overhaul. You can box select a region and schedule all buildings, constructions, stockpiles, and/or zones for removal. Planned and fully built buildings/constructions can be selected independently. No need to rage quit if you accidentally plan a solid block of 400 walls instead of flooring! Clear it all away in a few clicks!

It can easily cancel removal of buildings or constructions that you have marked for removal as well.

Bring it up when on the main map with the Ctrl-M hotkey.


[h3]Auto-restore difficulty settings and standing orders for new embarks[/h3]


Do you find yourself having to remember to go turn corpse hauling off for your dear, bearded, impressionable children? Now, you can set it once, export, and have your settings automatically restored when you start a new embark. It's seamless, and is a huge time-saver for people with highly customized settings!

Both difficulty settings (in the pre-embark setup screen or the Settings screen when a fort is loaded) and standing orders (Labor -> Standing orders) can be saved and restored independently. When on those configuration screens, look for a DFHack overlay toggle where you can enable auto-restore for new embarks.


[h2]Announcements[/h2][h3]DFHack control panel changes[/h3]


The DFHack gui/control-panel interface received a significant overhaul. Tools are now categorized into subtabs, gathering the automation, bugfix, and gameplay tools into sublists. The file format for storing control panel configuration has changed as well. When you load this release of DFHack, your previous control panel settings will be seamlessly migrated to the new format. Other than the layout changes, which should make the tools you want easier to find, the primary behavior change is that some things that were only configured globally (like the tools on the now-gone "Maintenance" tab) are now configurable per-fort. There is also more information about what things are and what they do. For example, each overlay now has a short description.
[h3]Plugin ABI version bump[/h3]
If you are developing an external plugin for DFHack, be aware that the plugin binary interface (ABI) has changed in this version to support the new site-local persistence model. See changes to the sample code in https://github.com/DFHack/dfhack/tree/develop/plugins/examples for details. Any external plugins that target DF 50.11 will need to be recompiled against DFHack 50.11-r5 sources.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • control-panel: new commandline interface for control panel functions
  • gui/biomes: visualize and inspect biome regions on the map
  • gui/embark-anywhere:
    • new keybinding (active when choosing an embark site): Ctrl-A
    • bypass those pesky warnings and embark anywhere you want to
  • gui/reveal: temporarily unhide terrain and then automatically hide it again when you're ready to unpause
  • gui/teleport: mouse-driven interface for selecting and teleporting units
  • item: perform bulk operations on groups of items.
  • uniform-unstick: (reinstated) force squad members to drop items that they picked up in the wrong order so they can get everything equipped properly
[h2]New Features[/h2]
  • gui/mass-remove: new global keybinding: Ctrl-M while on the fort map
  • gui/settings-manager: save and load embark difficulty settings and standing orders; options for auto-load on new embark
  • sort: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
  • uniform-unstick: add overlay to the squad equipment screen to show a equipment conflict report and give you a one-click button to (attempt to) fix
  • zone: add button to location details page for retiring unused locations
[h2]Fixes[/h2]
  • DFHack tabs (e.g. in gui/control-panel) are now rendered correctly when there are certain vanilla screen elements behind them
  • Dreamfort: fix holes in the "Inside+" burrow on the farming level (burrow autoexpand is interrupted by the pre-dug miasma vents to the surface)
  • When passing map movement keys through to the map from DFHack tool windows, also pass fast z movements (shift-scroll by default)
  • ban-cooking: fix banning creature alcohols resulting in error
  • buildingplan:
    • when you save a game and load it again, newly planned buildings are now correctly placed in line after existing planned buildings of the same type
    • treat items in wheelbarrows as unavailable, just as vanilla DF does. Make sure the fix/empty-wheelbarrows fix is enabled so those items aren't permanently unavailable!
    • show correct number of materials required when laying down areas of constructions and some of those constructions are on invalid tiles
  • caravan: ensure items are marked for trade when the move trade goods dialog is closed even when they were selected and then the list filters were changed such that the items were no longer actively shown
  • confirm: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel)
  • empty-bin: now correctly sends ammunition in carried quivers to the tile underneath the unit instead of teleporting them to an invalid (or possibly just far away) location
  • fastdwarf:
    • prevent units from teleporting to inaccessible areas when in teledwarf mode
    • allow units to meander and satisfy needs when they have no current job and teledwarf mode is enabled
  • getplants: fix crash when processing mod-added plants with invalid materials
  • gui/design:
    • fix incorrect highlight when box selecting area in ASCII mode
    • fix incorrect dimensions being shown when you're placing a stockpile, but a start coordinate hasn't been selected yet
  • misery: fix error when changing the misery factor
  • quickfort: if a blueprint specifies an up/down stair, but the tile the blueprint is applied to cannot make an up stair (e.g. it has already been dug out), still designate a down stair if possible
  • reveal: now avoids revealing blocks that contain divine treasures, encased horrors, and deep vein hollows (so the surprise triggers are not triggered prematurely)
  • sort:
    • fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
    • fix potential crash when removing jobs directly from the Tasks info screen
  • source: water and magma sources and sinks now persist with fort across saves and loads
  • stonesense: fix crash in cleanup code after mega screenshot (Ctrl-F5) completes; however, the mega screenshot will still make stonesense unresponsive. close and open the stonesense window to continue using it.
  • suspendmanager: correctly handle building collisions with smoothing designations when the building is on the edge of the map
  • warn-stranded: don't warn for citizens who are only transiently stranded, like those on stepladders gathering plants or digging themselves out of a hole
  • Maps::getBiomeType, Maps::getBiomeTypeWithRef: fix identification of tropical oceans
[h2]Misc Improvements[/h2]
  • Dreamfort: put more chairs adjacent to each other to make the tavern more "social"
  • The "PAUSE FORCED" badge will blink briefly to draw attention if the player attempts to unpause when a DFHack tool window requires the game to be paused
  • wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
  • autochop: better error output when target burrows are not specified on the commandline
  • autoclothing : now does not consider worn (x) clothing as usable/available; reduces overproduction when using tailor at same time
  • buildingplan: add option for preventing constructions from being planned on top of existing constructions (e.g. don't build floors on top of floors)
  • burrow: flood fill now requires an explicit toggle before it is enabled to help prevent accidental flood fills
  • confirm:
    • updated confirmation dialogs to use clickable widgets and draggable windows
    • added confirmation prompt for right clicking out of the trade agreement screen (so your trade agreement selections aren't lost)
    • added confirmation prompts for irreversible actions on the trade screen
    • added confirmation prompt for deleting a uniform
    • added confirmation prompt for convicting a criminal
    • added confirmation prompt for re-running the embark site finder
    • added confirmation prompt for reassigning or clearing zoom hotkeys
    • added confirmation prompt for exiting the uniform customization page without saving
  • fastdwarf: now saves its state with the fort
  • fix/stuck-instruments: now handles instruments that are left in the "in job" state but that don't have any actual jobs associated with them
  • gui/autobutcher: interface redesigned to better support mouse control
  • gui/control-panel:
    • reduce frequency for warn-stranded check to once every 2 days
    • tools are now organized by type: automation, bugfix, and gameplay
  • gui/launcher:
    • now persists the most recent 32KB of command output even if you close it and bring it back up
    • make autocomplete case insensitive
  • gui/mass-remove:
    • can now differentiate planned constructions, stockpiles, and regular buildings
    • can now remove zones
    • can now cancel removal for buildings and constructions
  • gui/quickcmd: clickable buttons for command add/remove/edit operations
  • orders: reduce prepared meal target and raise booze target in basic importable orders in the orders library
  • sort:
    • add "Toggle all filters" hotkey button to the squad assignment panel
    • rename "Weak mental fortitude" filter to "Dislikes combat", which should be more understandable
  • uniform-unstick: warn if a unit belongs to a squad from a different site (can happen with migrants from previous forts)
  • warn-stranded: center the screen on the unit when you select one in the list
  • work-now: now saves its enabled status with the fort
  • zone:
    • add include/only/exclude filter for juveniles to the pasture/pit/cage/restraint assignment screen
    • show geld status and custom profession (if set, it's the lower editable line in creature description) in pasture/pit/cage/restraint assignment screen
[h2]Removed[/h2]
  • channel-safely: (temporarily) removed due to stability issues with the underlying DF API
  • persist-table: replaced by new dfhack.persistent API
[h2]API[/h2]
  • New plugin API for saving and loading persistent data. See plugins/examples/skeleton.cpp and plugins/examples/persistent_per_save_example.cpp for details
  • Plugin ABI (binary interface) version bump! Any external plugins must be recompiled against this version of DFHack source code in order to load.
  • capitalize_string_words: new MiscUtils function, returns string with all words capitalized
  • Constructions::designateRemove: no longer designates the non-removable "pseudo" construtions that represent the top of walls
  • grab_token_string_pos: new MiscUtils function, used for parsing tokens
  • Items: add item melting logic canMelt(item), markForMelting(item), and cancelMelting(item)
  • Persistence:
    • persistent keys are now namespaced by an entity_id (e.g. a player fort site ID)
    • data is now stored one file per entity ID (plus one for the global world) in the DF savegame directory
  • random_index, vector_get_random: new MiscUtils functions, for getting a random entry in a vector
  • Units.isDanger: now returns true for agitated wildlife
  • World:
    • GetCurrentSiteId() returns the loaded fort site ID (or -1 if no site is loaded)
    • IsSiteLoaded() check to detect if a site (e.g. a player fort) is active (as opposed to the world or a map)
    • AddPersistentData and related functions replaced with AddPersistentSiteData and AddPersistentWorldData equivalents
[h2]Lua[/h2]
  • dfhack.capitalizeStringWords: new function, returns string with all words capitalized
  • dfhack.isSiteLoaded: returns whether a site (e.g. a player fort) is loaded
  • dfhack.items: access to canMelt(item), markForMelting(item), and cancelMelting(item) from Items module
  • dfhack.persistent: new, table-driven API for easier world- and site-associated persistent storage. See the Lua API docs for details.
  • dfhack.world.getCurrentSite: returns the df.world_site instance of the currently loaded fort
  • widgets.Divider: linear divider to split an existing frame; configurable T-junction edges and frame style matching
[h2]Structures[/h2]
  • alert_button_announcement_id: now int32_t vector (contains report ids)
  • announcement_alertst: defined
  • announcement_alert_type: enum defined
  • announcement_type: added alert_type enum attribute
  • feature_init_flags: more enum values defined
  • markup_text_boxst: updated based on information from Bay12
  • markup_text_linkst, markup_text_wordst, script_environmentst: defined
  • occupation: realigned
  • plotinfost: unk23c8_flags renamed to flags, updated based on information from Bay12
  • service_orderst: type defined
  • service_order_type: enum defined
  • soundst: defined
  • viewscreen_choose_start_sitest: fix structure of warning flags -- convert series of bools to a proper bitmask
  • world_raws: unk_v50_1, unk_v50_2, unk_v50_3 renamed to text_set, music, sound
[h2]Documentation[/h2]
  • DFHack developer's guide updated, with refreshed architectural-diagrams
  • UTF-8 text in tool docs is now properly displayed in-game in gui/launcher (assuming that it can be converted to cp-437)
  • installing: Add installation instructions for wineskin on Mac
  • modding-guide: Add examples for script-only and blueprint-only mods that you can upload to DF's Steam Workshop


[ 2024-01-25 21:34:55 CET ] [ Original post ]

DFHack 50.11-r5rc3

This BETA release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]New features in need of feedback and testing[/h2][h3]Embark wherever you please[/h3]
By popular request, you can now laugh at Armok and embark wherever you please.

If you run gui/embark-anywhere when youre choosing a site for embark, you can bypass any warnings the game gives you about potential embark locations. Want to embark in an inaccessible location on top of a mountain range? Go for it! Want to try a brief existence in the middle of the ocean? Nobody can stop you! Want to tempt fate by embarking inside of a necromancer tower? !!FUN!!

Any and all consequences of embarking in strange locations are up to you to handle (possibly with other armok tools).
[h3]Item bulk management[/h3]
The item commandline tool allows you to filter items in you fort by various properties (e.g., item type, material, wear-level, quality, ), and perform bulk operations like forbid, dump, melt, and their inverses. With one command, you can hide all boulders that are not in stockpiles, or mark all metal items that are less than masterwork quality for melting!

This tool also provides the underlying logic for a planned (but not yet written) GUI-based item management screen.
[h3]Difficulty settings and standing orders auto-restore[/h3]
If you have preferred custom settings for difficulty or standing orders, it is toilsome to have to go in and manually set them for every embark. Do you find yourself having to remember to go turn corpse hauling off for your children? Now, you can set it once, export, and have your settings automatically restored when you start a new embark. It's seamless, and is a huge time-saver for people with highly customized settings!
[h3]Retire unused locations[/h3]
If you have locations (taverns, libraries, hospitals, temples) you don't need anymore, they just hang around and clutter up your list. Now, there's a button on the location details screen that you can click to retire the location and get it out of the way.
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • control-panel: new commandline interface for control panel functions
  • gui/biomes: visualize and inspect biome regions on the map
  • gui/embark-anywhere: bypass those pesky warnings and embark anywhere you want to
  • gui/reveal: temporarily unhide terrain and then automatically hide it again when you're ready to unpause
  • gui/teleport: mouse-driven interface for selecting and teleporting units
  • item: perform bulk operations on groups of items.
  • uniform-unstick: (reinstated) force squad members to drop items that they picked up in the wrong order so they can get everything equipped properly
[h2]New Features[/h2]
  • gui/mass-remove: new global keybinding: Ctrl-M while on the fort map
  • gui/settings-manager: save and load (optionally automatically) embark difficulty settings and standing orders
  • sort: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
  • uniform-unstick: add overlay to the squad equipment screen to show a equipment conflict report and give you a one-click button to fix
  • zone: add button to location details page for retiring unused locations
[h2]Fixes[/h2]
  • DFHack tabs (e.g. in gui/control-panel) are now rendered correctly when there are certain vanilla screen elements behind them
  • Dreamfort: fix holes in the "Inside+" burrow on the farming level (burrow autoexpand is interrupted by the pre-dug miasma vents to the surface)
  • When passing map movement keys through to the map from DFHack tool windows, also pass fast z movements (shift-scroll by default)
  • ban-cooking: fix banning creature alcohols resulting in error
  • buildingplan:
    • when you save a game and load it again, newly planned buildings are now correctly placed in line after existing planned buildings of the same type
    • show correct number of materials required when laying down areas of constructions and some of those constructions are on invalid tiles
  • confirm: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel)
  • empty-bin: now correctly sends ammunition in carried quivers to the tile underneath the unit instead of teleporting them to an invalid (or possibly just far away) location
  • getplants: fix crash when processing mod-added plants with invalid materials
  • gui/design: fix incorrect dimensions being shown when placing stockpiles, but a start coordinate hasn't been selected yet
  • misery: fix error when changing the misery factor
  • quickfort: if a blueprint specifies an up/down stair, but the tile the blueprint is applied to cannot make an up stair (e.g. it has already been dug out), still designate a down stair if possible
  • reveal: now avoids revealing blocks that contain divine treasures, encased horrors, and deep vein hollows (so the surprise triggers are not triggered prematurely)
  • sort:
    • fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
    • fix potential crash when removing jobs directly from the Tasks info screen
  • source: water and magma sources now persist with fort across saves and loads
  • suspendmanager: correctly handle building collisions with smoothing designations when the building is on the edge of the map
  • warn-stranded:
    • Automatically ignore citizens who are gathering plants or digging to avoid issues with gathering fruit via stepladders and weird issues with digging
    • Update onZoom to use df's centering functionality
[h2]Misc Improvements[/h2]
  • Dreamfort: put more chairs adjacent to each other to make the tavern more "social"
  • The "PAUSE FORCED" badge will blink briefly to draw attention if the player attempts to unpause when a DFHack tool window requires the game to be paused
  • wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
  • autochop: better error output when target burrows are not specified on the commandline
  • autoclothing : now does not consider worn (x) clothing as usable/available, should help with using with tailor at same time
  • buildingplan: add option for preventing constructions from being planned on top of existing constructions
  • burrow: flood fill now requires an explicit toggle before it is enabled to help prevent accidental flood fills
  • confirm:
    • updated confirmation dialogs to use clickable widgets and draggable windows
    • added confirmation prompt for right clicking out of the trade agreement screen (so your trade agreement selections aren't lost)
    • added confirmation prompts for irreversible actions on the trade screen
    • added confirmation prompt for deleting a uniform
    • added confirmation prompt for convicting a criminal
    • added confirmation prompt for re-running the embark site finder
    • added confirmation prompt for reassigning or clearing zoom hotkeys
    • added confirmation prompt for exiting the uniform customization page without saving
  • fastdwarf:
    • now saves its state with the fort
    • prevent units from teleporting to inaccessible areas when in teledwarf mode
    • allow units to meander and satisfy needs when they have no current job and teledwarf mode is enabled
  • fix/stuck-instruments: now handles instruments that are left in the "in job" state but that don't have any actual jobs associated with them
  • gui/autobutcher: interface redesigned to better support mouse control
  • gui/control-panel:
    • reduce frequency for warn-stranded check to once every 2 days
    • tools are now organized by type: automation, bugfix, and gameplay
  • gui/launcher:
    • now persists the most recent 32KB of command output even if you close it and bring it back up
    • make autocomplete case insensitive
  • gui/mass-remove:
    • can now differentiate planned constructions, stockpiles, and regular buildings
    • can now remove zones
    • can now cancel removal for buildings and constructions
  • gui/quickcmd: clickable buttons for command add/remove/edit operations
  • sort:
    • add "Toggle all filters" hotkey button to the squad assignment panel
    • rename "Weak mental fortitude" filter to "Dislikes combat", which should be more understandable
  • uniform-unstick: warn if a unit belongs to a squad from a different site (can happen with migrants from previous forts)
  • work-now: now saves its enabled status with the fort
  • zone:
    • add include/only/exclude filter for juveniles to the pasture/pit/cage/restraint assignment screen
    • show geld status and custom profession (2nd editable line in creature description) in pasture/pit/cage/restraint assignment screen
[h2]Removed[/h2]
  • channel-safely: (temporarily) removed due to stability issues with the underlying DF API
  • persist-table: replaced by new dfhack.persistent API
[h2]API[/h2]
  • New plugin API for saving and loading persistent data. See plugins/examples/skeleton.cpp and plugins/examples/persistent_per_save_example.cpp for details
  • Plugin ABI (binary interface) version bump! Any external plugins must be recompiled against this version of DFHack source code in order to load.
  • capitalize_string_words: new MiscUtils function, returns string with all words capitalized
  • grab_token_string_pos: new MiscUtils function, used for parsing tokens
  • Items: add item melting logic canMelt(item), markForMelting(item), and cancelMelting(item)
  • Persistence:
    • persistent keys are now namespaced by an entity_id (e.g. a player fort site ID)
    • data is now stored one file per entity ID (plus one for the global world) in the DF savegame directory
  • random_index, vector_get_random: new MiscUtils functions, for getting a random entry in a vector
  • Units.isDanger: now returns true for agitated wildlife
  • World:
    • GetCurrentSiteId() returns the loaded fort site ID (or -1 if no site is loaded)
    • IsSiteLoaded() check to detect if a site (e.g. a player fort) is active (as opposed to the world or a map)
    • AddPersistentData and related functions replaced with AddPersistentSiteData and AddPersistentWorldData equivalents
[h2]Lua[/h2]
  • dfhack.capitalizeStringWords: new function, returns string with all words capitalized
  • dfhack.isSiteLoaded: returns whether a site (e.g. a player fort) is loaded
  • dfhack.items: access to canMelt(item), markForMelting(item), and cancelMelting(item) from Items module
  • dfhack.persistent: new, table-driven API for easier world- and site-associated persistent storage. See the Lua API docs for details.
  • dfhack.world.getCurrentSite: returns the df.world_site instance of the currently loaded fort
  • widgets.Divider: linear divider to split an existing frame; configurable T-junction edges and frame style matching
[h2]Structures[/h2]
  • alert_button_announcement_id: now int32_t vector (contains report ids)
  • announcement_alertst: defined
  • announcement_alert_type: enum defined
  • announcement_type: added alert_type enum attribute
  • markup_text_boxst: updated based on information from Bay12
  • markup_text_linkst, markup_text_wordst, script_environmentst: defined
  • occupation: realigned
  • plotinfost: unk23c8_flags renamed to flags, updated based on information from Bay12
  • service_orderst: type defined
  • service_order_type: enum defined
  • soundst: defined
  • viewscreen_choose_start_sitest: fix structure of warning flags -- convert series of bools to a proper bitmask
  • world_raws: unk_v50_1, unk_v50_2, unk_v50_3 renamed to text_set, music, sound
[h2]Documentation[/h2]
  • UTF-8 text in tool docs is now properly displayed in-game in gui/launcher (assuming that it can be converted to cp-437)
  • installing: Add installation instructions for wineskin on Mac
  • modding-guide: Add examples for script-only and blueprint-only mods that you can upload to DF's Steam Workshop


[ 2024-01-19 19:16:17 CET ] [ Original post ]

DFHack 50.11-r5rc2

This BETA release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]New features in need of feedback and testing[/h2][h3]gui/control-panel layout overhaul[/h3]
The control panel received a significant overhaul. Tools are now categorized into subtabs, gathering the automation, bugfix, and gameplay tools into sublists. The file format for storing control panel configuration has changed as well. When you load this release of DFHack, your previous control panel settings should be seamlessly migrated to the new format. The main behavior change is that some things that were only configured globally (like the tools on the now-gone "Maintenance" tab) are now configurable per-fort. There is also more information about what things are. For example, each overlay now has a short description.

What do you think of the new layout and tab structure? Is it easier to find the tools you're looking for? Do you feel more confident about enabling new things?
[h3]gui/autobutcher mousification[/h3]
gui/autobutcher finally got updated with modern widgets and mouse gestures. You can now select fields to edit by double clicking on them. The list of livestock now also shows you the total counts per race, and the list of race targets is sortable and filterable. What do you think? Is it easier to use than the previous version? Pro tip: to unmark the slaughter tag from all animals of a particular race, double click on the number in the "Butchering ordered" column.
[h3]confirm rewrite and new prompts[/h3]
The confirm framework has been completely rewritten, and thanks to many good suggestions on Reddit, there are now a wide variety of new confirmation prompts that protect you from accidentally invoking irreversible and highly impactful UI operations (like disbanding a squad or deconstructing the trade depot while merchants are using it). Is there anything you think we've missed? What do you think of the new confirmation prompts? Is it easy to pause them when you want to (e.g. when deleting a bunch of manager orders)?
[h3]uniform-unstick uniform fixing tool[/h3]
When you look at your squad equipment, there will be a new button that says "Detect conflicts". This will bring up a report of squad equipment problems, such as squad members being assigned to conflicting labors like mining or hunting, or the same piece of equipment being assigned to multiple squad members, or even citizens being members of squads from different forts (this can happen with migrants from forts that you have retired). There's a button at the top of the report that attempts to fix all the problems. Does it work for you? Do your forever-yellow equipment icons finally turn green? Remember to click "Update equipment" after running the fixer so that new equipment gets assigned to units that need it.
[h3]gui/mass-remove now easier to use[/h3]
gui/mass-remove is our tool for easily removing multiple buildings and other things. It gained much more configurability, so you can now, for example, have it just remove planned buildings and ignore fully built ones. It can also cancel removal of buildings and constructions via area select. It has a global hotkey for quick access: Ctrl-M while on the main fort map. Give it a try and tell us if it works well for you when you need to remove a bunch of stuff.
[h3]gui/reveal for temporary xray vision[/h3]
I've seen people talk on Reddit and the Discord servers about how to plan your fort layout after you embark but before you unpause. Frequently, I see people advising use of reveal to see where the caverns are so you can plan your fort around them. This is always followed by the warning "Remember to run unreveal before you unpause! Otherwise the caverns get "discovered" early and then if you unreveal later then parts that you dug out will be hidden again and things get weird."

To make this process less error-prone, we now have gui/reveal. It reveals the map when it comes up and forces the game to pause while the gui/reveal window is open. You can scan around the map and designate digging for your fort. When you right click on the little gui/reveal window to close it, the map is hidden again, and you can play the game as normal.

You can choose to keep the map revealed, of course, but the more common case where only a temporary reveal is desired is much easier to handle now.
[h3]gui/biomes for biome boundary visualization[/h3]
If you have embarked at the intersection of two or more biomes, you may have trouble finding a place for your farm plots so that you can grow the crops you want. gui/biomes can show you where the boundaries are, and will also give you information about the biomes themselves, such as their wildness rating.
[h3]gui/teleport for mouse-driven unit teleporting[/h3]
Another painful process I've seen discussed on Reddit relates to when a unit gets into an impossible situation, like when they dodge into a wall or (sometimes) into the unexplored regions of a cavern and they can't get out. This tends to tank your FPS and make the game unplayable. The commandline teleport command does exist, but it's a multi-step process. You have to find the unit ID of the rogue unit, enable the keyboard cursor, get the position of where to teleport the unit to, and feed all that information into the teleport command. Now, with gui/teleport, it's point and click. It also comes with some handy filters for when you're trying to rescue friendly units from among hostiles. You can area select and only pick out the citizens and friendly units.
[h2]Announcements[/h2][h3]Plugin ABI version bump[/h3]
If you are developing an external plugin for DFHack, be aware that the plugin binary interface (ABI) has changed to support the new site-local persistence model. See changes to the sample code in https://github.com/DFHack/dfhack/tree/develop/plugins/examples for details.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • control-panel: new commandline interface for control panel functions
  • gui/biomes: visualize and inspect biome regions on the map
  • gui/reveal: temporarily unhide terrain and then automatically hide it again when you're ready to unpause
  • gui/teleport: mouse-driven interface for selecting and teleporting units
  • uniform-unstick: (reinstated) force squad members to drop items that they picked up in the wrong order so they can get everything equipped properly
[h2]New Features[/h2]
  • gui/mass-remove: new global keybinding: Ctrl-M while on the fort map
  • sort: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
  • uniform-unstick: add overlay to the squad equipment screen to show a equipment conflict report and give you a one-click button to fix
[h2]Fixes[/h2]
  • When passing map movement keys through to the map from DFHack tool windows, also pass fast z movements (shift-scroll by default)
  • ban-cooking: fix banning creature alcohols resulting in error
  • confirm: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel)
  • getplants: fix crash when processing mod-added plants with invalid materials
  • misery: fix error when changing the misery factor
  • quickfort: if a blueprint specifies an up/down stair, but the tile the blueprint is applied to cannot make an up stair (e.g. it has already been dug out), still designate a down stair if possible
  • reveal: now avoids revealing blocks that contain divine treasures, encased horrors, and deep vein hollows (so the surprise triggers are not triggered prematurely)
  • sort:
    • fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
    • fix potential crash when removing jobs directly from the Tasks info screen
  • source: water and magma sources now persist with fort across saves and loads
  • warn-stranded:
    • Automatically ignore citizens who are gathering plants or digging to avoid issues with gathering fruit via stepladders and weird issues with digging
    • Update onZoom to use df's centering functionality
[h2]Misc Improvements[/h2]
  • The "PAUSE FORCED" badge will blink briefly to draw attention if the player attempts to unpause when a DFHack tool window requires the game to be paused
  • wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
  • autochop: better error output when target burrows are not specified on the commandline
  • autoclothing : now does not consider worn (x) clothing as usable/available, should help with using with tailor at same time
  • burrow: flood fill now requires an explicit toggle before it is enabled to help prevent accidental flood fills
  • confirm:
    • updated confirmation dialogs to use clickable widgets and draggable windows
    • added confirmation prompt for right clicking out of the trade agreement screen (so your trade agreement selections aren't lost)
    • added confirmation prompts for irreversible actions on the trade screen
    • added confirmation prompt for deleting a uniform
    • added confirmation prompt for convicting a criminal
    • added confirmation prompt for re-running the embark site finder
    • added confirmation prompt for reassigning or clearing zoom hotkeys
    • added confirmation prompt for exiting the uniform customization page without saving
  • fastdwarf:
    • now saves its state with the fort
    • prevent units from teleporting to inaccessible areas when in teledwarf mode
    • allow units to meander and satisfy needs when they have no current job and teledwarf mode is enabled
  • gui/autobutcher: interface redesigned to better support mouse control
  • gui/control-panel:
    • reduce frequency for warn-stranded check to once every 2 days
    • tools are now organized by type: automation, bugfix, and gameplay
  • gui/launcher: now persists the most recent 32KB of command output even if you close it and bring it back up
  • gui/mass-remove:
    • can now differentiate planned constructions, stockpiles, and regular buildings
    • can now remove zones
    • can now cancel removal for buildings and constructions
  • gui/quickcmd: clickable buttons for command add/remove/edit operations
  • sort:
    • add "Toggle all filters" hotkey button to the squad assignment panel
    • rename "Weak mental fortitude" filter to "Dislikes combat", which should be more understandable
  • uniform-unstick: warn if a unit belongs to a squad from a different site (can happen with migrants from previous forts)
  • work-now: now saves its enabled status with the fort
  • zone: add include/only/exclude filter for juveniles to the pasture/pit/cage/restraint assignment screen
[h2]Removed[/h2]
  • channel-safely: (temporarily) removed due to stability issues with the underlying DF API
  • persist-table: replaced by new dfhack.persistent API
[h2]API[/h2]
  • New plugin API for saving and loading persistent data. See plugins/examples/skeleton.cpp and plugins/examples/persistent_per_save_example.cpp for details
  • Plugin ABI (binary interface) version bump! Any external plugins must be recompiled against this version of DFHack source code in order to load.
  • capitalize_string_words: new MiscUtils function, returns string with all words capitalized
  • grab_token_string_pos: new MiscUtils function, used for parsing tokens
  • Items: add item melting logic canMelt(item), markForMelting(item), and cancelMelting(item)
  • Persistence:
    • persistent keys are now namespaced by an entity_id (e.g. a player fort site ID)
    • data is now stored one file per entity ID (plus one for the global world) in the DF savegame directory
  • random_index, vector_get_random: new MiscUtils functions, for getting a random entry in a vector
  • World:
    • GetCurrentSiteId() returns the loaded fort site ID (or -1 if no site is loaded)
    • IsSiteLoaded() check to detect if a site (e.g. a player fort) is active (as opposed to the world or a map)
    • AddPersistentData and related functions replaced with AddPersistentSiteData and AddPersistentWorldData equivalents
[h2]Lua[/h2]
  • dfhack.capitalizeStringWords: new function, returns string with all words capitalized
  • dfhack.isSiteLoaded: returns whether a site (e.g. a player fort) is loaded
  • dfhack.items: access to canMelt(item), markForMelting(item), and cancelMelting(item) from Items module
  • dfhack.persistent: new, table-driven API for easier world- and site-associated persistent storage. See the Lua API docs for details.
  • dfhack.world.getCurrentSite: returns the df.world_site instance of the currently loaded fort
  • widgets.Divider: linear divider to split an existing frame; configurable T-junction edges and frame style matching
[h2]Structures[/h2]
  • alert_button_announcement_id: now int32_t vector (contains report ids)
  • announcement_alertst: defined
  • announcement_alert_type: enum defined
  • announcement_type: added alert_type enum attribute
  • markup_text_boxst: updated based on information from Bay12
  • markup_text_linkst, markup_text_wordst, script_environmentst: defined
  • occupation: realigned
  • plotinfost: unk23c8_flags renamed to flags, updated based on information from Bay12
  • service_orderst: type defined
  • service_order_type: enum defined
  • soundst: defined
  • world_raws: unk_v50_1, unk_v50_2, unk_v50_3 renamed to text_set, music, sound
[h2]Documentation[/h2]
  • UTF-8 text in tool docs is now properly displayed in-game in gui/launcher (assuming that it can be converted to cp-437)
  • installing: Add installation instructions for wineskin on Mac
  • modding-guide: Add examples for script-only and blueprint-only mods that you can upload to DF's Steam Workshop


[ 2024-01-14 12:09:24 CET ] [ Original post ]

DFHack 50.11-r5rc1

This BETA release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]New features in need of feedback and testing[/h2][h3]gui/control-panel layout overhaul[/h3]
The control panel received a significant overhaul. Tools are now categorized into subtabs, gathering the automation, bugfix, and gameplay tools into sublists. The file format for storing control panel configuration has changed as well. When you load this release of DFHack, your previous control panel settings should be seamlessly migrated to the new format.

What do you think of the new layout and tab structure? Is it easier to find the tools you're looking for? Do you feel more confident about enabling new things?
[h3]gui/autobutcher mousification[/h3]
gui/autobutcher finally got updated with modern widgets and mouse gestures. You can now select fields to edit by double clicking on them. The list of livestock now also shows you the total counts per race, and the list of race targets is sortable and filterable. What do you think? Is it easier to use than the previous version? Pro tip: to unmark the slaughter tag from all animals of a particular race, double click on the number in the "Butchering ordered" column.
[h3]confirm rewrite and new prompts[/h3]
The confirm framework has been completely rewritten, and thanks to many good suggestions on Reddit, there are now a wide variety of new confirmation prompts that protect you from accidentally invoking irreversible and highly impactful UI operations (like disbanding a squad or deconstructing the trade depot while merchants are using it). Is there anything you think we've missed? What do you think of the new confirmation prompts? Is it easy to pause them when you want to (e.g. when deleting a bunch of manager orders)?
[h3]uniform-unstick uniform fixing tool[/h3]
When you look at your squad equipment, there will be a new button that says "Detect conflicts". This will bring up a report of squad equipment problems, such as squad members being assigned to conflicting labors like mining or hunting, or the same piece of equipment being assigned to multiple squad members. There's a button at the top of the report that attempts to fix all the problems. Does it work for you? Do your forever-yellow equipment icons finally turn green? Remember to click "Update equipment" after running the fixer so that new equipment gets assigned to units that need it.
[h3]gui/mass-remove now easier to use[/h3]
gui/mass-remove is our tool for easily removing multiple buildings and other things. It gained much more configurability, so you can now, for example, have it just remove planned buildings and ignore fully built ones. It now also has a global hotkey for quick access: Ctrl-M while on the main fort map. Give it a try and tell us if it works well for you when you need to remove a bunch of stuff.
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New Tools[/h2]
  • control-panel: new commandline interface for control panel functions
  • uniform-unstick: (reinstated) force squad members to drop items that they picked up in the wrong order so they can get everything equipped properly
[h2]New Features[/h2]
  • gui/mass-remove: new global keybinding: Ctrl-M while on the fort map
  • sort: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
  • uniform-unstick: add overlay to the squad equipment screen to show a equipment conflict report and give you a one-click button to fix
[h2]Fixes[/h2]
  • ban-cooking: fix banning creature alcohols resulting in error
  • confirm: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel)
  • misery: fix error when changing the misery factor
  • reveal: now avoids revealing blocks that contain divine treasures, encased horrors, and deep vein hollows (so the surprise triggers are not triggered prematurely)
  • sort:
    • fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
    • fix potential crash when removing jobs directly from the Tasks info screen
  • warn-stranded:
    • Automatically ignore citizens who are gathering plants or digging to avoid issues with gathering fruit via stepladders and weird issues with digging
    • Update onZoom to use df's centering functionality
[h2]Misc Improvements[/h2]
  • wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
  • autochop: better error output when target burrows are not specified on the commandline
  • confirm:
    • updated confirmation dialogs to use clickable widgets and draggable windows
    • added confirmation prompt for right clicking out of the trade agreement screen (so your trade agreement selections aren't lost)
    • added confirmation prompts for irreversible actions on the trade screen
    • added confirmation prompt for deleting a uniform
    • added confirmation prompt for convicting a criminal
    • added confirmation prompt for re-running the embark site finder
    • added confirmation prompt for reassigning or clearing zoom hotkeys
    • added confirmation prompt for exiting the uniform customization page without saving
  • gui/autobutcher: interface redesigned to better support mouse control
  • gui/control-panel:
    • reduce frequency for warn-stranded check to once every 2 days
    • tools are now organized by type: automation, bugfix, and gameplay
  • gui/launcher: now persists the most recent 32KB of command output even if you close it and bring it back up
  • gui/mass-remove:
    • can now differentiate planned constructions, stockpiles, and regular buildings
    • can now remove zones
  • gui/quickcmd: clickable buttons for command add/remove/edit operations
  • work-now: now saves its enabled status with the fort
[h2]Structures[/h2]
  • alert_button_announcement_id: now int32_t vector (contains report ids)
  • announcement_alertst: defined
  • announcement_alert_type: enum defined
  • announcement_type: added alert_type enum attribute
  • markup_text_boxst: updated based on information from Bay12
  • markup_text_linkst, markup_text_wordst, script_environmentst: defined
  • plotinfost: unk23c8_flags renamed to flags, updated based on information from Bay12
  • soundst: defined
  • world_raws: unk_v50_1, unk_v50_2, unk_v50_3 renamed to text_set, music, sound
[h2]Documentation[/h2]
  • UTF-8 text in tool docs is now properly displayed in-game in gui/launcher (assuming that it can be converted to cp-437)
  • installing: Add installation instructions for winskin on Mac
  • modding-guide: Add examples for script-only and blueprint-only mods that you can upload to DF's Steam Workshop


[ 2024-01-05 12:07:38 CET ] [ Original post ]

DFHack 50.11-r4

This release is compatible with all 50.11 distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!

This is a quick release that addresses some small but important bug fixes and quality of life improvements. See the Changelog below for details.
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Changelog[h2]New tools[/h2]
  • build-now: (reinstated) instantly complete unsuspended buildings that are ready to be built
[h2]Fixes[/h2]
  • RemoteServer: don't shut down the socket prematurely, allowing continuing connections from, for example, dfhack-run
  • buildingplan: fix choosing the wrong mechanism (or something that isn't a mechanism) when linking a lever and manually choosing a mechanism, but then canceling the selection
  • combine: prevent stack sizes from growing beyond quantities that you would normally see in vanilla gameplay
  • sort:
    • fix potential crash when exiting and re-entering a creatures subtab with a search active
    • prevent keyboard keys from affecting the UI when search is active and multiple keys are hit at once
  • tailor: fix corner case where existing stock was being ignored, leading to over-ordering
[h2]Misc Improvements[/h2]
  • buildingplan:
    • save magma safe mechanisms for when magma safety is requested when linking levers and pressure plates to targets
    • when choosing mechanisms for linking levers/pressure plates, filter out unreachable mechanisms
  • caravan: enable searching within containers in trade screen when in "trade bin with contents" mode
  • sort: when searching on the Tasks tab, also search the names of the things the task is associated with, such as the name of the stockpile that an item will be stored in


[ 2023-11-22 20:40:46 CET ] [ Original post ]

DFHack 50.11-r4 (pre-release)

[h2]New Tools[/h2]

  • build-now: (reinstated) instantly complete unsuspended buildings that are ready to be built
[h2]Fixes[/h2]
  • RemoteServer: don't shut down the socket prematurely, allowing continuing connections from, for example, dfhack-run
  • buildingplan: fix choosing the wrong mechanism (or something that isn't a mechanism) when linking a lever and manually choosing a mechanism, but then canceling the selection
  • sort:
    • fix potential crash when exiting and re-entering a creatures subtab with a search active
    • prevent keyboard keys from affecting the UI when search is active and multiple keys are hit at once
  • tailor: fix corner case where existing stock was being ignored, leading to over-ordering
[h2]Misc Improvements[/h2]
  • buildingplan:
    • save magma safe mechanisms for when magma safety is requested when linking levers and pressure plates to targets
    • when choosing mechanisms for linking levers/pressure plates, filter out unreachable mechanisms
  • caravan: enable searching within containers in trade screen when in "trade bin with contents" mode
  • combine: prevent stack sizes from growing beyond quantities that you would normally see in vanilla gameplay
  • sort: when searching on the Tasks tab, also search the names of the things the task is associated with, such as the name of the stockpile that an item will be stored in


[ 2023-11-22 03:36:40 CET ] [ Original post ]

DFHack 50.11-r3

This release is compatible with all distributions of Dwarf Fortress v50.11: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Selection dimension indicator[/h3]



At long last, we have a measurement tooltip that follows the cursor when you are designating an area, for example when painting burrows, stockpiles, or digging designations.



[h3]Choose mechanisms for linking[/h3]



Have you ever needed to link a lever to a floodgate or bridge that will be holding back magma, and then been frustrated when you found you had no control over whether a magma-safe mechanism was chosen to make the link?

The mechanism linking dialog is now integrated with buildingplan, giving you quick filters for autoselecting a mechanism based on how much heat it will need to withstand or letting you choose a specific mechanism from your stock. This feature is available for linking both levers and pressure plates.



[h3]Burrows![/h3]
Burrows got a lot of attention in this release. In DF, burrows are useful for defining areas that limit:
  • where assigned units perform tasks
  • where civilians can go for protection during an emergency (using gui/civ-alert)
  • where woodcutters harvest (or clearcut) trees (using gui/autochop)
  • where squad members gather to defend against threats

but they can be a bit of a pain to work with. For example, setting up the burrow area across a multi-level fortress requires tedious box selection on every z-level. And when you have a 'Safe/Inside' burrow, it's difficult to remember to extend the burrow whenever you do some digging and expand your living area.

Also, if you have your units assigned to burrows for job purposes, it's also difficult to manage who is assigned where. Notably, if a unit dies while assigned to a burrow, you can't unassign that (dead) unit from the burrow and your count of assigned units will be inaccurate.

In light of all this, DFHack now provides a wide range of new burrow-related capabilities that should make them more fun and efficient to use.

Special thanks to Black-Talon for excellent suggestions and significant help with testing these features!
[h3]3D box select[/h3]



First of all, the vanilla box select that was limited to painting a single z-level at a time is replaced with a 3D selection box that can paint a burrow across your fort's z-levels at once!



[h3]Flood fill[/h3]



Second, if you double click on a tile, you'll get a handy flood fill. This means that if you double click on the floor inside of your fort, the selection will flood to your entire fort on that level. The selection will include the adjacent walls so they can be smoothed and engraved by units that are assigned to the burrow itself.



Hold down Shift when you double click and you'll allow the flood to expand across z-levels. You can define a burrow for your entire fort with one shift-double click! The flood stops at forbidden doors and closed bridges, so it won't include the caverns if you have them blocked off. If you do accidentally include the caverns, erase a boundary between your fort and the caverns and shift-double click on the cavern side to remove just the cavern tiles from your burrow, just like the bucket tool in a painting app.



[h3]Auto-expanding burrows[/h3]



Third, you can set a burrow to auto-expand as you dig. If you name a burrow with a trailing plus symbol (+), like "Inside+", then as your miners dig, the burrow will automatically expand to include the newly exposed tiles. Make sure to include the surrounding walls in your original burrow designation so the auto expansion checks know which wall tiles to monitor.



[h3]Search filters[/h3]



Fourth, there are updated unit search and filters for easier unit burrow assignment. The search widgets on the burrow assignment screen have gained the ability to filter by burrow membership, so you can easily add or remove one burrow's members when working with another burrow.



[h3]Supporting tools[/h3]



There are also supporting tools that make burrows more useful. If you turn on dead-units-burrow in the gui/control-panel "Maintenance" tab, then units will automatically be removed from your burrows when they die. The quickfort blueprinting tool can now create new burrows and add tiles to existing ones. It can even register a burrow with gui/civ-alert or autochop, saving you some manual steps when you are laying down plans for your fortress. The Dreamfort set of quickfort blueprints takes advantage of this to set up more of your fort for you automatically.



[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor). We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Generated release notes[h2]New Tools[/h2]
  • burrow: (reinstated) automatically expand burrows as you dig
  • sync-windmills: synchronize or randomize movement of active windmills
  • trackstop: (reimplemented) integrated overlay for changing track stop and roller settings after construction
[h2]New Features[/h2]
  • buildingplan: allow specific mechanisms to be selected when linking levers or pressure plates
  • burrow: integrated 3d box fill and 2d/3d flood fill extensions for burrow painting mode
  • fix/dead-units: gained ability to scrub dead units from burrow membership lists
  • gui/design: show selected dimensions next to the mouse cursor when designating with vanilla tools, for example when painting a burrow or designating digging
  • prospect: can now give you an estimate of resources from the embark screen. hover the mouse over a potential embark area and run prospect.
  • quickfort: new burrow blueprint mode for designating or manipulating burrows
  • sort: military and burrow membership filters for the burrow assignment screen
  • unforbid: now ignores worn and tattered items by default (X/XX), use -X to bypass
[h2]Fixes[/h2]
  • RemoteServer: continue to accept connections as long as the listening socket is valid instead of closing the socket after the first disconnect
  • buildingplan: edit filter interface now uses ctrl-x to reset the filter to avoid conflict with increasing the filter's minimum quality (shift-x)
  • caravan: price of vermin swarms correctly adjusted down. a stack of 10000 bees is worth 10, not 10000
  • emigration: fix clearing of work details assigned to units that leave the fort
  • gui/unit-syndromes: show the syndrome names properly in the UI
  • sort: when filtering out already-established temples in the location assignment screen, also filter out the "No specific deity" option if a non-denominational temple has already been established
  • stockpiles: hide configure and help buttons when the overlay panel is minimized
  • tailor: fix crash on Linux where scanned unit is wearing damaged non-clothing (e.g. a crown)
[h2]Misc Improvements[/h2]
  • buildingplan:
    • display how many items are available on the planner panel
    • make it easier to build single-tile staircases of any shape (up, down, or up/down)
  • dreamfort: "Inside+" and "Clearcutting" burrows now automatically created and managed
  • sort:
    • allow searching by profession on the squad assignment page
    • add search for places screens
    • add search for work animal assignment screen; allow filtering by miltary/squad/civilian/burrow
    • on the squad assignment screen, make effectiveness and potential ratings use the same scale so effectiveness is always less than or equal to potential for a given unit. this way you can also tell when units are approaching their maximum potential
    • new overlay on the animal assignment screen that shows how many work animals each visible unit already has assigned to them
  • warn-stranded: don't warn for units that are temporarily on unwalkable tiles (e.g. as they pass under a waterfall)
[h2]Removed[/h2]
  • gui/control-panel:
    • removed always-on system services from the System tab: buildingplan, confirm, logistics, and overlay. The base services should not be turned off by the player. Individual confirmation prompts can be managed via gui/confirm, and overlays (including those for buildingplan and logistics) are managed on the control panel Overlays tab.
    • removed autolabor from the Fort and Autostart tabs. The tool does not function correctly with the new labor types, and is causing confusion. You can still enable autolabor from the commandline with enable autolabor if you understand and accept its limitations.
[h2]API[/h2]
  • Buildings:: completebuild: used to link a newly created building into the world
  • Burrows:: setAssignedUnit: now properly handles inactive burrows
  • Gui:: getMousePos: now takes an optional allow_out_of_bounds parameter so coordinates can be returned for mouse positions outside of the game map (i.e. in the blank space around the map)
  • Gui:: revealInDwarfmodeMap: gained highlight parameter to control setting the tile highlight on the zoom target
  • Maps:: getWalkableGroup: get the walkability group of a tile
  • Units:: getReadableName: now returns the untranslated name
[h2]Lua[/h2]
  • dfhack.buildings.completebuild: expose new module API
  • dfhack.gui.getMousePos: support new optional allow_out_of_bounds parameter
  • dfhack.gui.revealInDwarfmodeMap: gained highlight parameter to control setting the tile highlight on the zoom target
  • dfhack.maps.getWalkableGroup: get the walkability group of a tile
  • gui.FRAME_THIN: a panel frame suitable for floating tooltips
[h2]Structures[/h2]
  • burrow: add new graphics mode texture and color fields
  • job_item_flags3: identify additional flags
[h2]Documentation[/h2]
  • Document the Lua API for the dfhack.world module


[ 2023-11-16 17:32:13 CET ] [ Original post ]

DFHack 50.11-r2

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Search! Search! Search![/h3]
We finally have search widgets for many of the screens with long lists. No longer will you need to scroll endlessly to find Bim Zasitisos, Cook. You can just type "bim", or "cook", or maybe "knifedales", since that's what "Zasitisos" translates to and it's the name you see in some contexts. You can also search by the name of the job they're currently doing. Or hey, search for "forgotten" on the "Others" tab to see which forgotten beasts you've actually forgotten about in the caverns:





For each screen, you can click on the search field to focus it or hit the keyboard hotkey (Alt-s) and start typing. Just like all DFHack text entry fields, you can hit Ctrl-x to clear the text or Ctrl-v to paste from your operating system clipboard.

Remember that you can search for more than just the name. Some examples:
  • Search for "steel short sword" when choosing artifacts to send a raid for
  • Search for "appraisal" when choosing a broker

Some screens come with additional filters. For example, in the "Engrave slab" menu, you can click a button and see just the units that you need to engrave a slab for to prevent ghosts. Similarly, when choosing which guildhall or temple to establish, you can now filter out the ones that you've already established. Now you can create chapels for each of the 40 deities that your dwarves somehow find time to worship and be confident that you aren't wasting space on duplicates.

The Justice tabs in particular received the most filtering capabilities. You can now easily see just the high-risk visitors you should be paying attention to (e.g. intelligent undead or professional criminals).

In all, DFHack has added search widgets to more than 30 screens/lists:
  • Info -> Creatures -> Citizens
  • Info -> Creatures -> Pets/Livestock
  • Info -> Creatures -> Pets/Livestock -> Overall Training
  • Info -> Creatures -> Pets/Livestock -> Assign Trainer
  • Info -> Creatures -> Others
  • Info -> Creatures -> Dead/Missing
  • Info -> Tasks
  • Info -> Labor -> Work details
  • Info -> Nobles -> Choose candidate
  • Info -> Objects -> Artifacts
  • Info -> Objects -> Symbols
  • Info -> Objects -> Named objects
  • Info -> Objects -> Written content
  • Info -> Justice -> * -> Interrogate
  • Info -> Justice -> * -> Convict
  • Location selector -> Temple
  • Location selector -> Guildhall
  • Unit selector -> Bedroom
  • Unit selector -> Office
  • Unit selector -> Dining hall
  • Unit selector -> Tomb
  • Unit selector -> Workshop worker
  • Unit selector -> Occupation
  • Unit selector -> Burrow
  • Unit selector -> Squad kill order
  • Unit selector -> Squad assignment
  • Stoneworker's workshop -> Engrave slab -> Choose unit to memorialize

In addition, DFHack assists these workflows with searchable/filterable selection dialogs:
  • Zone -> Pasture -> Assignment
  • Zone -> Pit -> Assignment
  • Cage -> Assignment
  • Restraint -> Assignment
  • Pedestal -> Choose item for display
  • Trade depot -> Bring items to depot
  • Trade depot -> Trade
[h3]Preserve tomb assignments[/h3]
Have you noticed that your nobles don't actually get buried in the nice tombs you assigned to them while they were alive and demanding nice tombs? This is because DF loses track of that assignment when they die, which is amusingly and tragically ironic.



Enable preserve-tombs in the DFHack gui/control-panel ("Fort" and "Autostart" tabs) to keep track of those tomb assignments and ensure they are actually used for their intended purposes.
[h3]Single click collapse all for stocks screen[/h3]
Often, you just want to know how many of each category of thing you have. The group info bars have that information, but you need to click on each of them to collapse them to see more than one of them at a time. Now there is a solution to collapse all visible groups with one click. There is now a button off the right side of the stocks panel that says "collapse all". Click that button or hit the hotkey (Ctrl-x) to collapse everything down to a single line each.





[h3]Automatic tomb zone creation[/h3]
Setting up tombs is a chore. You have to place the coffins, and then for each coffin, you have to declare a Tomb zone. With the burial command, you can get those Tomb zones created for you automatically. Just run the command after you place the coffins to get the Tomb zones for free. No extra clicks!



[h3]Get notified for stranded citizens[/h3]
Have you ever closed off the caverns and only later noticed that you had dwarves trapped down there? With warn-stranded, you can get notified quickly that you have citizens that can't reach their peers. You'll then have enough time to organize a rescue mission before they start starving. It also catches units stuck in trees or in pits.



[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Generated release notes[h2]New Tools[/h2]
  • add-recipe: (reinstated) add reactions to your civ (e.g. for high boots if your civ didn't start with the ability to make high boots)
  • burial: (reinstated) create tomb zones for unzoned coffins
  • fix/corrupt-jobs: prevents crashes by automatically removing corrupted jobs
  • preserve-tombs: keep tombs assigned to units when they die
  • spectate: (reinstated) automatically follow dwarves, cycling among interesting ones
[h2]New Scripts[/h2]
  • warn-stranded: new repeatable maintenance script to check for stranded units, similar to warn-starving
[h2]New Features[/h2]
  • burial: new options to configure automatic burial and limit scope to the current z-level
  • drain-aquifer:
    • gained ability to drain just above or below a certain z-level
    • new option to drain all layers except for the first N aquifer layers, in case you want some aquifer layers but not too many
  • gui/control-panel: drain-aquifer --top 2 added as an autostart option
  • logistics: automelt now optionally supports melting masterworks; click on gear icon on stockpiles overlay frame
  • sort:
    • new search widgets for Info panel tabs, including all "Creatures" subtabs, all "Objects" subtabs, "Tasks", candidate assignment on the "Noble" subtab, and the "Work details" subtab under "Labor"
    • new search and filter widgets for the "Interrogate" and "Convict" screens under "Justice"
    • new search widgets for location selection screen (when you're choosing what kind of guildhall or temple to dedicate)
    • new search widgets for burrow assignment screen and other unit assignment dialogs
    • new search widgets for artifacts on the world/raid screen
    • new search widgets for slab engraving menu; can filter for only units that need a slab to prevent rising as a ghost
  • stocks: hotkey for collapsing all categories on stocks screen
[h2]Fixes[/h2]
  • buildingplan:
    • remove bars of ash, coal, and soap as valid building materials to match v50 rules
    • fix incorrect required items being displayed sometimes when switching the planner overlay on and off
  • dwarfvet: fix invalid job id assigned to Rest job, which could cause crashes on reload
  • full-heal: fix removal of corpse after resurrection
  • gui/sandbox: fix scrollbar moving double distance on click
  • hide-tutorials: fix the embark tutorial prompt sometimes not being skipped
  • sort: don't count mercenaries as appointed officials in the squad assignment screen
  • suspendmanager: fix errors when constructing near the map edge
  • zone:
    • races without specific child or baby names will now get generic child/baby names instead of an empty string
    • don't show animal assignment link for cages and restraints linked to dungeon zones (which aren't normally assignable)
[h2]Misc Improvements[/h2]
  • Help icons added to several complex overlays. clicking the icon runs gui/launcher with the help text in the help area
  • buildingplan:
    • support filtering cages by whether they are occupied
    • show how many items you need to make when planning buildings
  • gui/gm-editor: for fields with primitive types, change from click to edit to click to select, double-click to edit. this should help prevent accidental modifications to the data and make hotkeys easier to use (since you have to click on a data item to use a hotkey on it)
  • gui/overlay: filter overlays by current context so there are fewer on the screen at once and you can more easily click on the one you want to reposition
  • orders: recheck command now only resets orders that have conditions that can be rechecked
  • overlay: allow overlay_onupdate_max_freq_seconds to be dynamically set to 0 for a burst of high-frequency updates
  • prioritize: refuse to automatically prioritize dig and smooth/carve job types since it can break the DF job scheduler; instead, print a suggestion that the player use specialized units and vanilla designation priorities
  • quickfort: now allows constructions to be built on top of constructed floors and ramps, just like vanilla. however, to allow blueprints to be safely reapplied to the same area, for example to fill in buildings whose constructions were canceled due to lost items, floors will not be rebuilt on top of floors and ramps will not be rebuilt on top of ramps
  • sort: added help button for squad assignment search/filter/sort
  • tailor: now adds to existing orders if possilbe instead of creating new ones
  • zone: animals trained for war or hunting are now labeled as such in animal assignment screens
[h2]Removed[/h2]
  • FILTER_FULL_TEXT: moved from gui.widgets to utils; if your full text search preference is lost, please reset it in gui/control-panel
[h2]API[/h2]
  • added Items::getCapacity, returns the capacity of an item as a container (reverse-engineered), needed for combine
[h2]Lua[/h2]
  • added dfhack.items.getCapacity to expose the new module API
  • added GRAY color aliases for GREY colors
  • utils.search_text: text search routine (generalized from internal widgets.FilteredList logic)
[h2]Structures[/h2]
  • add new globals: translate_name, buildingst_completebuild
  • artifact_rumor_locationst: defined
  • viewscreen_worldst: defined types for view_mode and artifacts_arl fields
  • world_view_mode_type: defined
[h2]Documentation[/h2]
  • unavailable tools are no longer listed in the tag indices in the online docs


[ 2023-10-19 17:07:47 CET ] [ Original post ]

DFHack 50.11-r2rc1

[h3]Q: How do I download DFHack?[/h3]
A: Either add to your Steam library from our Steam page or scroll to the latest release on our GitHub releases page, expand the "Assets" list, and download the file for your platform (e.g. dfhack-XX.XX-rX-Windows-64bit.zip.

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Search! Search! Search![/h3]
We finally have search widgets for many of the screens with long lists. No longer will you need to scroll endlessly to find Bim Zasitisos, Cook. You can just type "bim", or "cook", or maybe "knifedales", since that's what "Zasitisos" translates to and it's the name you see in some contexts.

Search units on the Citizens tab:


Search (and filter) interview candidates on the Justice tab:


Search artifacts on the world screen (for raids):


Search religions for dedicating a new temple:


So far, here are the screens that are covered:
  • Info -> Creatures -> Citizens
  • Info -> Creatures -> Pets/Livestock
  • Info -> Creatures -> Pets/Livestock -> Overall Training
  • Info -> Creatures -> Pets/Livestock -> Assign Trainer
  • Info -> Creatures -> Others
  • Info -> Creatures -> Dead/Missing
  • Info -> Tasks
  • Info -> Labor -> Work details
  • Info -> Objects -> Artifacts
  • Info -> Objects -> Symbols
  • Info -> Objects -> Named objects
  • Info -> Objects -> Written content
  • Info -> Justice -> * -> Interrogate
  • Info -> Justice -> * -> Convict
  • Location selector -> Temple
  • Location selector -> Guildhall
  • Unit selector -> Bedroom
  • Unit selector -> Office
  • Unit selector -> Dining hall
  • Unit selector -> Tomb
  • Unit selector -> Workshop worker
  • Unit selector -> Occupation
  • Unit selector -> Burrow
  • Unit selector -> Squad kill order

Plus the screens that were already covered in previous DFHack versions:
  • Unit selector -> Squad assignment
  • Zone -> Pasture -> Animal assignment
  • Zone -> Pit -> Animal assignment
  • Building -> Cage -> Animal assignment
  • Building -> Restraint -> Animal assignment
[h3]Preserve tomb assignments[/h3]
Have you noticed that your nobles don't actually get buried in the nice tombs you assigned to them while they were alive and demanding nice tombs? This is because DF loses track of that assignment when they die, which is amusingly and tragically ironic.

Enable preserve-tombs in the DFHack gui/control-panel ("Fort" and "Autostart" tabs) to keep track of those tomb assignments and ensure they are actually used for their intended purposes.
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Generated release notes[h2]New Tools[/h2]
  • add-recipe: (reinstated) add reactions to your civ (e.g. for high boots if your civ didn't start with the ability to make high boots)
  • preserve-tombs: keep tombs assigned to units when they die
  • spectate: (reinstated) automatically follow dwarves, cycling among interesting ones
[h2]New Features[/h2]
  • drain-aquifer:
    • gained ability to drain just above or below a certain z-level
    • new option to drain all layers except for the first N aquifer layers, in case you want some aquifer layers but not too many
  • gui/control-panel: drain-aquifer --top 2 added as an autostart option
  • logistics: automelt now optionally supports melting masterworks; click on gear icon on stockpiles overlay frame
  • sort:
    • new search widgets for Info panel tabs, including all "Creatures" subtabs, all "Objects" subtabs, "Tasks", and the "Work details" subtab under "Labor"
    • new search and filter widgets for the "Interrogate" and "Convict" screens under "Justice"
    • new search widgets for location selection screen (when you're choosing what kind of guildhall or temple to dedicate)
    • new search widgets for burrow assignment screen and other unit assignment dialogs
    • new search widgets for artifacts on the world/raid screen
[h2]Fixes[/h2]
  • gui/sandbox: fix scrollbar moving double distance on click
  • hide-tutorials: fix the embark tutorial prompt sometimes not being skipped
  • suspendmanager: fix errors when constructing near the map edge
  • zone: don't show animal assignment link for cages and restraints linked to dungeon zones (which aren't normally assignable)
[h2]Misc Improvements[/h2]
  • orders: recheck command now only resets orders that have conditions that can be rechecked
  • overlay: allow overlay_onupdate_max_freq_seconds to be dynamically set to 0 for a burst of high-frequency updates
  • sort: added help button for squad assignment search/filter/sort
  • zone: animals trained for war or hunting are now labeled as such in animal assignment screens
[h2]Removed[/h2]
  • FILTER_FULL_TEXT: moved from gui.widgets to utils; if your full text search preference is lost, please reset it in gui/control-panel
[h2]Lua[/h2]
  • added GRAY color aliases for GREY colors
  • utils.search_text: text search routine (generalized from internal widgets.FilteredList logic)
[h2]Structures[/h2]
  • add new global: translate_name
  • artifact_rumor_locationst: defined
  • viewscreen_worldst: defined types for view_mode and artifacts_arl fields
  • world_view_mode_type: defined


[ 2023-10-12 21:31:41 CET ] [ Original post ]

DFHack 50.11-r1

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Highlights[/h2][h3]Display furniture item selector[/h3]



The vanilla screen for choosing which items you want to display on a pedestal or display case requires quite a bit of scrolling and clicking to use. It is also hard to figure out how the items you have assigned will affect the value of the room. There is now an alternate dialog that should make the process much easier and less opaque:



You can search items by name (including book titles), filter by quality (e.g. see only artifacts), and sort by name, value, or where the item is currently assigned for display.

If the pedestal is in a guildhall or temple, there is also a convenient indicator for whether you've added enough value to bump the guildhall or temple to the next tier. For example, if you need to provide your citizens with a grand guildhall, the indicator will change from "Guildhall" to "Grand guildhall" when you've assigned items with enough value.
[h3]Scrolling for the unit list when embarking[/h3]



Some people have already experimented with the newly re-added startdwarf script, which allows you to change the number of dwarves you embark with, and have found that the DF embark screen doesn't support scrolling for the unit list. This means that if you embark with more dwarves than can fit on your screen, you cannot select them to configure their skills.

We now have a DFHack-added scrollbar so you can scroll up and down through the list and configure each of your extra dwarves:



Note that the vanilla screen was not intended to be scrolled, so the behavior of the list is a little odd. When you select a dwarf to configure, the list will jump so that the dwarf you selected is at the top of the screen. This can be a little disorienting, but the dwarf is still configurable, and all dwarves are accessible.
[h2]Announcements[/h2][h3]Mouse event definitions have changed for scripts[/h3]
This only affects modders and players who are writing their own DFHack scripts and who react to mouse events like _MOUSE_L or _MOUSE_L_DOWN. Everyone else can skip reading this.

Back in the pre-v50 days, when the mouse was much less used in DF, I made a mistake in how I interpreted DF's handling of mouse button state. The result is that DFHack has been representing mouse state incorrectly to the Lua scripts. This hasn't been much of a problem since all the scripts were written to misinterpret the state the same way. However, now that DFHack tools are integrating more closely with the vanilla DF UI, the difference in interpretation of mouse state is causing conflicts.

The _MOUSE_L event now correctly fires when the mouse button has just been clicked, and the _MOUSE_L_DOWN event now correctly fires when the mouse button is held down. The previous definitions were backwards.

If you have written your own script and you refer to mouse events in your onInput(keys) function, you can update to the new definitions by swapping references to _MOUSE_L with _MOUSE_L_DOWN and vice versa. Similarly for _MOUSE_R and _MOUSE_M, if you happen to use them. My apologies for breaking scripts. This is something we try not to do very often, though hopefully this change will make up for the hassle by allowing scripts to integrate more smoothly with vanilla DF widgets. Thanks!
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
Generated release notes[h2]New Tools[/h2]
  • startdwarf: (reinstated) set number of starting dwarves
  • tubefill: (reinstated) replenishes mined-out adamantine
[h2]New Features[/h2]
  • A new searchable, sortable, filterable dialog for selecting items for display on pedestals and display cases
  • startdwarf: overlay scrollbar so you can scroll through your starting dwarves if they don't all fit on the screen
[h2]Fixes[/h2]
  • EventManager: Unit death event no longer misfires on units leaving the map
  • autolabor: ensure vanilla work details are reinstated when the fort or the plugin is unloaded
  • suspendmanager: fixed a bug where floor grates, bars, bridges etc. wouldn't be recognised as walkable, leading to unnecessary suspensions in certain cases.
  • dfhack.TranslateName(): fixed crash on certain invalid names, which affected warn-starving
[h2]Misc Improvements[/h2]
  • EventManager:
    • guard against potential iterator invalidation if one of the event listeners were to modify the global data structure being iterated over
    • for onBuildingCreatedDestroyed events, changed firing order of events so destroyed events come before created events
  • devel/inspect-screen: display total grid size for UI and map layers
  • digtype:
    • designate only visible tiles by default, and use "auto" dig mode for following veins
    • added options for designating only current z-level, this z-level and above, and this z-level and below
  • hotkeys:
    • make the DFHack logo brighten on hover in ascii mode to indicate that it is clickable
    • use vertical bars instead of "!" symbols for the DFHack logo in ascii mode to make it easier to read
  • suspendmanager: now suspends constructions that would cave-in immediately on completion
[h2]Lua[/h2]
  • mouse key events are now aligned with internal DF semantics: _MOUSE_L indicates that the left mouse button has just been pressed and _MOUSE_L_DOWN indicates that the left mouse button is being held down. similarly for _MOUSE_R and _MOUSE_M. 3rd party scripts may have to adjust.
[h2]Structures[/h2]
  • add new global: start_dwarf_count


[ 2023-10-03 09:12:03 CET ] [ Original post ]

DFHack 50.10-r1

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]Linux support[/h3]
As of DF 50.10, both DF and DFHack can run natively on Linux. If you're subscribed to DF and DFHack on Steam, here's how to switch over:
  • In the Steam client, open the properties for Dwarf Fortress
  • Select the "Compatibility" section and deselect "Force the use of a specific Steam Play compatibility tool"
  • DF should update with the Linux native version

You can tell if you did it right if you no longer have Dwarf Fortress.exe in your DF directory and instead have dwarfort, which is the Linux binary.

Then, turn off the compatibility layer for DFHack. dfhooks.dll will disappear and you'll get libdfhooks.so and the dfhack script in its place.

Sometimes, Steam says you've got the Linux version, but when you look you see you still have Dwarf Fortress.exe instead of dwarfort. Try re-enabling the Proton compatibility layer and then turning off the compatibility layer again until it "sticks".

The DFHack terminal console works differently on Linux

You can run DF with DFHack from the Steam client without issues. However, if you want an external DFHack terminal console, you have to run from the commandline with the ./dfhack launcher script.

On Windows (or in Windows emulation), you could use the show command to pop up an external DFHack terminal console. You would use this for running DFHack commands from outside the game window, and the external terminal is the only way to run commandline-interactive DFHack commands like tiletypes and the interactive mode of the lua interpreter.

Linux has a different method of providing a terminal console. You can't spawn it dynamically like you can on Windows. You have to start DF from the commandline, and the terminal from which you ran ./dfhack becomes the terminal console. This should be a familiar process to many Linux users (most Linux commands work this way), but the change is jarring if you're not expecting it. We're also looking into providing a virtual console that doesn't depend on an existing system console so you can still get a console even if you run from Steam, but that work is far from being completed.

You can still launch from Steam if you want to. Many tools log information and errors to the console, though, so if you run into strange issues, it might be useful to try running from the commandline to see if there is diagnostic output there that can help you.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2]
This is just a compatibility release; please see the release notes for 50.09-r3 and 50.09-r4 for significant recent changes to DFHack.
Generated release notes[h2]Fixes[/h2]
  • 'fix/general-strike: fix issue where too many seeds were getting planted in farm plots
  • Linux launcher: allow Steam Overlay and game streaming to function
  • autobutcher: don't ignore semi-wild units when marking units for slaughter


[ 2023-09-19 18:26:19 CET ] [ Original post ]

DFHack 50.09-r4

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.

For Linux support, please configure your Steam client to subscribe to the DF beta release branch and the DFHack 50.10-beta release branch.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2]
Please see the release notes for DFHack 50.09-r3 for extensive information on Linux support.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2][h3]Squad assignment sort improvements[/h3]




Units now have a rating displayed next to them. The ratings are the values used for the current sort, and are colored based on how "good" the unit is according to the sort option. The "stress face" graphics are used for the "stress" and "need for training" sorts to indicate how dire the need is.

In addition to the new "need for training" sort, there are also a few new filters. You can now choose whether mothers with infants, units with weak mental fortitude (who would then become unduly stressed by military service), and critically injured units are shown as candidates.
[h3]Smooth/carve designation indicators for ASCII mode[/h3]




ASCII mode has been missing any indication of smoothing/engraving/track carving/fortification carving designations. DFHack will now automatically add in visual indicators so you can see what you have designated. They will flash between an icon indicating the designation type and the priority you have set the designation for, similar to how the information was displayed in older versions of DF.
Generated release notes[h2]New Features[/h2]
  • dig: new overlay for ASCII mode that visualizes designations for smoothing, engraving, carving tracks, and carving fortifications
[h2]Fixes[/h2]
  • buildingplan: make the construction dimensions readout visible again
  • gui/mod-manager: don't continue to display overlay after the raws loading progress bar appears
  • seedwatch: fix a crash when reading data saved by very very old versions of the plugin
[h2]Misc Improvements[/h2]
  • autofish: changed --raw argument format to allow explicit setting to on or off
  • caravan: move goods to depot screen can now see/search/trade items inside of barrels and pots
  • gui/launcher: show tagged tools in the autocomplete list when a tag name is typed
  • sort:
    • add sort option for training need on squad assignment screen
    • filter mothers with infants, units with weak mental fortitude, and critically injured units on the squad assignment screen
    • display a rating relative to the current sort order next to the visible units on the squad assignment screen
[h2]API[/h2]
  • overlay: overlay widgets can now declare a version attribute. changing the version of a widget will reset its settings to defaults. this is useful when changing the overlay layout and old saved positions will no longer be valid.
[h2]Lua[/h2]
  • argparse.boolean: convert arguments to lua boolean values.
[h2]Structures[/h2]
  • Identified a number of previously anonymous virtual methods in itemst
[h2]Documentation[/h2]
  • add instructions for downloading development builds to the Installing page


[ 2023-09-14 22:31:12 CET ] [ Original post ]

DFHack 50.09-r3

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.

For the Dwarf Fortress beta branch on Steam, this release works with the Linux version (50.09-linux1) but NOT the Windows version. Windows users have to move to the DF default branch to be able to use DFHack. Note that the Windows version currently on the beta branch has no new features compared to the default branch, so you won't be missing out on anything.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]Linux support![/h3]


Both DF and DFHack now run natively on Linux. If you're on Linux, we encourage you to try it out! The interface is noticeably snappier, FPS is up, and load times are reduced. If you're subscribed to DF and DFHack on Steam, here's how to switch over:
  • In the Steam client, open the properties for Dwarf Fortress
  • In the "Betas" section, switch to the "beta" branch
  • Let that finish updating
  • Select the "Compatibility" section and deselect "Force the use of a specific Steam Play compatibility tool"
  • DF should update again with the Linux native version

You can tell if you did it right if you no longer have Dwarf Fortress.exe in your DF directory and instead have dwarfort, which is the Linux binary. The plan is to "officially" release Linux support with DF 50.10, so once DF 50.10 comes out, you should be able to switch back to the default Steam branch and keep the native Linux support.

Then, turn off the compatibility layer for DFHack. dfhooks.dll will disappear and you'll get libdfhooks.so and the dfhack script in its place.

Sometimes, Steam says you've got the Linux version, but when you look you see you still have Dwarf Fortress.exe instead of dwarfort. Try re-enabling the Proton compatibility layer and then turning off the compatibility layer again until it "sticks".

Major caveat for DF 50.09-linux1

This particular beta release of Dwarf Fortress has address layout randomization enabled. This causes some trouble for DFHack since DFHack needs to know the memory addresses of several key data structures. For this release only, be sure to start DF by launching DFHack from the Steam client or by running the ./dfhack commandline startup script. That will normalize the address space and allow DF to run with DFHack. Otherwise, DF will crash on startup. Again, this is only for this release. Future releases will not need this workaround and should go back to allowing you to start DF from either the Dwarf Fortress or DFHack Steam client entries, or from either the ./dwarfort or ./dfhack commandline commands.

The DFHack terminal console works differently on Linux

You can run DF with DFHack by starting DFHack in the Steam client. However, if you want an external DFHack terminal console, you have to run from the commandline.

On Windows, you could use the show command to pop up an external DFHack terminal console. You could use this for running DFHack commands from outside the game window, and the external terminal is the only way to run commandline-interactive DFHack commands like tiletypes and the interactive mode of the lua interpreter.

Linux has a different method of providing a terminal console. You can't spawn it dynamically like you can on Windows. You have to start DF from the commandline, and the terminal from which you ran ./dwarfort becomes the terminal console. This should be a familiar process to many Linux users (most Linux commands work this way), but the change is jarring if you're not expecting it. We're also looking into providing a virtual console that doesn't depend on an existing system console so you can still get a console even if you run from Steam, but that work is far from being completed.

You can still launch DFHack from Steam if you want to. Many tools log information and errors to the console, though, so if you run into strange issues, it might be useful to try running from the commandline to see if there is diagnostic output there that can help you.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2][h3]Hide tutorial popups[/h3]


Once you've played a few forts, you probably don't need the tutorial popups that assault assist you when you open certain screens. Enable hide-tutorials in the System tab of gui/control-panel and never be bothered by them again!
[h3]Search and sort for squad assignment screen[/h3]




When you bring up the screen to assign units to squads, there are now widgets for searching, sorting, and filtering. The default sort is by "melee effectiveness", which takes both weapon skill and physical attributes into account, but you can choose from a variety of relevant ascending or descending sorting orders.

Thanks to research into combat mechanics by community contributor Halifay, you can also sort by melee and ranged "potential", which predicts how effective a unit could become in the future, given adequate training.

There are also configurable filters to show or hide units in other squads, appointed/elected officials (like your manager, high priests, and doctors), and nobility.

Of course, if you know exactly who you're looking for, you can also search for units by name.
[h3]Animal assignment[/h3]




The "Assign to pasture" screen released in the previous DFHack version has been expanded and generalized to support cages, restraints, and pits/ponds. Please tell us if you have any additional needs for animal assignment that those screens don't meet!
[h3]Trade good selection[/h3]




The "Bring goods to trade depot" screen can now see inside bins, and you can select individual items within bins for trade instead of the entire bin, if you so choose. You can also search for contents within bins, even when in "bring the bin" mode. For example, you can find the "Gem bin"s that contain rubies by searching for "ruby".
[h3]One-click UI integration for exportlegends[/h3]




exportlegends now sports a new integration with the vanilla "Export XML" button. Now you can generate both the vanilla export and the extended data export with a single click!
[h3]Onscreen HUD getting in your way? Hide it![/h3]




hide-interface hides all the vanilla UI elements for clean screenshots or distraction-free fortress watching. Even with the interface hidden, you can still pause/unpause the game with spacebar and move around the map with the keyboard or mouse. Hide that cluster of urgent notifications bubbles for a while and just enjoy watching your citizens scurry around for a while : )
Generated release notes[h2]New Tools[/h2]
  • devel/scan-vtables: scan and dump likely vtable addresses (for memory research)
  • hide-interface: hide the vanilla UI elements for clean screenshots or laid-back fortress observing
  • hide-tutorials: hide the DF tutorial popups; enable in the System tab of gui/control-panel
  • set-orientation: tinker with romantic inclinations (reinstated from back catalog of tools)
[h2]New Features[/h2]
  • buildingplan: one-click magma/fire safety filter for planned buildings
  • exportlegends: new overlay that integrates with the vanilla "Export XML" button. Now you can generate both the vanilla export and the extended data export with a single click!
  • sort: search, sort, and filter for squad assignment screen
  • zone: advanced unit assignment screens for cages, restraints, and pits/ponds
[h2]Fixes[/h2]
  • Core:
    • reload scripts in mods when a world is unloaded and immediately loaded again
    • fix text getting added to DFHack text entry widgets when Alt- or Ctrl- keys are hit
  • autobutcher: fix ticks commandline option incorrectly rejecting positive integers as valid values
  • buildingplan: ensure selected barrels and buckets are empty (or at least free of lye and milk) as per the requirements of the building
  • caravan:
    • corrected prices for cages that have units inside of them
    • correct price adjustment values in trade agreement details screen
    • apply both import and export trade agreement price adjustments to items being both bought or sold to align with how vanilla DF calculates prices
    • cancel any active TradeAtDepot jobs if all caravans are instructed to leave
  • emigration:
    • fix errors loading forts after dwarves assigned to work details or workshops have emigrated
    • fix citizens sometimes "emigrating" to the fortress site
  • fix/retrieve-units: fix retrieved units sometimes becoming duplicated on the map
  • gui/launcher, gui/gm-editor: recover gracefully when the saved frame position is now offscreen
  • gui/sandbox: correctly load equipment materials in modded games that categorize non-wood plants as wood
  • orders: prevent import/export overlay from appearing on the create workorder screen
  • quickfort: cancel old dig jobs that point to a tile when a new designation is applied to the tile
  • seedwatch: ignore unplantable tree seeds
  • starvingdead: ensure sieges end properly when undead siegers starve
  • suspendmanager:
    • Fix the overlay enabling/disabling suspendmanager unexpectedly
    • improve the detection on "T" and "+" shaped high walls
  • tailor: remove crash caused by clothing items with an invalid maker_race
  • dialogs.MessageBox: fix spacing around scrollable text
[h2]Misc Improvements[/h2]
  • Surround DFHack-specific UI elements with square brackets instead of red-yellow blocks for better readability
  • autobutcher: don't mark animals for butchering if they are already marked for some kind of training (war, hunt)
  • caravan: optionally display items within bins in bring goods to depot screen
  • createitem: support creating items inside of bags
  • devel/lsmem: added support for filtering by memory addresses and filenames
  • gui/design: change "auto commit" hotkey from c to Alt-c to avoid conflict with the default keybinding for z-level down
  • gui/gm-editor:
    • hold down shift and right click to exit, regardless of how many substructures deep you are
    • display in the title bar whether the editor window is scanning for live updates
  • gui/liquids: support removing river sources by converting them into stone floors
  • gui/quickfort: blueprint details screen can now be closed with Ctrl-D (the same hotkey used to open the details)
  • hotkeys: don't display DFHack logo in legends mode since it covers up important interface elements. the Ctrl-Shift-C hotkey to bring up the menu and the mouseover hotspot still function, though.
  • quickfort: linked stockpiles and workshops can now be specified by ID instead of only by name. this is mostly useful when dynamically generating blueprints and applying them via the quickfort API
  • sort: animals are now sortable by race on the assignment screens
  • suspendmanager: display a different color for jobs suspended by suspendmanager
[h2]API[/h2]
  • RemoteFortressReader: add a force_reload option to the GetBlockList RPC API to return blocks regardless of whether they have changed since the last request
  • Gui: getAnyStockpile and getAnyCivzone (along with their getSelected variants) now work through layers of ZScreens. This means that they will still return valid results even if a DFHack tool window is in the foereground.
  • Items::getValue(): remove caravan_buying parameter since the identity of the selling party doesn't actually affect the item value
  • Units: new animal propery check functions isMarkedForTraining(unit), isMarkedForTaming(unit), isMarkedForWarTraining(unit), and isMarkedForHuntTraining(unit)
[h2]Lua[/h2]
  • dfhack.gui: new getAnyCivZone and getAnyStockpile functions; also behavior of getSelectedCivZone and getSelectedStockpile functions has changes as per the related API notes
  • dfhack.items.getValue(): remove caravan_buying param as per C++ API change
  • dfhack.screen.readTile(): now populates extended tile property fields (like top_of_text) in the returned Pen object
  • dfhack.units: new animal propery check functions isMarkedForTraining(unit), isMarkedForTaming(unit), isMarkedForWarTraining(unit), and isMarkedForHuntTraining(unit)
  • new(): improved error handling so that certain errors that were previously uncatchable (creating objects with members with unknown vtables) are now catchable with pcall()
  • widgets.BannerPanel: panel with distinctive border for marking DFHack UI elements on otherwise vanilla screens
  • widgets.Panel: new functions to override instead of setting corresponding properties (useful when subclassing instead of just setting attributes): onDragBegin, onDragEnd, onResizeBegin, onResizeEnd
[h2]Structures[/h2]
  • Added global_table global and corresponding global_table_entry type
  • help_context_type: fix typo in enum name: EMBARK_TUTORIAL_CHICE -> EMBARK_TUTORIAL_CHOICE
  • plotinfo: name the fields related to tutorial popups
  • viewscreen_legendsst: realign structure
  • viewscreen_new_arenast: added (first appeared in 50.06)


[ 2023-09-07 18:40:00 CET ] [ Original post ]

DFHack 50.09-r3rc3

This beta is compatible with DF 50.09 for Windows (Dwarf Fortress Steam default branch, Itch, and Classic) and DF 50.09-linux1 for Linux (Dwarf Fortress beta branch). It does not support the Windows version of DF deployed on the DF beta branch (which is currently nearly identical to the Windows version on the default branch).
[h2]Announcements[/h2]
Both DF and DFHack now run natively on Linux. If you're on Linux, we encourage you to try it! The interface is noticeably snappier, FPS is up, and load times are reduced. If you're subscribed to DF and DFHack on Steam, here's how to switch over:

  • In the Steam client, open the properties for Dwarf Fortress
  • In the "Betas" section, switch to the "beta" branch
  • Let that finish updating
  • Select the "Compatibility" section and deselect "Force the use of a specific Steam Play compatibility tool"
  • DF should update again with the Linux native version

You can tell if you did it right if you no longer have Dwarf Fortress.exe in your DF directory and instead have dwarfort, which is the Linux binary. The plan is to "officially" release Linux support with DF 50.10, so once DF 50.10 comes out, you should be able to switch back to the default Steam branch and keep the native Linux support.

Then, do the same thing for DFHack. switching to the "beta" branch (if you're not there already) and turning off the compatibility layer.

Sometimes, Steam says you've got the Linux version, but when you look you see you still have Dwarf Fortress.exe instead of dwarfort. Try re-enabling the Proton compatibility layer and then turning off the compatibility layer again.

Major caveat for this beta release

This particular beta release of Dwarf Fortress has address layout randomization enabled. This causes some trouble for DFHack since DFHack needs to know the memory addresses of several key data structures. For this release only, be sure to start DF by launching DFHack from the Steam client or by running the ./dfhack commandline startup script. That will normalize the address space and allow DF to run with DFHack. Otherwise, DF will crash on startup. Again, this is only for this release. Future releases will not need this workaround and should go back to allowing you to start DF from either the Dwarf Fortress or DFHack Steam client entries, or from either the ./dwarfort or ./dfhack commandline commands.

The DFHack terminal console works differently on Linux

You can run DF with DFHack by starting DFHack in the Steam client. However, if you want an external DFHack terminal console, you have to run from the commandline.

On Windows, you could use the show command to pop up an external DFHack terminal console. You could use this for running DFHack commands from outside the game window, and the external terminal is the only way to run commandline-interactive DFHack commands like tiletypes and the interactive mode of the lua interpreter.

Linux has a different method of providing a terminal console. You can't spawn it dynamically like you can on Windows. You have to start DF from the commandline, and the terminal from which you ran ./dwarfort becomes the terminal console. This should be a familiar process to many Linux users (most Linux commands work this way), but the change is jarring if you're not expecting it. We're also looking into providing a virtual console that doesn't depend on an existing system console so you can still get a console even if you run from Steam, but that work is far from being completed.

You can still launch DFHack from Steam if you want to. Many tools log information and errors to the console, though, so if you run into strange issues, it might be useful to try running from the commandline to see if there is diagnostic output there that can help you.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2][h3]Hide tutorial popups[/h3]
Once you've played a few forts, you probably don't need the tutorial popups that assault you when you open certain screens. Enable hide-tutorials in the System tab of gui/control-panel and never be bothered by them again!
[h3]See inside bins when selecting trade goods[/h3]
The "Bring goods to trade depot" screen can now see inside bins, and you can select individual items within bins for trade instead of the entire bin, if you so choose. You can also search for contents within bins, even when in "bring the bin" mode. For example, you can find the "Gem bin"s that contain rubies by searching for "ruby".
[h3]Search and sort for squad assignment screen[/h3]
The squad assignment screen was overhauled since the last beta in response to lots of great feedback. Thank you to all who responded with opinions and suggestions and helped us make this screen better!

The default sort is now "melee effectiveness", which takes both weapon skill and physical attributes into account.

Thanks to research into combat mechanics by community contributor Halifay, you can also sort by melee and ranged "potential", which predicts how effective a unit could become in the future, given adequate training.

There are also configurable filters to show or hide units in other squads, appointed/elected officials (like your manager, high priests, and doctors), and nobility.

Of course, if you know exactly who you're looking for, you can also search for units by name. Searching for skills was removed because it was too confusing. Sorting by skills is still available, though.
Generated release notes
(These notes are cumulative with the previous beta and represent all changes since the last stable release)
[h2]New Tools[/h2]
  • devel/scan-vtables: Scan and dump likely vtable addresses (for memory research)
  • hide-interface: hide the vanilla UI elements for clean screenshots or laid-back fortress observing
  • hide-tutorials: hide the DF tutorial popups; enable in the System tab of gui/control-panel
[h2]New Features[/h2]
  • exportlegends: new overlay that integrates with the vanilla "Export XML" button. Now you can generate both the vanilla export and the extended data export with a single click!
  • sort: search and sort for squad assignment screen
  • zone: advanced unit assignment screens for cages, restraints, and pits/ponds
[h2]Fixes[/h2]
  • Core:
    • reload scripts in mods when a world is unloaded and immediately loaded again
    • fix text getting added to DFHack text entry widgets when Alt- or Ctrl- keys are hit
  • caravan:
    • corrected prices for cages that have units inside of them
    • Correct price adjustment values in trade agreement details screen
    • Apply both import and export trade agreement price adjustments to items being both bought or sold to align with how vanilla DF calculates prices
    • cancel any active TradeAtDepot jobs if all caravans are instructed to leave
  • emigration:
    • fix errors loading forts after dwarves assigned to work details or workshops have emigrated
    • fix citizens sometimes "emigrating" to the fortress site
  • fix/retrieve-units: fix retrieved units sometimes becoming duplicated on the map
  • gui/launcher, gui/gm-editor: recover gracefully when the saved frame position is now offscreen
  • orders: prevent import/export overlay from appearing on the create workorder screen
  • quickfort: cancel old dig jobs that point to a tile when a new designation is applied to the tile
  • starvingdead: ensure sieges end properly when undead siegers starve
  • suspendmanager:
    • Fix the overlay enabling/disabling suspendmanager unexpectedly
    • Improve the detection on "T" and "+" shaped high walls
[h2]Misc Improvements[/h2]
  • Surround DFHack-specific UI elements with square brackets instead of red-yellow blocks for better readability
  • autobutcher: don't mark animals for butchering if they are already marked for some kind of training (war, hunt)
  • caravan: optionally display items within bins in bring goods to depot screen
  • devel/lsmem: added support for filtering by memory addresses and filenames
  • gui/gm-editor:
    • hold down shift and right click to exit, regardless of how many substructures deep you are
    • display in the title bar whether the editor window is scanning for live updates
  • hotkeys: don't display DFHack logo in legends mode since it covers up important interface elements. the Ctrl-Shift-C hotkey to bring up the menu and the mouseover hotspot still function, though.
  • quickfort: linked stockpiles and workshops can now be specified by ID instead of only by name. this is mostly useful when dynamically generating blueprints and applying them via the quickfort API
  • sort: animals are now sortable by race on the assignment screens
  • suspendmanager: display a different color for jobs suspended by suspendmanager
[h2]API[/h2]
  • RemoteFortressReader: add a force_reload option to the GetBlockList RPC API to return blocks regardless of whether they have changed since the last request
  • Gui: getAnyStockpile and getAnyCivzone (along with their getSelected variants) now work through layers of ZScreens. This means that they will still return valid results even if a DFHack tool window is in the foereground.
  • Items::getValue(): remove caravan_buying parameter since the identity of the selling party doesn't actually affect the item value
  • Units: new animal propery check functions isMarkedForTraining(unit), isMarkedForTaming(unit), isMarkedForWarTraining(unit), and isMarkedForHuntTraining(unit)
[h2]Lua[/h2]
  • dfhack.gui: new getAnyCivZone and getAnyStockpile functions; also behavior of getSelectedCivZone and getSelectedStockpile functions has changes as per the related API notes
  • dfhack.items.getValue(): remove caravan_buying param as per C++ API change
  • dfhack.screen.readTile(): now populates extended tile property fields (like top_of_text) in the returned Pen object
  • dfhack.units: new animal propery check functions isMarkedForTraining(unit), isMarkedForTaming(unit), isMarkedForWarTraining(unit), and isMarkedForHuntTraining(unit)
  • new(): improved error handling so that certain errors that were previously uncatchable (creating objects with members with unknown vtables) are now catchable with pcall()
  • widgets.BannerPanel: panel with distinctive border for marking DFHack UI elements on otherwise vanilla screens
  • widgets.Panel: new functions to override instead of setting corresponding properties (useful when subclassing instead of just setting attributes): onDragBegin, onDragEnd, onResizeBegin, onResizeEnd
[h2]Structures[/h2]
  • Added global_table global and corresponding global_table_entry type
  • help_context_type: fix typo in enum name: EMBARK_TUTORIAL_CHICE -> EMBARK_TUTORIAL_CHOICE
  • plotinfo: name the fields related to tutorial popups
  • viewscreen_legendsst: realign structure
  • viewscreen_new_arenast: added (first appeared in 50.06, probably)


[ 2023-09-01 22:21:12 CET ] [ Original post ]

DFHack 50.09-r3rc2

The Windows build attached to the DF beta branch (build 11941433) is a mixture of 50.09 and a few unspecified low-level changes. There are no new features for players to use, but the internal structure differences make this particular version difficult to support at the same time as other, more popular builds (i.e. the default Windows 50.09 build and the beta Linux 50.09 build).

This update just removes support for the Windows version in the DF beta branch. The Linux version in the DF beta branch is still supported, and we still encourage Linux players to switch to the DF beta to try it. Windows players should stay on the default public DF branch for now (regardless of whether they use DFHack).

Also there's a small update to `autobutcher` that protects animals that you have marked for war or hunt training from butchering. Before, if you had marked an animal for war/hunt training, but it hadn't been trained yet, then `autobutcher` considered it available for slaughtering.


[ 2023-08-21 10:11:54 CET ] [ Original post ]

DFHack 50.09-r3rc1


This update works with DF 50.09 on both the Dwarf Fortress default and beta branches. The DF beta branch includes native support for Linux, which this DFHack update also supports.
Highlights[h2]Linux support![/h2]
Both DF and DFHack now run natively on Linux. If you're on Linux, we encourage you to try it! The interface is noticeably snappier, FPS is up, and load times are reduced. If you're subscribed to DF and DFHack on Steam, here's how to switch over:

  • In the Steam client, open the properties for Dwarf Fortress
  • In the "Betas" section, switch to the "beta" branch
  • Let that finish updating
  • Select the "Compatibility" section and deselect "Force the use of a specific Steam Play compatibility tool"
  • DF should update again with the Linux native version

You can tell if you did it right (and sometimes Steam gets stuck somewhere along the way and you have to fiddle with it) if you no longer have Dwarf Fortress.exe in your DF directory and instead have dwarfort, which is the Linux binary. The plan is to "officially" release Linux support with DF 50.10, so once DF 50.10 comes out, you should be able to switch back to the default Steam branch and keep the native Linux support.

Then, do the same thing for DFHack. switching to the "beta" branch (if you're not there already) and turning off the compatibility layer.

Major caveat for this beta release

This particular beta release of Dwarf Fortress has address layout randomization enabled. This causes some trouble for DFHack since DFHack needs to know the memory addresses of several key data structures. For this release only, be sure to start DF by launching DFHack from the Steam client or by running the ./dfhack commandline startup script. That will normalize the address space and allow DF to run with DFHack. Otherwise, DF will crash on startup. Again, this is only for this release. Future releases will not need this workaround and should go back to allowing you to start DF from either the Dwarf Fortress or DFHack Steam client entries, or from either the ./dwarfort or ./dfhack commandline commands.

The DFHack terminal console works differently on Linux

You can run DF with DFHack by starting DFHack in the Steam client. However, if you want an external DFHack terminal console, you have to run from the commandline.

On Windows, you could use the show command to pop up an external DFHack terminal console. You could use this for running DFHack commands from outside the game window, and the external terminal is the only way to run commandline-interactive DFHack commands like tiletypes and the interactive mode of the lua interpreter.

Linux has a different method of providing a terminal console. You can't spawn it dynamically like you can on Windows. You have to start DF from the commandline, and the terminal from which you ran ./dwarfort becomes the terminal console. This should be a familiar process to many Linux users (most Linux commands work this way), but the change is jarring if you're not expecting it. We're also looking into providing a virtual console that doesn't depend on an existing system console so you can still get a console even if you run from Steam, but that work is far from being completed.

You can still launch DFHack from Steam if you want to. Many tools log information and errors to the console, though, so if you run into strange issues, it might be useful to try running from the commandline to see if there is diagnostic output there that can help you.
[h2]Search and sort for squad assignment screen[/h2]
When you bring up the screen to assign units to squads, there are now widgets for searching and sorting. The default sort is by "best melee skill", but you can choose from a variety of relevant ascending or descending sorting orders.

You can also search. Searching matches either the unit name or a skill that the unit has. Sorting by "leadership" shows units that have any leadership-related abilities, like teaching and military tactics training, but if you just want to see dwarves with military tactics training, search for "tactics".

There have already been many good suggestions for additional sorting options, which we'll try to get into a future beta/release.
[h2]Animal assignment[/h2]
The "Assign to pasture" screen released in the previous DFHack version has been expanded and generalized to support cages, restraints, and pits/ponds. Please tell us if you have any additional needs for animal assignment that those screens don't meet!
[h2]One-click UI integration for exportlegends[/h2]
exportlegends now sports a new integration with the vanilla "Export XML" button. Now you can generate both the vanilla export and the extended data export with a single click!
[h2]Onscreen HUD getting in your way? Hide it![/h2]
hide-interface hides all the vanilla UI elements for clean screenshots or distraction-free fortress watching. Even with the interface hidden, you can still pause/unpause the game with spacebar and move around the map with the keyboard or mouse. Hide that cluster of urgent notifications bubbles for a while and just enjoy watching your citizens scurry around : )
Generated release notes[h2]New Tools[/h2]
  • devel/scan-vtables: Scan and dump likely vtable addresses (for memory research)
  • hide-interface: hide the vanilla UI elements for clean screenshots or laid-back fortress observing
[h2]New Features[/h2]
  • exportlegends: new overlay that integrates with the vanilla "Export XML" button. Now you can generate both the vanilla export and the extended data export with a single click!
  • sort: search and sort for squad assignment screen
  • zone: advanced unit assignment screens for cages, restraints, and pits/ponds
[h2]Fixes[/h2]
  • Core:
    • reload scripts in mods when a world is unloaded and immediately loaded again
    • fix text getting added to DFHack text entry widgets when Alt- or Ctrl- keys are hit
  • caravan:
    • Correct price adjustment values in trade agreement details screen
    • Apply both import and export trade agreement price adjustments to items being both bought or sold to align with how vanilla DF calculates prices
  • orders: prevent import/export overlay from appearing on the create workorder screen
  • starvingdead: ensure sieges end properly when undead siegers starve
  • suspendmanager:
    • Fix the overlay enabling/disabling suspendmanager unexpectedly
    • Improve the detection on "T" and "+" shaped high walls
[h2]Misc Improvements[/h2]
  • Surround DFHack-specific UI elements with square brackets instead of red-yellow blocks for better readability
  • devel/lsmem: added support for filtering by memory addresses and filenames
  • hotkeys: don't display DFHack logo in legends mode since it covers up important interface elements. the Ctrl-Shift-C hotkey to bring up the menu and the mouseover hotspot still function, though.
  • suspendmanager: display a different color for jobs suspended by suspendmanager
[h2]API[/h2]
  • RemoteFortressReader: add a force_reload option to the GetBlockList RPC API to return blocks regardless of whether they have changed since the last request
  • Items::getValue(): remove caravan_buying parameter since the identity of the selling party doesn't actually affect the item value
[h2]Lua[/h2]
  • dfhack.items.getValue(): remove caravan_buying param as per C++ API change
  • dfhack.screen.readTile(): now populates extended tile property fields (like top_of_text) in the returned Pen object
  • new(): improved error handling so that certain errors that were previously uncatchable (creating objects with members with unknown vtables) are now catchable with pcall()
  • widgets.BannerPanel: panel with distinctive border for marking DFHack UI elements on otherwise vanilla screens
  • widgets.Panel: new functions to override instead of setting corresponding properties (useful when subclassing instead of just setting attributes): onDragBegin, onDragEnd, onResizeBegin, onResizeEnd
[h2]Structures[/h2]
  • Added global_table global and corresponding global_table_entry type
  • viewscreen_legendsst: realign structure
  • viewscreen_new_arenast: added (first appeared in 50.06, probably)


[ 2023-08-19 02:06:22 CET ] [ Original post ]

DFHack 50.09-r2

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]You can now distribute your quickfort blueprints in mods![/h3]


Think you have a cool fortress design that you want to share with the community? The effort required to share your designs has now been cut down significantly. DFHack quickfort now supports blueprints that have been distributed with mods!

The blueprint in the screenshot comes from a mod with only two files:
  • mods/myk002 blueprints/info.txt
  • mods/myk002 blueprints/blueprints/from_mod.csv

with info.txt containing just the basic mod metadata (detailed in the DF mod guide). You can distribute these mods anyway you like, including from the DF Steam Workshop.

How do you make blueprints of your fort to distribute? DFHack's gui/blueprint will take a snapshot of your fort and create a series of blueprints for you. You can also make edits with a text editor or online spreadsheet app to do some really advanced stuff.
[h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2][h3]Initial screens for search and sort[/h3]
The first few screens are done for search/filter/sort support! For starters, we decided to tackle the animal assignment to pasture screen and the trade screens, both of which are a frequent source of frustration for players. There is generally not enough room to add vanilla-sized buttons, so DFHack screen links will appear surrounded with red and yellow bars to to distinguish them from vanilla widgets.



The screen that comes up can be filtered and sorted by whether and where the animals are pastured/caged, by their friendliness or tame status, and by various other properties. All animals of a particular species are now listed next to each other so you can find them easily.



The trade screens got a similar treatment. There are two new screens, one for bringing trade goods to the depot, and one for doing the actual trading. In both, items that are ethically unacceptable to the traders that you are trading with and items that are forbidden to export by your nobles are automatically filtered out, though you can change the filters if you like. Both screens also make bins safe and easy to work with.





The bring goods to depot screen allows you to find the items that you want to sell and mark them for trading. For example, you can move the "condition" slider to only show damaged items and then mark them all for trade with a single click.



The trade screen provides similar filter and selection support for items being bought and sold. By default, only the contents of bins are listed and traded and the bins themselves aren't traded. You can toggle this behavior and trade bins if you like, though.



[h3]Copy/paste support[/h3]
With the move to SDL2 comes new clipboard integration capabilities. DFHack's text entry fields, such as the command editing field in gui/launcher, now support copy, paste, and cut. Ctrl-V will paste from the system clipboard into the DFHack text field. This is especially useful when pasting in DFHack commands that you find on the internet! Ctrl-C will copy text out that you can paste into another application, and Ctrl-X will copy the text and also clear the field (so it's a convenient way of just clearing the text quickly even if you don't need to copy it).

Note that there is no way to just select a portion of the text, though, so all copy and cut operations apply to all text in the field.



[h3]Warm and damp indicators in ASCII mode[/h3]
DF does not distinguish damp or warm tiles when in ASCII mode. This can be very frustrating for ASCII-mode players that have to play without this information.

DFHack now automatically highlights damp tiles in blue and warm tiles in red when in ASCII mode and a mining operation is selected. In other words, the visual feedback in ASCII now matches what premium players get in graphics mode.







[h3]Other new tools[/h3]
Some long-standing requests were finally fulfilled in this release, with the return of a few fan-favorite tools and one new game fix.
  • 3dveins replaces vanilla DF's blobby vein generation with veins that flow smoothly and naturally between z-levels. Want a more natural looking geology? Try running this command right after a new embark!
  • dwarfvet allows your animals to have their wounds treated at hospitals, prolonging their life and usefulness.
  • fix/empty-wheelbarrows dislodges rocks that get stuck in your wheelbarrows when a hauling dwarf gets distracted and the full wheelbarrow gets abandoned somewhere. This makes those wheelbarrows useful for hauling again. Enable this tool in the "Maintenance" tab of gui/control-panel to automatically keep your wheelbarrows usable!
Generated release notes[h2]New Tools[/h2]
  • 3dveins: reinstated for v50, this plugin replaces vanilla DF's blobby vein generation with veins that flow smoothly and naturally between z-levels
  • caravan: new trade screen UI replacements for bringing goods to trade depot and trading
  • dig: new dig.asciiwarmdamp overlay that highlights warm and damp tiles when in ASCII mode. there is no effect in graphics mode since the tiles are already highlighted there
  • dwarfvet: reinstated and updated for v50's new hospital mechanics; allow your animals to have their wounds treated at hospitals
  • fix/empty-wheelbarrows: new script to empty stuck rocks from all wheelbarrows on the map
  • zone: new searchable, sortable, filterable screen for assigning units to pastures
[h2]Fixes[/h2]
  • Fix extra keys appearing in DFHack text boxes when shift (or any other modifier) is released before the other key you were pressing
  • gui/autodump: when "include items claimed by jobs" is on, actually cancel the job so the item can be teleported
  • gui/create-item: when choosing a citizen to create the chosen items, avoid choosing a dead citizen
  • gui/gm-unit: fix commandline processing when a unit id is specified
  • logistics:
    • don't autotrain domestic animals brought by invaders (they'll get attacked by friendly creatures as soon as you let them out of their cage)
    • don't bring trade goods to depot if the only caravans present are tribute caravans
    • fix potential crash when removing stockpiles or turning off stockpile features
  • suspendmanager:
    • take in account already built blocking buildings
    • don't consider tree branches as a suitable access path to a building
[h2]Misc Improvements[/h2]
  • Dreamfort: give noble suites double-thick walls and add apartment doors
  • Suppress DF keyboard events when a DFHack keybinding is matched. This prevents, for example, a backtick from appearing in a textbox as text when you launch gui/launcher from the backtick keybinding.
  • autonick: add more variety to nicknames based on famous literary dwarves
  • gui/unit-syndromes: make lists searchable
  • logistics: bring an autotraded bin to the depot if any item inside is tradeable instead of marking all items within the bin as untradeable if any individual item is untradeable
  • quickfort: blueprint libraries are now moddable -- add a blueprints/ directory to your mod and they'll show up in quickfort and gui/quickfort!
  • stockpiles: include exotic pets in the "tameable" filter
  • suspendmanager: display the suspension reason when viewing a suspended building
  • widgets.EditField: DFHack edit fields now support cut/copy/paste with the system clipboard with Ctrl-X/Ctrl-C/Ctrl-V
[h2]API[/h2]
  • Items::markForTrade(), Items::isRequestedTradeGood(), Items::getValue: see Lua notes below
  • Units::getUnitByNobleRole, Units::getUnitsByNobleRole: unit lookup API by role
[h2]Internals[/h2]
  • Price calculations fixed for many item types
[h2]Lua[/h2]
  • dfhack.items.getValue: gained optional caravan and caravan_buying parameters for prices that take trader races and agreements into account
  • dfhack.items.isRequestedTradeGood: discover whether an item is named in a trade agreement with an active caravan
  • dfhack.items.markForTrade: mark items for trade
  • dfhack.units.getUnitByNobleRole, dfhack.units.getUnitsByNobleRole: unit lookup API by role
  • widgets.TextButton: wraps a HotkeyLabel and decorates it to look more like a button
[h2]Structures[/h2]
  • build_req_choicest: realign structure and fix vmethods
  • squad_orderst: fix vmethods
[h2]Documentation[/h2]
  • misery: rewrite the documentation to clarify the actual effects of the plugin


[ 2023-07-23 01:44:25 CET ] [ Original post ]

DFHack 50.09-r2rc2

Initial bugfixes for the new trading screens:


  • Trade screen now refuses to launch if the traders are not ready to trade
  • Trade screen now initializes correctly when the traders *are* ready to trade
  • Items in buildings are now correctly marked for trade when selected in the "Bring trade goods to depot" screen


[ 2023-07-08 23:38:36 CET ] [ Original post ]

DFHack 50.09-r2rc1

New trade screens!!
The focus of this beta release is the trade workflow. There are two new DFHack screens to play with, one for selecting items to bring to the depot and one for selecting caravan and fort items for the actual trade transaction.

We need your feedback on these! Are they easy to use? Can you get all the items you want to the trade depot in a "reasonable" number of clicks? Are there more filters you'd like to see?

Note that while the "Bring goods to depot" screen is separate from the vanilla screen, the "Trade" screen can be used simultaneously with the vanilla interface. The checkboxes on the vanilla screen are updated "live" as you use the DFHack selection interface, and vice versa. Also, the vanilla screen trade summary at the bottom that shows whether the trader is likely to accept the deal is updated in realtime.

The DFHack "Bring goods to depot" screen is accessible by clicking on the text button that is just above the vanilla "Bring goods to depot" button (shown when you click on the trade depot). It also has the hotkey Ctrl-T

The DFHack trade screen is accessible from the vanilla trade screen, again by clicking on the text button on the right side of the screen or by pressing Ctrl-T.

Hopefully the screencaps attached to this post make everything clear. Suggestions for further usability improvements are always welcome!

Getting these screens done was truly a team effort, requiring significant reverse engineering for information on how export agreements affect price calculations, the logic behind export mandates, and the details regarding ethical trade restrictions, plus thousands of lines of business logic. Very heartfelt thanks to DFHack resident reverse engineers Quietust and ab9rf (rome of oxtrot), without whom none of this would have been possible!









System clipboard copy and paste
Now that DF is on SDL2, we get much better integration with operating system services. Edit fields, like the commandline text line in gui/launcher, now supports copy and paste. Ctrl-C to copy, Ctrl-X to cut, and Ctrl-V to paste. This means that you can find a sample commandline online, open up gui/launcher, and hit Ctrl-V to paste it in. No more manually copying it word by word!

We don't have a way to select ranges of text, so Ctrl-C will copy the entire line and Ctrl-X will cut the entire line. On the plus side, this means Ctrl-X is now a convenient way to clear any DFHack text field : )
Generated release notes[h2]New Plugins[/h2]

  • 3dveins: reinstated for v50, this plugin replaces vanilla DF's blobby vein generation with veins that flow smoothly and naturally between z-levels
[h2]New Scripts[/h2]
  • caravan: new trade screen UI replacements for bringing goods to trade depot and trading
[h2]Fixes[/h2]
  • Fix extra keys appearing in DFHack text boxes when shift (or any other modifier) is released before the other key you were pressing
  • gui/autodump: when "include items claimed by jobs" is on, actually cancel the job so the item can be teleported
  • gui/gm-unit: fix commandline processing when a unit id is specified
  • suspendmanager: take in account already built blocking buildings
[h2]Misc Improvements[/h2]
  • widgets.EditField: DFHack edit fields now support cut/copy/paste with the system clipboard with Ctrl-X/Ctrl-C/Ctrl-V
[h2]API[/h2]
  • Items :: markForTrade(), Items :: isRequestedTradeGood(), Items :: getValue: see Lua notes below
  • Units :: getUnitByNobleRole, Units :: getUnitsByNobleRole: unit lookup API by role
[h2]Internals[/h2]
  • Price calculations fixed for many item types
[h2]Lua[/h2]
  • dfhack.items.getValue: gained optional caravan and caravan_buying parameters for prices that take trader races and agreements into account
  • dfhack.items.isRequestedTradeGood: discover whether an item is named in a trade agreement with an active caravan
  • dfhack.items.markForTrade: mark items for trade
  • dfhack.units.getUnitByNobleRole, dfhack.units.getUnitsByNobleRole: unit lookup API by role


[ 2023-07-08 01:35:30 CET ] [ Original post ]

DFHack 50.09-r1

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch (note: as of this announcement, Bay12 has not yet updated their store on itch), and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.

[h2]Highlights[/h2]
Most changes in this release have to do with migrating to SDL2 and are not visible to the player.

Generated release notes[h2]Misc Improvements[/h2]
  • `caravan`: new overlay for selecting all/none on trade request screen
  • `suspendmanager`: don't suspend constructions that are built over open space
[h2]Structures[/h2]
  • ``tiletype_shape``: changed RAMP_TOP and ENDLESS_PIT to not walkable to reflect how scripts actually need these types to be treated


[ 2023-06-28 20:56:29 CET ] [ Original post ]

DFHack 50.09sdl2-3-rc1

This release is identical to DFHack 50.09sdl2-2-rc1 except for compatibility with DF 50.09sdl2-3.
Please see https://steamcommunity.com/games/2346660/announcements/detail/3681177834687015555 for additional details.

As with the previous experimental release, if you have trouble typing symbols into DFHack text boxes, please reset your DF keybindings to defaults and try again. This is due to changes in how the new version of DF interprets keyboard input.


[ 2023-06-25 12:14:14 CET ] [ Original post ]

DFHack 50.09sdl2-2-rc1

Feature set is identical to DFHack 50.08-r4. Please see https://steamcommunity.com/games/2346660/announcements/detail/3681177834687015555 for details.

If you have trouble typing symbols into DFHack text boxes, please reset your DF keybindings to defaults and try again. This is due to changes in how the new version of DF interprets keyboard input.


[ 2023-06-24 05:42:11 CET ] [ Original post ]

DFHack 50.08-r4

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.


Please report any issues (or feature requests) on the DFHack GitHub issue tracker. When reporting issues, please upload a zip file of your savegame and a zip file of your mods directory to the cloud and add links to the GitHub issue. Make sure your files are downloadable by "everyone with the link". We need your savegame to reproduce the problem and test the fix, and we need your active mods so we can load your savegame. Issues with savegames and mods attached get fixed first!
[h2]Announcements[/h2][h3]PSAs[/h3]
As always, remember that, just like the vanilla DF game, DFHack tools can also have bugs. It is a good idea to save often and keep backups of the forts that you care about.

Many DFHack tools that worked in previous (pre-Steam) versions of DF have not been updated yet and are marked with the "unavailable" tag in their docs. If you try to run them, they will show a warning and exit immediately. You can run the command again to override the warning (though of course the tools may not work). We make no guarantees of reliability for the tools that are marked as "unavailable".

The in-game interface for running DFHack commands (gui/launcher) will not show "unavailable" tools by default. You can still run them if you know their names, or you can turn on dev mode by hitting Ctrl-D while in gui/launcher and they will be added to the autocomplete list. Some tools do not compile yet and are not available at all, even when in dev mode.

If you see a tool complaining about the lack of a cursor, know that it's referring to the keyboard cursor (which used to be the only real option in Dwarf Fortress). You can enable the keyboard cursor by entering mining mode or selecting the dump/forbid tool and hitting Alt-K (the DFHack keybinding for toggle-kbd-cursor. We're working on making DFHack tools more mouse-aware and accessible so this step isn't necessary in the future.
[h2]Highlights[/h2][h3]logistics[/h3]



When you select a stockpile, you'll now see a panel that will let you toggle its automation features. Items and animals brought to that stockpile can be automatically marked for melting, trading, dumping, and/or training.

For example, you can set up cage traps for catching wild game. When you catch something, your dwarves will bring the caged animal to your Animals stockpile. If you enable automatic training on that stockpile, the animals will automatically get a trainer assigned to them. Combine this with autobutcher, which can mark the trained animals for butchering, and you now have a low-toil food supply chain for your kitchens!

Similarly, if you enable automatic trading for your trade goods stockpile, all items in the stockpile will be marked for trading and automatically brought to the trade depot when a merchant caravan arrives.
[h3]Dreamfort[/h3]



Dreamfort is the result of over a decade of experimentation and revision from some of Dwarf Fortress's most experienced players. It is a fully functional, pre-designed fortress you can build yourself from gui/quickfort blueprints. If you're having trouble with getting your forts to work smoothly, try building Dreamfort. The blueprints walk you through the process of creating the fortress so you can learn from its design, progression, and configuration. You can even reuse individual blueprints for the parts you especially like to extend your own designs.

The Dreamfort walkthroughs and blueprints bring you from embark all the way through to a 200-strong mountainhome. Screenshots for all the levels and links to more information here: https://docs.dfhack.org/en/stable/docs/guides/quickfort-library-guide.html#dreamfort.

If you want to explore it interactively, you can download a pre-built Dreamfort from DFFD: https://dffd.bay12games.com/file.php?id=15434.
[h3]suspendmanager[/h3]



Logic for when to suspend building jobs has been upgraded. Now suspendmanager is much smarter when you're building in areas with limited access paths. For example, if you fill a corridor or build a high wall, it will now correctly realize that a wall tile can block access to a another tile farther away.

Moreover, suspendmanager now also considers smoothing and engraving jobs. For example, if you attempt to build a statue on top of flooring that is designated for smoothing, it will now allow the smoothing job to be completed first before the statue blocks it.
Generated release notes [h2]New Plugins[/h2]
  • logistics: automatically mark and route items or animals that come to monitored stockpiles. options are toggleable on an overlay that comes up when you have a stockpile selected.
[h2]Fixes[/h2]
  • buildingplan: don't include artifacts when max quality is masterful
  • dig-now: clear item occupancy flags for channeled tiles that had items on them
  • emigration: reassign home site for emigrating units so they don't just come right back to the fort
  • gui/create-item: allow blocks to be made out of wood when using the restrictive filters
  • gui/liquids: ensure tile temperature is set correctly when painting water or magma
  • gui/quickfort:
    • allow traffic designations to be applied over buildings
    • protect against meta blueprints recursing infinitely if they include themselves
  • gui/sandbox: allow creatures that have separate caste-based graphics to be spawned (like ewes/rams)
  • RemoteFortressReader: fix a crash with engravings with undefined images
  • workorder: prevent autoMilkCreature from over-counting milkable animals, which was leading to cancellation spam for the MilkCreature job
[h2]Misc Improvements[/h2]
  • Blueprint library:
    • dreamfort: full rewrite and update for DF v50
    • pump_stack: updated walkthrough and separated dig and channel steps so boulders can be cleared
    • aquifer_tap: updated walkthrough
  • autonick: additional nicknames based on burrowing animals, colours, gems, and minerals
  • combine: reduce max different stacks in containers to 30 to prevent contaners from getting overfull
  • dig-now: can now handle digging obsidian that has been formed from magma and water
  • gui/autodump: add option to clear the trader flag from teleported items, allowing you to reclaim items dropped by merchants
  • gui/control-panel:
    • add some popular startup configuration commands for autobutcher and autofarm
    • add option for running fix/blood-del on new forts (enabled by default)
  • gui/quickfort:
    • adapt "cursor lock" to mouse controls so it's easier to see the full preview for multi-level blueprints before you apply them
    • only display post-blueprint messages once when repeating the blueprint up or down z-levels
  • gui/sandbox: when creating citizens, give them names appropriate for their races
  • orders:
    • only display import/export/sort/clear panel on main orders screen
    • refine order conditions for library orders to reduce cancellation spam
  • prioritize: add wild animal management tasks and lever pulling to the default list of prioritized job types
  • quickfort: significant rewrite for DF v50! now handles zones, locations, stockpile configuration, hauling routes, and more
  • stockpiles: added barrels, organic, artifacts, and masterworks stockpile presets
  • suspendmanager:
    • now suspends construction jobs on top of floor designations, protecting the designations from being erased
    • suspend blocking jobs when building high walls or filling corridors
  • workorder: reduce existing orders for automatic shearing and milking jobs when animals are no longer available
[h2]Removed[/h2]
  • gui/automelt: replaced by an overlay panel that appears when you click on a stockpile
[h2]Structures[/h2]
  • abstract_building_libraryst: initialize unknown variables as DF does
  • misc_trait_type: realign
[h2]Documentation[/h2]
  • blueprint-library-guide: update Dreamfort screenshots and links, add aquifer_tap screenshot


[ 2023-06-24 04:33:14 CET ] [ Original post ]

DFHack 50.08-r3-sdl2-5-beta1

The DF SDL2 experimental branch brings some fundamental changes to game architecture, in particular around keyboard/mouse input and graphics output.

If you are using a non-QWERTY keyboard layout, and especially a non-English locale, please test to see if you can type normally in DFHack windows (such as gui/launcher). In particular, test to see if you can type punctuation symbols and underscores.

Thanks!


[ 2023-06-17 20:32:07 CET ] [ Original post ]