1. DFHack - Dwarf Fortress Modding Engine
  2. News

DFHack - Dwarf Fortress Modding Engine News

DFHack 51.13-r1

Quick compatibility update for the quick-released DF 51.13

DFHack 51.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]Highlights[/h2][h3]Paint the map with stars[/h3]
The DFHack drawing tool gui/design now has an option for drawing hollow or filled N-point stars. You can even rotate the star around its axis so the points can go in any direction. Go ahead, make a Palace of the Sun for your demanding monarch!
[h3]Search for units by any name[/h3]
The general search and find tool, gui/sitemap, now displays both the native and the English translated name for all units. Whichever name you happen to remember, you can search for it and find the unit you're looking for! Click on the name to zoom to that unit on the map, or shift-click to start following that unit around.
[h3]Let items rot away[/h3]
The deteriorate tool is now available on the DFHack gui/control-panel. It allows items to rot away over time. This can be good for just keeping your map clean, but you can also use it to add a bit more challenge to the game. If you enable it with default settings, it will check the map for non-entombed corpses and non-usable body parts and let them rot away over the next few months. For an additional challenge, you can add food, usable body parts (like hair and bones) and damaged clothing to that list. Use it or lose it!
[h3]What's my mod list again?[/h3]
You can now use gui/mod-manager to see a list of your active mods. You can even export the list to the clipboard for easy sharing or posting.
[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.

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
[h2]New Tools[/h2]
  • deteriorate: (reinstated) allow corpses, body parts, food, and/or damaged clothes to rot away
  • modtools/moddable-gods: (reinstated) create new deities from scratch
[h2]New Features[/h2]
  • gui/blueprint: now records zone designations
  • gui/design: add option to draw N-point stars, hollow or filled or inverted, and change the main axis to orient in any direction
  • gui/mod-manager: when run in a loaded world, shows a list of active mods -- click to export the list to the clipboard for easy sharing or posting
  • gui/spectate: added "Prefer nicknamed" to the list of options
[h2]Fixes[/h2]
  • fixed an overly restrictive type constraint that resulted in some object types being glossed as a boolean when passed as an argument from C++ to Lua
  • getplants:
    • will no longer crash when faced with plants with growths that do not drop seeds when processed
    • use updated formula for calculating whether plant growths are ripe
    • fix logic for determining whether plant growths have been picked
  • gui/design: prevent line thickness from extending outside the map boundary
  • gui/teleport: adapt to new behavior in DF 51.11 to avoid a crash when teleporting items into mid-air
  • plants: will no longer generate a traceback when a filter is used
  • preserve-rooms: don't warn when a room is assigned to a non-existent unit. this is now common behavior for DF when it keeps a room for an unloaded unit
  • script-manager: fix lua scripts in mods not being reloaded properly upon entering a saved world on Windows
  • starvingdead:
    • properly restore to correct enabled state when loading a new game that is different from the first game loaded in this session
    • ensure undead decay does not happen faster than the declared decay rate when saving and loading the game
[h2]Misc Improvements[/h2]
  • All places where units are listed in DFHack tools now show the translated English name in addition to the native name. In particular, this makes units searchable by English name in gui/sitemap.
  • blueprint:
    • support for recording zones
    • support for recording stockpile properties like names and stockpile links; does not yet support recording detailed contents configuration
  • dig: ASCII overlay now displays priority of digging designations
  • remove-stress: also applied to long-term stress, immediately removing stressed and haggard statuses
  • spectate: added prefer nicknamed units
[h2]Removed[/h2]
  • removed historically unused Core :: RegisterData/Core :: GetData API and associated internal data structures
[h2]API[/h2]
  • cuboid :: forCoord, Maps :: forCoord: take additional parameter to control whether iteration goes in column major or row major order
  • Items :: getDescription: fixed display of quality levels, now displays ALL item designations (in correct order) and obeys vanilla SHOW_IMP_QUALITY setting
  • Random module: added SplitmixRNG class, implements the Splitmix64 RNG used by Dwarf Fortress for "simple" randomness
[h2]Lua[/h2]
  • script-manager:
    • new get_active_mods() function for getting information on active mods
    • new get_mod_info_metadata() function for getting information out of mod info.txt files

DFHack 51.11-r1.2

Quick patch to fix a crashes in preserve-rooms and preserve-tombs when an invalid unit is assigned to a zone.

DFHack 51.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]Break up brawls[/h3]
Both fix/loyaltycascade and makeown now take the extra step of calming any brawls that your citizens are involved in. If a particular captured and tamed pet is acting unruly (e.g. a Roc attacking your military or random visitors), select it and run makeown to remove it from any conflicts it may have been involved in before you tamed it.

Likewise, fix/loyaltycascade will now break up tavern brawls. Tavern brawls aren't true "loyalty cascades", since the brawlers aren't actually enemies of your civilization. However, it really looks like a loyalty cascade, and this is the tool that players tend to try when a tavern brawl spirals out of control.

And remember the old fortress adage: "To your alcohol stocks pay mind, but keep those tavern keepers unassigned!".
[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.

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
[h2]Fixes[/h2]
  • text widgets no longer lose their cursor when the Ctrl-a (select all) hotkey is pressed when there is no text to select
  • dig-now:
    • fix cases where boulders/rough gems of incorrect material were being generated when digging through walls
    • properly generate ice boulders when digging through ice walls
  • gui/petitions: fix date math when determining petition age
  • gui/rename: fix commandline processing when manually specifying target ids
  • gui/sandbox: restore metal equipment options when spawning units
  • gui/teleport: now properly handles teleporting units that are currently falling or being flung
  • list-agreements: fix date math when determining petition age
  • spectate: don't show a hover tooltip for hidden units (e.g. invisible snatchers)
  • stockpiles: fix one-off error in item type when importing furniture stockpile settings
  • suspendmanager: fix walls being treated as potential suitable access if another wall is built underneath
  • unload: fix recent regression where unload would immediately reload the target
  • Buildings module: do not crash if a map_block unexpectedly contains an item that is not on the master item vector
[h2]Misc Improvements[/h2]
  • fix/loyaltycascade: now also breaks up brawls and other intra-fort conflicts that look like loyalty cascades
  • makeown: remove selected unit from any current conflicts so they don't just start attacking other citizens when you make them a citizen of your fort
  • spectate: show dwarves' activities (like prayer)
[h2]API[/h2]
  • Buildings :: setOwner: updated for changes in 51.11
  • Buildings module: add getOwner (using the Units :: get_cached_unit_by_global_id mechanic) to reflect changes in 51.11
  • Military module: added addToSquad function
  • Units :: teleport: projectile information is now cleared for teleported units
  • Units module: added get_cached_unit_by_global_id to emulate how DF handles unit vector index caching (used in civzones and in general references)
[h2]Lua[/h2]
  • dfhack.military.addToSquad: expose Military API function
  • dfhack.buildings.getOwner: make new Buildings API available to Lua

DFHack 51.10-r1

Compatibility with DF 51.10