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
Rework for Steam client compatibility; Windows console encoding
Rework for Steam client compatibility
The overwhelming purpose for this release is to rework DFHack so that it will work seamlessly when installed via Steam. Steam recently changed its client in a way that made our prior method of installing DFHack where DF could "see" it stop working. With a single tiny exception, the entirety of this update is to facilitate being able to install DFHack via Steam with a minimum of user hassle.
Windows console encoding
Dwarf Fortress recently was updated to force UTF-8 for all interactions with the operating system in Windows; however, this change did not reach to the text console used by DFHack on Windows, which is still defaulting to the user's default system code page. This has caused some anomalous behavior for users whose default system code page is not already UTF-8. This update includes a tiny change that forces this console to also use UTF-8 regardless of the user's default system code page.
Announcements
Special instructions for this update; DFHack Steam Cloud support; Legacy support branches; on Steam; PSAs
Special instructions for this update
One of the side effects of the changes made by the Steam client is that people who were using DFHack before the Steam client change now have a "stranded" installation of DFHack still living in their Dwarf Fortress installation folder. This installation must be removed for DFHack to work correctly going forward. Our installer has code to detect this. On Windows, the user will be asked for permission to remove the legacy installation, while on Linux a popup with instructions on how to remove the legacy installation will be displayed.
In addition, for technical reasons, DFHack can no longer completely install itself into Dwarf Fortress solely by installing the app on Steam. As a result, it is now necessary to launch from the DFHack application at least once after installing DFHack so DFHack can install itself into Dwarf Fortress. After this, it should be possible to launch from either Dwarf Fortress or DFHack the same way as before.
If you have problems with DFHack not working after installing this update which are not resolved by launching the DFHack application, we recommend the following process:
- Uninstall DFHack via Steam
- Remove the following files and folders from the Dwarf Fortress installation folder:
hack(entire folder/directory)stonesense(entire folder/directory)binpatch.exe(Windows) /binpatch(Linux)dfhack-run.exe(Windows) /dfhack-run(Linux)- all files named
allegro_*.dll(Windows) orliballegro_*.so(Linux) dfhack-client.dll(Windows) /libdfhack-client.so(Linux)dfhooks_dfhack.dll(Windows) /libdfhooks_dfhack.so(Linux)lua53.dll(Windows) /liblua53.dll(Linux)protobuf-lite.dll(Windows) /libprotobuf-lite.so(Linux)
- Reinstall DFHack via Steam
- Launch DFHack once
DFHack Lua scripters need to be aware that the hack folder is no longer guaranteed to be in hack. A path to it can be obtained with the dfhack.getHackPath() call. While all standard scripts have been updated to reflect this, user written scripts have not. The dfhack-config folder has not moved with this update.
DFHack Steam Cloud support
DFHack has, for some time now, used Steam Auto-Cloud to synchronize the dfhack-config folder that contains each user's personal configuration of DFHack. For technical reasons, we can no longer do this; as a result, we will be turning off DFHack Steam Cloud. You may wish to consider manually backing up the contents of your dfhack-config folder.
Legacy support branches on Steam
We will not be porting support for the new installation to the legacy support branches currently available on Steam. As these branches won't work for Steam users anyway (as they install to the wrong place), there's no value in keeping them around, and so we will be deleting them. Note that you can still download legacy versions of DFHack from GitHub for far further back than we keep on Steam, and these legacy versions will still work as they always have by manually installing them into the installation folder of the matching version of Dwarf Fortress.
We will continue to provide legacy support branches on Steam going forward, subject to the limits on how many branches Steam allows, of course.
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
Fixes
- Core: Windows console will always use UTF-8 regardless of system code page settings
- Steam launcher: Switch to injection strategy, allowing Dwarf Fortress and DFHack to be installed in disparate locations
Misc Improvements
- Make DFHack relocatable so that it doesn't depend on being fully co-installed with Dwarf Fortress