Q: How do I download DFHack?
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. If you are on Windows and are manually installing from the zip file, please remember to right click on the file after downloading, open the file properties, and select the "Unblock" checkbox. This will prevent issues with Windows antivirus programs.
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!
Highlights
Bugfixes, New and improved features
Bugfixes
The main reason for this release is to fix a cricket (a noisy but harmless bug): a recent Windows update changed the behavior of the
Windows terminal in such a way that led to DF+DFHack hanging on exit. This is, fundamentally, due to a 15-year-old defect in DFHack's Windows console handling, which before didn't cause problems but which now does.
Several other components got minor adjustments - see changelog below for details.
New and improved features
We added an export-worldgen tool that exports the current world generation, including optionally its map, to a worldgen preset so you can easily create the same world over and over again if you want, or readily share a world you found interesting with another player.
The tool for exporting world maps to GIS also got some minor improvements.
We also made changes to DFHack's crash logging to provide more/better debugging information and added some defensive code in a few places to transform what used to be fatal crashes into nonfatal error messages.
Announcements
PSAs
PSAs
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.
Some 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 listed as "unavailable" in the docs do not compile yet and are not accessible 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
New tools, fixes, and improvements
New Tools
export-worldgen: export the loaded world's generation parameters as aworld_gen.txtstanza that can regenerate it, with optional world painter (PS_*) map data
Fixes
- Core: Windows console will no longer hang on close (on some builds of Windows)
- Fixed
scriptmanager.getModStatePath()causing scripts to crash when called advtools,ghostly,hide-tutorials,launch,markdown,resize-armor,resurrect-adv,toggle-kbd-cursor,gui/create-item,gui/notify,gui/unit-info-viewer: now detect arena adventure modegui/reveal: don't allow use in arena, since underlyingrevealplugin doesn't support itprospect: don't warn about a missing magma sea in the pre-embark estimate when the world was generated without onedwarfmode.lua: properly handle adventure arena look cursorUnits::getProfessionName,Units::getCasteProfessionName: now detect arena adventurer for default race nameWorld::getAdventurer: properly detect adventurer in arena mode
Misc Improvements
- crash reports now include a Lua stack traceback when the game crashes while Lua code is executing (
crashlog/crash_*.txton Linux,stderr.logon Windows) gui/export-world-map: export of bridge and road materials and more precise bridge coordinatesoverlay: errors raised by a bad C function result count or corrupted Lua call stack are now reported as Lua errors instead of crashing the game
Documentation
dfhack.world.isAdventureMode: doesn't include adventurer arena, advise checking gamemode
Lua
printall_recurse: no longer recurses into untagged unions, which have no way to identify their live member; fixes crashes when printing structures that contain them, such asdf.army_controller