github DFHack/dfhack 53.16-r2rc1
DFHack 53.16-r2rc1

pre-release3 hours ago

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

Many new tools and features; Even more bug fixes

Many new tools and features

A bunch of new (or revived) features in this upcoming release. The most noticeable is that the smooth movement plugin is now officially part of DFHack. We've also added a tool to export world data for use with GIS mapping applications, reinstated the old stockflow tool (which allows automating work orders based on a stockpile's contents), reinstated labormanager as a work detail automation tool (with many improvements over the old one), made improvements to lots of existing tools, added a mitigation for a DF bug that made reclaimed/unretired fortresses behave badly, and added an API for doing bulk map scans from Lua efficiently. See the changelog, below, for more details.

Even more bug fixes

Even more DFHack bugs have been fixed. A big one is fixing the defect in timestream that prevented anyone from ever suffocating (an entirely unintended nerf). There's simply too many to write them all up here; check the changelog, below, for the full details.

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

  • devel/datamine: watch live values for changes and diff structure snapshots to aid script development and reverse engineering
  • devel/infinite-sky-probe: tool for testing whether infinite sky is working correctly
  • export-world-map: Export world map data for GIS and other external tools.
  • fix/stuck-written-materials: free written materials that are stuck in a non-existent job
  • gui/export-world-map: New GUI tool to configure world map exports from the embark selection screen.
  • smooth-movement: smoothly animate creature, item, and vehicle movement in the fortress viewport
  • stockflow: (reinstated) queue manager jobs based on free space in stockpiles

New Features

  • autodump: new undestroy option reverts pending item destruction while the game is still paused
  • buildingplan: new "Do now" option marks the jobs of subsequently placed buildings as high priority
  • getplants: new --dry-run option counts affected plants without designating, and new --brewable/--edible/--oil/--cloth/--dye trait filters restrict the selection by plant use
  • gui/create-item: quality selection prompt now has 0-5 hotkeys matching the quality levels
  • gui/mod-manager: warn when loading a preset that doesn't include vanilla mods that were added to the game after the preset was saved
  • gui/unit-info-viewer: the unit character sheet now shows the viewed unit's current and long-term mood, color-coded by stress level
  • idle-crafting: support cloth, silk, and yarn crafts
  • labormanager:
    • the autolabor plugin now provides a second command that manages labors through the work detail system instead of writing the labor matrix; use <cmd> mode legacy|modern or the work details overlay to switch
    • track job posting age and show a "task starvation" notification in the DFHack warning panel when any posting sits unclaimed for over a day
  • prioritize: prioritize this boosts the job related to the currently selected entity, absorbing the functionality of do-job-now (which still works and forwards to the new command)
  • sort: the stress/happiness icons in the top bar are now clickable, opening a list of the citizens in that stress category; selecting a citizen centers the map on them
  • stockpiles: the overlay now also attaches to the minecart hauling stop conditions panel, offering import/export of route stop conditions
  • stocks: the overlay's collapse all hotkey now toggles, expanding all categories again when everything is collapsed
  • suspendmanager: suspend deconstruction jobs that would collapse connected machinery, such as waterwheels supporting other components
  • quickfix: repair plotinfo.site_id on load when DF leaves it unassigned on reclaimed fortresses

Fixes

  • Fixed a possible hang or assertion failure when pressing a hotkey while a DFHack GUI window was open but unfocused
  • Fixed broken weather lookup in World::ReadCurrentWeather
  • Fixed out-of-bounds color table access in Screen module when Lua pens use COLOR_RESET
  • Fixed persistent site data API (dfhack.persistent.saveSiteData/getSiteData) failing on newly reclaimed fortresses until the first save
  • Fixed dfhack.items.createItem making glob items of an incorrect size
  • Plugin commands that throw uncaught C++ exceptions now report an error instead of crashing the game
  • 3dveins:
    • fix crash when a tile's biome cannot be resolved
    • fix failure on embarks that cross midmap tiles
  • aquifer:
    • make --skip-top and top-relative --levels take effect for the drain, convert, and add actions instead of being silently ignored
    • make --help/-h actually print help instead of running a map-wide list
  • autochop: fix crash when a burrow-based command names a burrow that doesn't exist
  • autodump: destroy no longer leaves the contents of destroyed containers in limbo or crashes when destroying unit-held items
  • bodyswap: fix "invalid argument count" when the target unit has no nemesis record
  • buildingplan:
    • fix roller material estimate asking for one chain per tile instead of one chain total
    • fix "Unlink all" only unlinking some mechanisms (or crashing) when freeing mechanisms from the building
  • burrow: fix tiles clear and other tile operations silently failing because burrow block z-coordinates were stored incorrectly in the Burrows module
  • caravan: fix doubled "total value of items marked for trade" after toggling filter options, and keep item marks when switching between filter views in the Bring goods to depot overlay
  • combine: dyes are combined again, but only when their dye_profile matches, so mixed dyes no longer revert to a component dye
  • export-world-map: fix crash exporting site data for a site whose owner has an undefined race
  • fix/loyaltycascade: guard against citizens that are not historical figures and emit a warning.
  • gui/quickfort: show smoothing designations immediately after applying a blueprint
  • gui/settings-manager: preserve built-in work details added after saved settings were created
  • gui/siegemanager: fix nil index if there are no siege engines on the map
  • hide-tutorials: also suppress the adventure mode start tutorial (defaults its checkbox to off and dismisses the popups)
  • item: the reachable/unreachable filters no longer count installed building parts, and now treat loose contents of unwalkable buildings (like bolts loaded in a bolt thrower) as reachable when a citizen can stand next to the building
  • overlay: overlay hotkeys no longer steal typed characters while the game is capturing text input, e.g. when renaming a building
  • questport: fix crash on current DF versions and make the teleport actually move the player in fast travel
  • reveal-adv-map: fix live quest log map update when revealing or hiding the map
  • sort: fix the Places/Workshops and task searches missing workshops by their current display names (e.g. "Stoneworker's Workshop", "Screw Press")
  • stocks:
    • overlay now resets scroll position when collapsing categories so the item list is no longer left blank and unscrollable
    • overlay now resets scroll position when collapsing categories so the item list is no longer left blank and unscrollable
  • strangemood:
    • updated to match behavior of current DF version
    • fix crash when --id is given a non-numeric unit id
  • suspendmanager: fix out-of-bounds parameter read when set is given too few arguments
  • tiletypes: remove plants (including trees) rooted on a tile that is painted into something that cannot host them, so cleared ground no longer regrows floating trees
  • timestream:
    • deal properly with units who have breathing difficulties
    • pass the validated numeric value to the fps setter so set fps with unusual numeric strings (e.g. 60.9) can't be silently misapplied
  • Units::teleport:
    • update unit occupancy on the full 3x3 footprint of EQUIPMENT units (e.g. wagons) instead of only their center tile
    • only clear tile unit occupancy flags when no other unit of the same kind remains on the tile

Misc Improvements

  • Added Coord2d and Coord3d C++ templates, providing a standard set operations for 2-tuples and 3-tuples of any numeric type
  • Renamed the stockpiles tool tag to stockpile so it no longer collides with the stockpiles plugin in gui/launcher
  • caravan:
    • the Bring goods to depot, Trade, and Assign items for display overlays now allow searching for items with non-ASCII characters in their description
    • the Trade overlay will use the trader's appraisal skill instead of the broker's to round/obfuscate the value of items
  • gui/quickfort: transform hotkeys changed from ()_= to ,.[] since () is easily confused with <> in the game font

Documentation

  • Document autodump-destroy-here. Remove mention of autodump destroy able to revert destruction.

Removed

  • confirm: removed the squad-disband and hotkey-reset confirmations; the game asks for both itself now ("Really disband?" and "Really overwrite")

API

  • Added Maps::addRegionBiomeOffset to shift world region coordinate by region_details biome reference
  • Added Maps::describeSurroundings to get surroundings classification from savagery and evilness
  • Added Maps::forEachTile with Maps::TileFilter/Maps::TileActions to scan a cuboid of tiles, matching tiles by tiletype, tiletype attributes, and designation/occupancy bits, and counting, rewriting tiletypes, editing designation/occupancy bits, spawning constructions, or invoking a callback on matching tiles
  • Added Maps::getCurrentWeather to determine the current weather on the map.
  • Added Maps::getSiteTypeName to print the sites classification as a string (e.g. "mountain halls")
  • Added MiscUtils::print_range to print ranges with prefix, separator, and suffix
  • Added Units::breathes and Units::getBreathingState
  • Deprecated World::ReadCurrentWeather in favor of Maps::getCurrentWeather

Lua

  • Added dfhack.maps.forEachTile to scan a cuboid of tiles with a declarative filter and apply actions (count, set tiletype or per-tiletype replacements, set designation/occupancy fields, spawn constructions, Lua callback) in a single native call

Structures

  • added support for overriding code generation for a specific type
  • added graphic_viewport_spatter_flag and related definitions

Don't miss a new dfhack release

NewReleases is sending notifications on new releases.