Introduction and overview¶
DFHack is a Dwarf Fortress memory access library, distributed with a wide variety of useful scripts and plugins.
All new releases are announced in the Bay12 forums thread, which is also a good place for discussion and questions.
For users, DFHack provides a significant suite of bugfixes and interface enhancements by default, and more can be enabled. There are also many tools (such as workflow or autodump) which can make life easier. You can even add third-party scripts and plugins to do almost anything!
For modders, DFHack makes many things possible. Custom reactions, new interactions, magic creature abilities, and more can be set through DFHack tools and custom raws. Non-standard DFHack scripts and inits can be stored in the raw directory, making raws or saves fully self-contained for distribution - or for coexistence in a single DF install, even with incompatible components.
For developers, DFHack unites the various ways tools access DF memory and allows easier development of new tools. As an open-source project under various open-source licenses, contributions are welcome.
See Installing DFHack for details on installing DFHack.
Once DFHack is installed, it extends DF with a console that can be used to run
commands. On Windows, this console will open automatically when DF is started.
On Linux and macOS, you will need to run the
dfhack script from a terminal
(instead of the
df script included with DF), and that terminal will be
used by the DFHack console.
Basic interaction with DFHack involves entering commands into the console. To learn what commands are available, you can keep reading this documentation or skip ahead and use the ls and help commands.
Another way to interact with DFHack is to set in-game keybindings for certain commands. Many of the newer and user-friendly tools are designed to be used this way.
Finally, some commands are persistent once enabled, and will sit in the background managing or changing some aspect of the game if you enable them.
In order to avoid user confusion, as a matter of policy all GUI tools display the word DFHack on the screen somewhere while active.
When that is not appropriate because they merely add keybinding hints to existing DF screens, they deliberately use red instead of green for the key.
DFHack has several ways to get help online, including:
#dfhackIRC channel on Libera
Some additional, but less DFHack-specific, places where questions may be answered include:
The /r/dwarffortress questions thread on Reddit
When reaching out to any support channels regarding problems with DFHack, please
remember to provide enough details for others to identify the issue. For
instance, specific error messages (copied text or screenshots) are helpful, as
well as any steps you can follow to reproduce the problem. Sometimes, log output
stderr.log in the DF folder can point to the cause of issues as well.
Some common questions may also be answered in documentation, including: