1. DFHack - Dwarf Fortress Modding Engine
  2. News

DFHack - Dwarf Fortress Modding Engine News

DFHack 51.07-r1

[h3]Q: How do I download DFHack?[/h3]
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.

If you are on the Steam DF experimental branch, please also switch DFHack to its experimental branch in your Steam client.

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]Adventure mode support for gui/journal[/h3]
Now you can keep an in-game journal of your adventures! Run gui/journal and you'll get a per-adventurer journal to write in. It is saved with your adventures, and if you retire and later unretire that same adventurer, their journal will still be with them.
[h3]Follow your dwarves like a pro, or watch them like a fish tank[/h3]
The spectate tool has had a complete overhaul, and is now integrated into the vanilla follow mode. There are lots of ways you can interact with it.

If you start following a dwarf by clicking on the vanilla "camera" button, you'll see that the little panel that shows up in the lower left corner has a few more widgets on it. You can hit the right arrow key (or click on the icon) to follow another target, or you can hit the left arrow key (or click on the icon) to follow the previous target. This means you can quickly switch to a new dwarf and then back to a previous dwarf just by tapping the arrow keys.



There is also an indicator for whether "spectate mode" is on. If you turn it on, you can let the game run and spectate will periodically shift the camera to follow a different dwarf. If you've managed to get your fort into a stable state, this is a good way to sit back, relax, and watch your dwarves like a fish tank.



How does it choose the next dwarf to follow? It's random, but you can tweak how it chooses targets with the new gui/spectate interface. You can launch it by clicking on the gear icon on the follow panel, where the new left and right arrow widgets are. You can choose which kinds of units other than your own dwarves to include as possible targets, like livestock, enemies, or visitors. By default, the camera will prefer to follow units that are in combat and units that have newly arrived on the map.



If spectate mode is enabled and the new "cinematic action" option is on, the camera will even switch targets more quickly when there is combat afoot! If the "Auto unpause" option is on, events that would normally pause the game, like sieges or artifact announcements, will not pause the game at all. This allows a "true" fish tank mode where you can see your beautiful fort rise and fall of its own accord.

Spectate mode will automatically disengage when you jump in to take control. It switches off when you move the camera: the exact same way that vanilla follow mode switches off. Spectate mode will also disengage when you open the squads panel.

We've also made it easier to jump to following a specific target. There is a new global hotkey: Ctrl-g (for "go to"). It is available when you are on the main dwarf map (or the main adventure map, but "follow" mode isn't relevant there).



Ctrl-g will pop up the gui/sitemap interface. You can start typing to search for a name, and Shift-click or Shift-Enter will start following that unit directly!



But wait, there's more!

You can also use gui/spectate to configure live tooltips for your dwarves. If you turn on the spectate.tooltips overlay, you can display information like their name, their current happiness level, and their current job. The "Follow" set of toggles controls what information will follow your dwarves around on the map in floating tooltips. The "Hover" set of toggles controls what information will be shown in a pop up when you hover your mouse over a unit.



Give it a try! My favorite configuration so far is:
  • "Follow" shows an indicator for miserable and unhappy dwarves
  • "Hover" shows the current stress level, name, and job

In graphics mode, you might prefer to set the blink period to 0 (to disable it), but in ascii mode, you'll want the "follow" tooltips to blink periodically so you can see what they are covering on the map.


[h3]Skip adventure messages[/h3]
The new advtools.fastcombat overlay allows you to skip combat animations and the announcement "More" button. If you're trying to walk through a populated area, this can be a huge time (and click) saver! Have you heard the one about the elf and the elf? Yes, we have! Let us walk across the room!



Now, to skip all the "More" messages, just hit any movement key. The first movement key will skip the messages to the end of the list. Hit the key again to move. It works the same with the mouse. The first click on the map will skip all messages to the end, and the second click will start your adventurer walking to that destination.
[h3]Attach notes to the map[/h3]
We now have a tool for attaching notes to fort map tiles! gui/notes is the UI for adding and managing map notes. You can memorialize events where they occurred



or leave design plans for yourself on the levels where you plan to expand your fort.


[h3]Schedule cheese making according to milk supplies[/h3]
Cheese making is difficult to automate using work orders. A single job can consume anything from a bucket with a single unit of milk to a barrel with 100 units of milk. This makes it hard to predict how much cheese will actually be produced by a regular manager work order.

If you enable autocheese in the DFHack control panel, it will scan your fort for barrels with a certain minimum amount of milk (default: 50), create a cheese making job specifically for that barrel, and assign this job to one of your idle dwarves (giving preference to skilled cheese makers).



Easy cheesy!
[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]
  • autocheese: automatically make cheese using barrels that have accumulated sufficient milk
  • devel/export-map: export map tile data to a JSON file
  • gui/notes: UI for adding and managing notes attached to tiles on the map
  • gui/spectate: interactive UI for configuring spectate
  • launch: (reinstated) new adventurer fighting move: thrash your enemies with a flying suplex
  • putontable: (reinstated) make an item appear on a table
[h2]New Features[/h2]
  • advtools: advtools.fastcombat overlay (enabled by default) allows you to skip combat animations and the announcement "More" button by mashing the movement keys
  • emigration: nobles command for sending freeloader barons back to the sites that they rule over
  • gui/journal: now working in adventure mode -- journal is per-adventurer, so if you unretire an adventurer, you get the same journal
  • gui/sitemap: is now the official "go to" tool. new global hotkey for fort and adventure mode: Ctrl-G
  • spectate:
    • can now specify number of seconds (in real time) before switching to follow a new unit
    • new "cinematic-action" mode that dynamically speeds up perspective switches based on intensity of conflict
    • new global keybinding for toggling spectate mode: Ctrl-Shift-S
    • new overlay panel that allows you to cycle through following next/previous units (regardless of whether spectate mode is enabled)
  • stonesense: stonesense now offsets the view when you are following a unit in DF, to better center the camera on the unit in stonesense
  • toggle-kbd-cursor: support adventure mode (Alt-k keybinding now toggles Look mode)
[h2]Fixes[/h2]
  • Windows console: fix possible hang if the console returns a too-small window width (for any reason)
  • changevein: fix a crash that could occur when attempting to change a vein into itself
  • createitem: produced items will now end up at the look cursor position (if it is active)
  • gui/liquids:
    • don't add liquids to wall tiles
    • using the remove tool with magma selected will no longer create unexpected unpathable tiles
  • hfs-pit: use correct wall types when making pits with walls
  • idle-crafting: do not assign crafting jobs to nobles holding meetings (avoids dangling jobs)
  • overlay: reset draw context between rendering widgets so context changes can't propagate from widget to widget
  • rejuvenate:
    • update unit portrait and sprite when aging up babies and children
    • recalculate labor assignments for unit when aging up babies and children (so they can start accepting jobs)
  • spectate: don't allow temporarily modified announcement settings to be written to disk when "auto-unpause" mode is enabled
  • stonesense:
    • megashots no longer leave stonesense unresponsive
    • items now properly render on top of stockpile indicators
    • minecarts and wheelbarrows are now shown on the correct layer
  • suspendmanager: in ASCII mode, building planning mode overlay now only displays when viewing the default map, reducing issues with showing through the UI
[h2]Misc Improvements[/h2]
  • autobutcher: treat animals on restraints as unavailable for slaughter
  • colonies: support adventure mode
  • devel/query: support adventure mode
  • devel/tree-info: support adventure mode
  • gui/confirm: in the delete manager order confirmation dialog, show a description of which order you have selected to delete
  • gui/create-item: now accepts a pos argument of where to spawn items
  • gui/design: only display vanilla dimensions tooltip if the DFHack dimensions tooltip is disabled
  • gui/notify:
    • moody dwarf notification turns red when they can't reach workshop or items
    • save reminder now appears in adventure mode
    • save reminder changes color to yellow at 30 minutes and to orange at 60 minutes
  • gui/sitemap: shift click to start following the selected unit or artifact
  • hfs-pit:
    • improve placement of stairs w/r/t eerie pits and ramp tops
    • support adventure mode
  • hide-tutorials:
    • handle tutorial popups for adventure mode
    • new reset command that will re-enable popups in the current game (in case you hid them all and now want them back)
  • modtools/create-item: exported hackWish function now supports opts.pos for determining spawn location
  • position:
    • add adventurer tile position
    • add global site position
    • when a tile is selected, display relevant map block and intra-block offset
    • report position of the adventure mode look cursor, if active
  • prioritize:
    • when prioritizing jobs of a specified type, also output how many of those jobs were already prioritized before you ran the command
    • don't include already-prioritized jobs in the output of prioritize -j
  • quickfort: redesigned library/aquifer_tap.cav to improve the water fill rate
  • spectate: player-set configuration is now stored globally instead of per-fort
  • stockpiles: add property filters for brewable, millable, and processable (e.g. at a Farmer's workshop) organic materials
  • stonesense: different types of dig-mode designations (normal, autodig, and the blueprint variants of both) now have distinct colors that more closely match the vanilla DF interface
[h2]Documentation[/h2]
  • stonesense-art-guide: guide for making sprite art for Stonesense
[h2]Removed[/h2]
  • orders: MakeCheese job removed from library/basic orders set. Please use autocheese instead!
  • stonesense: removed the "follow DF cursor" tracking mode since the keyboard cursor is no longer commonly used for moving the map around
[h2]API[/h2]
  • Buildings :: checkFreeTiles: now takes a building instead of a pointer to the building extents
  • Items :: getItemBaseValue: adjust to the reduced value of prepared meals (changed in DF 51.06)
  • Items :: getValue: magical powers now correctly contribute to item value
  • Military :: removeFromSquad: removes unit from any squad assignments
  • Units :: isUnitInBox, Units :: getUnitsInBox: don't include inactive units
[h2]Lua[/h2]
  • dfhack.buildings.checkFreeTiles: now takes a building pointer instead of an extents parameter
  • dfhack.military.removeFromSquad: Lua API for Military :: removeFromSquad
  • dfhack.units.setAutomaticProfessions: sets unit labors according to current work detail settings
  • gui.dwarfmode: adventure mode cursor now supported in getCursorPos, setCursorPos, and clearCursorPos funcitons
  • overlay.isOverlayEnabled: new API for querying whether a given overlay is enabled
  • overlay: widgets can now declare overlay_onenable and overlay_ondisable functions to hook enable/disable
[h2]Structures[/h2]
  • create numerous new structures whose contents had previously been missing or inlined into other structures
  • fix a variety of structure errors
  • merged several duplicate structure/enum types
  • promote all bay12 structures, enums, and bitfields to top-level types: this means that most T_* types now have top-level names
  • reorganize all structure definitions to match bay12 header layouts
  • specific changes:
    • Building vmethod countHospitalSupplies now returns abstract_building_contents instead of hospital_supplies, which has different field names
    • When indexing into a vector named scribejobs, replace item_id and written_content_id with target_id and relevant_id
    • conversation_state_type.DenyPermissionSleep is now SleepPermissionRequested
    • block_square_event_spoorst.[whatever] is now block_square_event_spoorst.info.[whatever]
    • building_stockpilest.max_*/container_* is now building_stockpilest.storage.max_*/container_*
    • building_civzonest.zone_settings.pen is now building_civzonest.zone_settings.pen.flags
    • building_civzonest.zone_settings.tomb is now building_civzonest.zone_settings.tomb.flags
    • building_bridgest.gate_flags.closed/closing/opening are now raised/raising/lowering
    • building_weaponst.gate_flags.closed/closing/opening are now retracted/retracting/unretracting
    • building.design.builder1/builder1_civ/builder2 are now .worker/worker_create_event/curworker (and the 2nd is a History Event, not an Entity)
    • stockpile_settings.allow_organic/allow_inorganic are now stockpile_settings.misc.allow_organic/allow_inorganic
    • world.busy_buildings[] is now world.building_uses.buildings[]
    • world.coin_batches is now world.coin_batches.all
    • spatter.flags.water_soluble is now external
    • creation_zone_pwg_alteration_campst.tent_matlgoss is now .tent_matgloss (spelling fix)
    • world.raws.body_templates and world.raws.bodyglosses are now world.raws.creaturebody.*
    • world.raws.tissue_templates/body_detail_plans/creature_variations are now world.raws.*.all
    • material_force_adjustst.mat_indx is now mat_index (spelling fix)
    • game.minimap.minimap[x][y] is now game.minimap.minimap[x][y].tile
    • historical_entity.relations.diplomacy[] is now historical_entity.relations.diplomacy.state[]
    • historical_entity.conquered_site_group_flags is now historical_entity.law.conquered_site_group_flags
    • world.effects is now world.effects.all
    • world.raws.entities is now world.raws.entities.all
    • site_type enum deleted, merged with world_site_type
    • world.event.dirty_waters[].* is now world.event.dirty_waters[].pos.*
    • death_condition_type enum replaced with histfig_body_state (notably in state_profilest.body_state)
    • history_hit_item, history_event_reason_info, and history_event_circumstance_info removed and substituted
    • knowledge_profilest.known_locations.ab_review[] is now .reports[] (because .known_locations got merged with site_reputation_info)
    • world.raws.interactions[] is now world.raws.interactions.all[]
    • itemdef_instrumentst.registers/timbre are now itemdef_instrumentst.timbre.registers/timbre
    • dye_info removed and substituted
    • job_art_specification removed and substituted
    • entity_activity_statistics.discovered_(creature_foods/creatures/plant_foods/plants) is now entity_activity_statistics.knowledge.*
    • world.mandates[] is now world.mandates.all[]
    • creature_interaction_effect.counter_trigger.required is now creature_interaction_effect.counter_trigger.flag.bits.REQUIRED
    • creature_interaction_effect_target removed and substituted
    • material_common removed, its contents prepended to material and material_template
    • world.raws.material_templates is now world.raws.material_templates.all
    • world.raws.syndromes is now world.raws.mat_table.syndromes
    • world.raws.effects is now world.raws.mat_table.effects
    • world.raws.inorganics is now world.raws.inorganics.all
    • world.raws.inorganics_subset is now world.raws.inorganics.cheap
    • plotinfo.main.selected_hotkey/in_rename_hotkey are now plotinfo.main.hotkey_interface.*
    • world.proj_list is now world.projectiles.all
    • general_ref_building_well_tag.direction is now a bitfield
    • world_region_details.edges.(split_x/split_y)[][].x/y are now .break_one/break_two
    • world_population_ref.depth is now world_population_ref.layer_depth and is now an integer instead of an enum
    • Bitfield region_weather_flag is now region_weather_bits (to avoid conflicts)
    • Rhythm beat_flag realigned (PrimaryAccent removed, because it wasn't really a unique flag)
    • dipscript_info.script_steps/script_vars are now dipscript_info.script.steps/vars
    • script_step_discussst.event is now script_step_discussst.duration
    • script_step_dipeventst and script_step_invasionst fields renamed
    • site_architecture_changest.spec_flag is now a tagged union
    • squad.schedule[x][y] is now squad.schedule.routine[x].month[y]
    • world.unit_chunks is now world.unit_chunks.all
    • historical_entity.events[] is now historical_entity.rumor_info.events
    • world.enemy_status_cache.rel_map[x][y] is now world.enemy_status_cache.rel_map[x][y].ur
    • unit.curse.interaction_id/interaction_time/interaction_delay/time_on_site/own_interaction/own_interaction_delay are now unit.curse.interaction.*
    • unit.cached_glowtile_type is now unit.cache.cached_glowtile_type
    • unit_preference.active is now unit_preference.flags.visible
    • witness_report_flags replaced with correct flags
    • caste_body_info.clothing_items.[] is now caste_body_info.clothing_items.bp[]
    • plant_tree_tile.branches_dir enum collapsed into 4 simple flags
    • world.populations is now world.populations.all
    • world_data.constructions.map[x][y][N] is now world_data.constructions.map[x][y].square[N]
    • world.family_info[] is now world.family_info.family[]
    • world.fake_world_info[] is now world.fake_world_info.language[]
    • world.selected_direction is now world.selected_direction[0] (and there are 3 additional entries)

DFHack 51.06-r2rc1 (beta)

This is a beta release. To install, select the beta branch for DFHack in your Steam client.

If you are on the Steam DF experimental branch, please select the experimental branch for DFHack in your Steam client.

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]Follow your dwarves like a pro, or watch them like a fish tank[/h3]
The spectate tool has had a complete overhaul, and is now integrated into the vanilla follow mode. There are lots of ways you can interact with it.

If you start following a dwarf by clicking on the vanilla "camera" button, you'll see that the little panel that shows up in the lower left corner has a few more widgets on it. You can hit the right arrow key (or click on the icon) to follow another target, or you can hit the left arrow key (or click on the icon) to follow the previous target. This means you can quickly switch to a new dwarf and then back to a previous dwarf just by tapping the arrow keys.



There is also an indicator for whether "spectate mode" is on. If you turn it on, you can let the game run and spectate will periodically shift the camera to follow a different dwarf. If you've managed to get your fort into a stable state, this is a good way to sit back, relax, and watch your dwarves like a fish tank.



How does it choose the next dwarf to follow? It's random, but you can tweak how it chooses targets with the new gui/spectate interface. You can launch it by clicking on the gear icon on the follow panel, where the new left and right arrow widgets are. You can choose which kinds of units other than your own dwarves to include as possible targets, like livestock, enemies, or visitors. By default, the camera will prefer to follow units that are in combat and units that have newly arrived on the map.



If spectate mode is enabled and the new "cinematic action" option is on, the camera will even switch targets more quickly when there is combat afoot! If the "Auto unpause" option is on, events that would normally pause the game, like sieges or artifact announcements, will not pause the game at all. This allows a "true" fish tank mode where you can see your beautiful fort rise and fall of its own accord.

Spectate mode will automatically disengage when you jump in to take control. It switches off when you move the camera: the exact same way that vanilla follow mode switches off. Spectate mode will also disengage when you open the squads panel.

We've also made it easier to jump to following a specific target. There is a new global hotkey: Ctrl-g (for "go to"). It is available when you are on the main dwarf map (or the main adventure map, but "follow" mode isn't relevant there).



Ctrl-g will pop up the gui/sitemap interface. You can start typing to search for a name, and Shift-click or Shift-Enter will start following that unit directly!



But wait, there's more!

You can also use gui/spectate to configure live tooltips for your dwarves. If you turn on the spectate.tooltips overlay, you can display information like their name, their current happiness level, and their current job. The "Follow" set of toggles controls what information will follow your dwarves around on the map in floating tooltips. The "Hover" set of toggles controls what information will be shown in a pop up when you hover your mouse over a unit.



Give it a try! My favorite configuration so far is:
  • "Follow" shows an indicator for miserable and unhappy dwarves
  • "Hover" shows the current stress level, name, and job

In graphics mode, you might prefer to set the blink period to 0 (to disable it), but in ascii mode, you'll want the "follow" tooltips to blink periodically so you can see what they are covering on the map.


[h3]Skip adventure messages[/h3]
The new advtools.fastcombat overlay allows you to skip combat animations and the announcement "More" button. If you're trying to walk through a populated area, this can be a huge time (and click) saver! Have you heard the one about the elf and the elf? Yes, we have! Let us walk across the room!



Now, to skip all the "More" messages, just hit any movement key. The first movement key will skip the messages to the end of the list. Hit the key again to move. It works the same with the mouse. The first click on the map will skip all messages to the end, and the second click will start your adventurer walking to that destination.
[h3]Attach notes to the map[/h3]
We now have a tool for attaching notes to fort map tiles! gui/notes is the UI for adding and managing map notes. You can memorialize events where they occurred



or leave design plans for yourself on the levels where you plan to expand your fort.


[h3]Schedule cheese making according to milk supplies[/h3]
Cheese making is difficult to automate using work orders. A single job can consume anything from a bucket with a single unit of milk to a barrel with 100 units of milk. This makes it hard to predict how much cheese will actually be produced by a regular manager work order.

If you enable autocheese in the DFHack control panel, it will scan your fort for barrels with a certain minimum amount of milk (default: 50), create a cheese making job specifically for that barrel, and assign this job to one of your idle dwarves (giving preference to skilled cheese makers).



Easy cheesy!
[h2]Announcements[/h2][h3]So why is this a beta?[/h3]
In addition to the new features (which we always need feedback on!), DFHack has undergone an extensive internal reorganization to help align the code closer to how the internal DF structures are organized. For scripts, many of the df namespace paths have changed. If you are maintaining an out-of-tree script, find out what identifiers have changed in the Structures release notes on Github: https://github.com/DFHack/dfhack/releases/tag/51.06-r2rc1

As a player, please keep an eye out for commands that return errors when you run them or functionality that appears not to work like it used to. It is possible that typos have crept in with all the updates.
[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
For full details, please see https://github.com/DFHack/dfhack/releases/tag/51.06-r2rc1

DFHack 51.06-r1

Compatibility update for DF 51.06

DFHack 51.05-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]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

This is a compatibility release for DF 51.05 and has no new features since DFHack 51.04-r1.1.

DFHack 51.04-r1.1

This release is compatible with all distributions of Dwarf Fortress: Steam, Itch, and Classic.

Currently, each distribution channel of DF has a different version. This release of DFHack is specifically compatible with:
  • Dwarf Fortress 51.04 on Steam
  • Dwarf Fortress 51.03 on Itch
  • Dwarf Fortress 51.02 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!
Changelog
[h2]New Features[/h2]
  • stonesense:
    • added option EXTRUDE_TILES to slightly expand sprite to avoid gaps (on by default)
    • added option PIXELPERFECT_ZOOM to change the zoom scale to avoid gaps (off by default)
    • added back minecart track graphics
[h2]Fixes[/h2]
  • Ctrl-a hotkeys have been changed to something else (Ctrl-n) for tools that also have an editable text field, where Ctrl-a is interpreted as select all text
  • advtools: fix dfhack-added conversation options not appearing in the ask whereabouts conversation tree
  • gui/launcher:
    • ensure commandline is fully visible when searching through history and switching from a very long command to a short command
    • flatten text when pasting multi-line text from the clipboard
  • gui/rename: fix error when changing the language of a unit's name
  • stonesense:
    • fixed announcement text rendering off-screen with larger font sizes
    • screen dimensions are now properly set when overriden by a window manager
    • fixed glass cabinets and bookcases being misaligned by 1 pixel
    • fixed unrevealed walls being hidden by default
    • vampires no longer show their true name when they shouldn't
    • fixed debug performance timers to show milliseconds as intended
    • CACHE_IMAGES now disables mipmapping, stopping sprites from going transparent
    • fixed issue where depth borders wouldn't be rendered for some walls
    • fixed issue where tiles near the bottom edge would be culled
[h2]Misc Improvements[/h2]
  • assign-preferences: new --show option to display the preferences of the selected unit
  • pref-adjust: new show command to display the preferences of the selected unit
  • stonesense:
    • improved the way altars look
    • fog no longer unnecessarily renders to a separate bitmap
    • added new connective tiles for pools of blood and vomit
[h2]Removed[/h2]
  • gui/control-panel: removed craft-age-wear tweak for Windows users; the tweak doesn't currently load on Windows
[h2]API[/h2]
  • Core :: getUnpausedMs: new API for getting unpaused ms since load in a fort-mode game