github DFHack/dfhack 50.11-r5
DFHack 50.11-r5

latest releases: 50.14-r1.1, 50.14-r1, 50.13-r5...
8 months 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

gui/embark-anywhere, bulk item and building management, squad equipment fixer, biome visualizer, auto-restore difficulty settings and standing orders

The end-of-year holidays have brought a surge of DFHack development! There are many new features and tools to play with. In order to keep these highlights to a reasonable length, we can't even go through them all in detail -- see the Changelog section for a full list.


Be master of your domain with gui/embark-anywhere

embark_anywhere

By popular request, you can now ask Armok to allow you to embark wherever you please!

If you run gui/embark-anywhere when you’re choosing a site for embark, you can bypass any warnings the game gives you about potential embark locations. Want to embark in an inaccessible location on top of a mountain range? Go for it! Want to try a brief existence in the middle of the ocean? Nobody can stop you! Want to tempt fate by embarking inside of a necromancer tower? !!FUN!!

Any and all consequences of embarking in strange locations are up to you to handle (possibly with other armok tools).

The DFHack logo isn't shown on the embark screen (since it would cover the vanilla embark size adjustment widgets), but DFHack hotkeys still work, so you can still bring up the logo menu with Ctrl-Shift-C. There is also a convenience hotkey for running gui/embark-anywhere directly: Ctrl-A, which is only active when on the site choosing screen.

Note that this command (and its hotkey) will not be shown for those who have DFHack's "Mortal Mode" enabled in the gui/control-panel Preferences tab.

embark_anywhere

Bulk item management

item_melt

The new item commandline tool allows you to filter items in you fort by various properties (item type, material, wear-level, quality, etc.), and perform bulk operations like forbid, dump, melt, and their inverses. With one command, you can hide all boulders that are not in stockpiles, or mark all metal items that are less than masterwork quality for melting!

This tool also provides the underlying logic for a planned (but not yet written) GUI-based item management screen.

item_boulder

item_melt

Squad equipment assignment fixing tool

uniform_unstick_report

When you look at your squad equipment, there will be a new button that says "Detect conflicts". This will bring up a report of squad equipment issues, like:

  • squad members assigned to labors that cause issues with military uniforms: mining, hunting, and tree chopping
  • a single piece of equipment assigned to multiple squad members
  • citizens retaining squad membership (and equipment configuration) from previous forts (this can happen with migrants from forts that you have retired)

There's a button at the top of the report that attempts to fix all the problems. It will remove assignments for conflicting gear or will force your dwarves to drop what they have so they can pick it up in the correct order. Remember to click "Update equipment" after running the fixer so that new equipment gets assigned to units that need it.

It may take a few tries (give your dwarves some time to go get their new gear before you try again), but your forever-yellow equipment icons should finally turn green!

uniform_unstick

Visualize biome boundaries with gui/biomes

gui_biomes

If you have embarked at the intersection of two or more biomes, you may have trouble finding a place for your farm plots so that you can grow the crops you want. gui/biomes can show you where the boundaries are, and will also give you information about the biomes themselves, such as their savagery rating.

gui_biomes

Bulk building management with gui/mass-remove

gui_mass_remove

gui/mass-remove has been around for a while, but has received a significant overhaul. You can box select a region and schedule all buildings, constructions, stockpiles, and/or zones for removal. Planned and fully built buildings/constructions can be selected independently. No need to rage quit if you accidentally plan a solid block of 400 walls instead of flooring! Clear it all away in a few clicks!

It can easily cancel removal of buildings or constructions that you have marked for removal as well.

Bring it up when on the main map with the Ctrl-M hotkey.

gui_mass_remove

Auto-restore difficulty settings and standing orders for new embarks

difficulty_restore

Do you find yourself having to remember to go turn corpse hauling off for your dear, bearded, impressionable children? Now, you can set it once, export, and have your settings automatically restored when you start a new embark. It's seamless, and is a huge time-saver for people with highly customized settings!

Both difficulty settings (in the pre-embark setup screen or the Settings screen when a fort is loaded) and standing orders (Labor -> Standing orders) can be saved and restored independently. When on those configuration screens, look for a DFHack overlay toggle where you can enable auto-restore for new embarks.

standing_orders

Announcements

DFHack control panel changes, Plugin ABI bump, PSAs

DFHack control panel changes

gui_control_panel

The DFHack gui/control-panel interface received a significant overhaul. Tools are now categorized into subtabs, gathering the automation, bugfix, and gameplay tools into sublists. The file format for storing control panel configuration has changed as well. When you load this release of DFHack, your previous control panel settings will be seamlessly migrated to the new format. Other than the layout changes, which should make the tools you want easier to find, the primary behavior change is that some things that were only configured globally (like the tools on the now-gone "Maintenance" tab) are now configurable per-fort. There is also more information about what things are and what they do. For example, each overlay now has a short description.

Stonesense, 3D renderer of DF forts, needs your help!

Calling C++ developers!

DFHack's stonesense plugin, the source of the majority of 3D fort renders you see, needs help. The original authors are unavailable, and the plugin, popular as it is, needs a new owner.

The first major task is to port the renderer from the current 10-year old Allegro framework to either a modern version of Allegro or SDL2, whichever turns out to be more appropriate.

Secondly, the codebase needs some overall work to improve stability. There are several known crash bugs in the Stonesense issue tracker that need attention.

Finally, new features and new direction! There are currently open feature requests, of course, but we'd also be interested in hearing new ideas and vision for where this beloved project can go next!

If you are interested, please come talk to us at the DFHack Discord server: https://dfhack.org/discord

Plugin ABI version bump

If you are developing an external plugin for DFHack, be aware that the plugin Application Binary Interface (ABI) has changed in this version to support the new site-local persistence model. See changes to the sample code in https://github.com/DFHack/dfhack/tree/develop/plugins/examples for details. Any external plugins that target DF 50.11 will need to be recompiled against DFHack 50.11-r5 (or later) sources.

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.

Many 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 do not compile yet and are not available 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

  • control-panel: new commandline interface for control panel functions
  • gui/biomes: visualize and inspect biome regions on the map
  • gui/embark-anywhere:
    • new keybinding (active when choosing an embark site): Ctrl-A
    • bypass those pesky warnings and embark anywhere you want to
  • gui/reveal: temporarily unhide terrain and then automatically hide it again when you're ready to unpause
  • gui/teleport: mouse-driven interface for selecting and teleporting units
  • item: perform bulk operations on groups of items.
  • uniform-unstick: (reinstated) force squad members to drop items that they picked up in the wrong order so they can get everything equipped properly

New Features

  • gui/mass-remove: new global keybinding: Ctrl-M while on the fort map
  • gui/settings-manager: save and load embark difficulty settings and standing orders; options for auto-load on new embark
  • sort: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
  • uniform-unstick: add overlay to the squad equipment screen to show a equipment conflict report and give you a one-click button to (attempt to) fix
  • zone: add button to location details page for retiring unused locations

Fixes

  • DFHack tabs (e.g. in gui/control-panel) are now rendered correctly when there are certain vanilla screen elements behind them
  • Dreamfort: fix holes in the "Inside+" burrow on the farming level (burrow autoexpand is interrupted by the pre-dug miasma vents to the surface)
  • When passing map movement keys through to the map from DFHack tool windows, also pass fast z movements (shift-scroll by default)
  • ban-cooking: fix banning creature alcohols resulting in error
  • buildingplan:
    • when you save a game and load it again, newly planned buildings are now correctly placed in line after existing planned buildings of the same type
    • treat items in wheelbarrows as unavailable, just as vanilla DF does. Make sure the fix/empty-wheelbarrows fix is enabled so those items aren't permanently unavailable!
    • show correct number of materials required when laying down areas of constructions and some of those constructions are on invalid tiles
  • caravan: ensure items are marked for trade when the move trade goods dialog is closed even when they were selected and then the list filters were changed such that the items were no longer actively shown
  • confirm: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel)
  • empty-bin: now correctly sends ammunition in carried quivers to the tile underneath the unit instead of teleporting them to an invalid (or possibly just far away) location
  • fastdwarf:
    • prevent units from teleporting to inaccessible areas when in teledwarf mode
    • allow units to meander and satisfy needs when they have no current job and teledwarf mode is enabled
  • getplants: fix crash when processing mod-added plants with invalid materials
  • gui/design:
    • fix incorrect highlight when box selecting area in ASCII mode
    • fix incorrect dimensions being shown when you're placing a stockpile, but a start coordinate hasn't been selected yet
  • misery: fix error when changing the misery factor
  • quickfort: if a blueprint specifies an up/down stair, but the tile the blueprint is applied to cannot make an up stair (e.g. it has already been dug out), still designate a down stair if possible
  • reveal: now avoids revealing blocks that contain divine treasures, encased horrors, and deep vein hollows (so the surprise triggers are not triggered prematurely)
  • sort:
    • fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
    • fix potential crash when removing jobs directly from the Tasks info screen
  • source: water and magma sources and sinks now persist with fort across saves and loads
  • stonesense: fix crash in cleanup code after mega screenshot (Ctrl-F5) completes; however, the mega screenshot will still make stonesense unresponsive. close and open the stonesense window to continue using it.
  • suspendmanager: correctly handle building collisions with smoothing designations when the building is on the edge of the map
  • warn-stranded: don't warn for citizens who are only transiently stranded, like those on stepladders gathering plants or digging themselves out of a hole
  • Maps::getBiomeType, Maps::getBiomeTypeWithRef: fix identification of tropical oceans

Misc Improvements

  • Dreamfort: put more chairs adjacent to each other to make the tavern more "social"
  • The "PAUSE FORCED" badge will blink briefly to draw attention if the player attempts to unpause when a DFHack tool window requires the game to be paused
  • wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
  • autochop: better error output when target burrows are not specified on the commandline
  • autoclothing : now does not consider worn (x) clothing as usable/available; reduces overproduction when using tailor at same time
  • buildingplan: add option for preventing constructions from being planned on top of existing constructions (e.g. don't build floors on top of floors)
  • burrow: flood fill now requires an explicit toggle before it is enabled to help prevent accidental flood fills
  • confirm:
    • updated confirmation dialogs to use clickable widgets and draggable windows
    • added confirmation prompt for right clicking out of the trade agreement screen (so your trade agreement selections aren't lost)
    • added confirmation prompts for irreversible actions on the trade screen
    • added confirmation prompt for deleting a uniform
    • added confirmation prompt for convicting a criminal
    • added confirmation prompt for re-running the embark site finder
    • added confirmation prompt for reassigning or clearing zoom hotkeys
    • added confirmation prompt for exiting the uniform customization page without saving
  • fastdwarf: now saves its state with the fort
  • fix/stuck-instruments: now handles instruments that are left in the "in job" state but that don't have any actual jobs associated with them
  • gui/autobutcher: interface redesigned to better support mouse control
  • gui/control-panel:
    • reduce frequency for warn-stranded check to once every 2 days
    • tools are now organized by type: automation, bugfix, and gameplay
  • gui/launcher:
    • now persists the most recent 32KB of command output even if you close it and bring it back up
    • make autocomplete case insensitive
  • gui/mass-remove:
    • can now differentiate planned constructions, stockpiles, and regular buildings
    • can now remove zones
    • can now cancel removal for buildings and constructions
  • gui/quickcmd: clickable buttons for command add/remove/edit operations
  • orders: reduce prepared meal target and raise booze target in basic importable orders in the orders library
  • sort:
    • add "Toggle all filters" hotkey button to the squad assignment panel
    • rename "Weak mental fortitude" filter to "Dislikes combat", which should be more understandable
  • uniform-unstick: warn if a unit belongs to a squad from a different site (can happen with migrants from previous forts)
  • warn-stranded: center the screen on the unit when you select one in the list
  • work-now: now saves its enabled status with the fort
  • zone:
    • add include/only/exclude filter for juveniles to the pasture/pit/cage/restraint assignment screen
    • show geld status and custom profession (if set, it's the lower editable line in creature description) in pasture/pit/cage/restraint assignment screen

Removed

  • channel-safely: (temporarily) removed due to stability issues with the underlying DF API
  • persist-table: replaced by new dfhack.persistent API

API

  • New plugin API for saving and loading persistent data. See plugins/examples/skeleton.cpp and plugins/examples/persistent_per_save_example.cpp for details
  • Plugin ABI (binary interface) version bump! Any external plugins must be recompiled against this version of DFHack source code in order to load.
  • capitalize_string_words: new MiscUtils function, returns string with all words capitalized
  • Constructions::designateRemove: no longer designates the non-removable "pseudo" construtions that represent the top of walls
  • grab_token_string_pos: new MiscUtils function, used for parsing tokens
  • Items: add item melting logic canMelt(item), markForMelting(item), and cancelMelting(item)
  • Persistence:
    • persistent keys are now namespaced by an entity_id (e.g. a player fort site ID)
    • data is now stored one file per entity ID (plus one for the global world) in the DF savegame directory
  • random_index, vector_get_random: new MiscUtils functions, for getting a random entry in a vector
  • Units.isDanger: now returns true for agitated wildlife
  • World:
    • GetCurrentSiteId() returns the loaded fort site ID (or -1 if no site is loaded)
    • IsSiteLoaded() check to detect if a site (e.g. a player fort) is active (as opposed to the world or a map)
    • AddPersistentData and related functions replaced with AddPersistentSiteData and AddPersistentWorldData equivalents

Lua

  • dfhack.capitalizeStringWords: new function, returns string with all words capitalized
  • dfhack.isSiteLoaded: returns whether a site (e.g. a player fort) is loaded
  • dfhack.items: access to canMelt(item), markForMelting(item), and cancelMelting(item) from Items module
  • dfhack.persistent: new, table-driven API for easier world- and site-associated persistent storage. See the Lua API docs for details.
  • dfhack.world.getCurrentSite: returns the df.world_site instance of the currently loaded fort
  • widgets.Divider: linear divider to split an existing frame; configurable T-junction edges and frame style matching

Structures

  • alert_button_announcement_id: now int32_t vector (contains report ids)
  • announcement_alertst: defined
  • announcement_alert_type: enum defined
  • announcement_type: added alert_type enum attribute
  • feature_init_flags: more enum values defined
  • markup_text_boxst: updated based on information from Bay12
  • markup_text_linkst, markup_text_wordst, script_environmentst: defined
  • occupation: realigned
  • plotinfost: unk23c8_flags renamed to flags, updated based on information from Bay12
  • service_orderst: type defined
  • service_order_type: enum defined
  • soundst: defined
  • viewscreen_choose_start_sitest: fix structure of warning flags -- convert series of bools to a proper bitmask
  • world_raws: unk_v50_1, unk_v50_2, unk_v50_3 renamed to text_set, music, sound

Documentation

  • DFHack developer's guide updated, with refreshed architectural-diagrams
  • UTF-8 text in tool docs is now properly displayed in-game in gui/launcher (assuming that it can be converted to cp-437)
  • installing: Add installation instructions for wineskin on Mac
  • modding-guide: Add examples for script-only and blueprint-only mods that you can upload to DF's Steam Workshop

Don't miss a new dfhack release

NewReleases is sending notifications on new releases.