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
QoL features, Bug fixes, Technical updates
QoL features
This update features many QoL features:
- For those of you with hundreds or even thousands of manager orders, we added a tool to make it a bit easier to find the one you're looking for
- We added a filter to exclude (or, if you really want, include) dwarves with "uniformed" civilian roles in the squad selection menu filters
- We added a utility to automatically clear certain categories of announcements (like sparring) from the announcement buffer so that the announcements you actually care about won't be crowded out
- We added a button to show a unit's death cause to the dead/missing units tab
- You can now assign names or labels to "quick commands"
- You can now edit pressure plate settings
Bug fixes
We also fixed a few bugs:
- The prioritize overlay will no longer inappropriately appear when following a unit
- The "missing nemesis record" notifier has been adjusted to be a bit more selective in how it reports issues
- The rename tool is now slightly more conscientious in validating its inputs
Technical updates
There are also some technical features with this update:
- For scripters/modders, we added a library function to place spatters
- We added "original-name" attributes to virtually every DF structure whose name didn't match the Bay12 name, which facilitates reverse-engineering as well as communications with Bay12. This process also fixed a handful of typos or other errors, which may require some third-party scripts to be adjusted to reflect. A list of specific changes appears in the changelog, below
- DFHack now validates vtable pointers before using them. This will prevent DFHack from crashing when some DF data structure contains bad data. Of course, when this happens DF will probably crash sooner or later, but at least it won't be DFHack's fault...
Announcements
Issues with Steam Client Beta, PSAs
Issues with Steam Client Beta
The beta of the Steam client alters the way Steam applications are deployed in a way that impacts DFHack, and we have had reports of DFHack not working as expected for people who are using the Steam beta client. We are aware of this issue, have a plan to mitigate it in development, and hope to have a solution in place before the change Steam is making makes it to the release client.
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
gui/logcleaner: graphical overlay for configuring the logcleaner plugin with enable and filter toggles.logcleaner: New plugin for time-triggered clearing of combat, sparring, and hunting reports with configurable filtering and overlay UI.
New Features
orders: added search overlay to find and navigate to matching manager orders with arrow indicatorssort:- added
Uniformedfilter to squad assignment screen to filter dwarves with mining, woodcutting, or hunting labors - Add death cause button to dead/missing tab in the creatures screen
- added
trackstop: can now modify pressure plates; permits minecart and creature triggers to be set beyond normal sensitivity
Fixes
gui/rename: added check for entity_id input in get_target function
Misc Improvements
- Core: DFHack now validates vtable pointers in objects read from memory and will throw an exception instead of crashing when an invalid vtable pointer is encountered. This makes it easier to identify which DF data structure contains corrupted data when this manifests in the form of a bad vtable pointer, and shifts blame for such crashes from DFHack to DF.
gui/notify: reduced severity of the missing nemesis records warning if no units on the map are affected. clarified wording.
API
- Added
Items::pickGrowthPrint: given a plant material and a growth index, returns the print variant corresponding to the current in-game time. - Added
Items::useStandardMaterial: given an item type, returns true if the item is made of a specific material and false if it has a race and caste instead. - Added
Maps::addItemSpatter: add a spatter of the specified item + material + growth print to the indicated tile, returning whatever amount wouldn't fit in the tile. - Added
Maps::addMaterialSpatter: add a spatter of the specified material + state to the indicated tile, returning whatever amount wouldn't fit in the tile.
Lua
- Added
Maps::addItemSpatterasdfhack.maps.addItemSpatter. - Added
Maps::addMaterialSpatterasdfhack.maps.addMaterialSpatter.
Structures
- added
original-nameattributes to all relevant objects - fixed numerous structure errors
- specific changes:
- added NONE entries to many enum types (may affect C++ code using switch() statements): abstract_building_reputation_type, adopt_region_stage_type, artifact_claim_type, block_square_event_type, building_profile_acquisition_method, civzone_type, dance_form_context, dance_form_group_size, dance_form_move_type, divination_outcome_type, dungeon_type, dungeon_wrestle_type, embark_finder_option, environment_type, era_type, flow_type, genetic_modifier_type, hf_artifact_action_type, history_event_collection_type, incident_artifact_location_type, incident_type, incident_written_content_location_type, insurrection_outcome, interaction_flags, interaction_source_type, intrigue_corruption_method_type, inventory_profile_skill_type, inv_item_role_type, journey_type, language_name_category, language_name_component, language_word_table_index, load_game_stage_type, main_choice_type, misc_trait_type, musical_form_melody_frequency, musical_form_melody_style, musical_form_purpose, occasion_schedule_feature, occasion_schedule_type, occupation_type, personality_preference_type, plant_material_def, poetic_form_persona_type, poetic_form_persona_type, prepare_rod_stage_type, projectile_type, region_weather_type, report_zoom_type, resource_allotment_specifier_type, save_substage, scale_construction_type, scale_naming_type, scale_type, secretion_condition, simple_action_type, site_dispute_type, squad_order_cannot_reason, squad_order_type, tactical_situation, talk_choice_type, theft_method_type, timbre_type, travel_log_itinerary_type, workquota_frequency_type, world_construction_type, wrestle_attack_type
- assigned explicit "UNUSED" names to anonymous enum/bitfield members which are unused
- expanded
builtin_matsto include 640 new elements for CREATURE_1-200, HIST_FIG_1-200, PLANT_1-200, and UNUSED01-40 - assigned proper placeholder names to
interface_keysection labels - promoted several inline-defined types to top-level (intrigue_corruption_flag, job_posting_flag, unitproperyplacementst)
plant_raw.stockpile_growth_flagsnow usesras_crop_flag- added
entity_raw_flagselement "SIEGE_SKILLED_MINERS" - added
stockpile_categoryelement "ALL" - fixed structure layouts for
adventure_interface_companionsst,caste_raw,entity_position_assignment,message_order_to_perform_actionst, andworkshop_graphics_infost - renamed
army_controller_goal_infiltrate_societystfield "agoal_ab_id" to "goal_ab_id" - renamed
creature_graphics_layerfield "dye_color_iuse_palette_rowndex" to "use_palette_row" - renamed
entity_raw_flagsenum member "MISSING_UNDERWORLD_DISASTERS" to "MINING_UNDERWORLD_DISASTERS" - assigned proper names to
hf_religious_datast.anon_1,pet_profilest.anon_1, andunit_vision_arcst.anon_1 - renamed
historical_entityfield "unkarmy_reeling_defense" to "army_reeling_defense" - renamed
history_event_hf_learns_secretstfield "interaction_effect" to "interaction_source" - renamed
item_craft_graphics_flagfield "size" to "material" - renamed
lookinfo_spatterstfield "extend" to "extent" - renamed
personality_ethicstfield "reponse" to "response" - renamed
personality_facet_typeenum member "PERSEVERENCE" to "PERSEVERANCE" - renamed
value_typeenum member "PERSEVERENCE" to "PERSEVERANCE" - renamed
poetic_form_actionenum member "MakeConsession" to "MakeConcession" - renamed
simple_action_typeenum member "performe_horrible_experiments" to "performed_horrible_experiments" - renamed
stair_graphics_flag_materialenum member "FOZEN" to "FROZEN" - renamed
timbre_typeenum member "PURE_" to "PURE" - renamed
tissue_style_typeenum member "PONY_TAILS" to "PONY_TAIL" - renamed
unitfield "job.siege_boulder" to "job.siege_builder" - renamed
unitfield "pool_index" to "pool_id" - renamed
viewscreen_choose_start_sitestfield "def_candidate_nearst" to "def_candidate_near_st" - changed
caste_raw.extracts.blood_stateandcaste_raw.extracts.pus_stateto use thematter_stateenum - changed
d_init.display.track_tile_invertandd_init.display.track_ramp_invertto use a bitfield - changed
interrogation_resultst.relationship_factorto use a new enum type (which DF itself actually isn't using yet due to a bug) - changed
intrigue_perspectivest.potential_corrupt_circumstance_target[]to containcircumstance_idunions instead of plain integers - changed
world.buildings.other.WINDOW_ANYto specify the correct element type - changed
world.items.other.BAG,world.items.other.BOLT_THROWER_PARTS,world.items.other.ANY_DRINK,world.items.other.ANY_CRITTER, andworld.items.other.FOOD_STORAGEto specify the correct element types - changed
game.main_interface.last_displayed_hover_instto use themain_hover_instructionenum - changed
world.raws.music.all[N].m_event[]andworld.raws.music.all[N].context[]to hold enums - changed
widget_job_details_button.jbto correctly point at ajobinstead of a generic pointer - changed
world.worldgen_status.rejection_reasonto use themap_reject_typeenum - changed
world.history.first_[research]_flag[N]to use the variousknowledge_scholar_flags_Nbitfields - changed the
history_eventvmethodsgetSentenceandgetPhraseto add 2 new boolean arguments (to which the game always passes "true, false") - changed the
interaction_targetvmethodaffects_unitfirst parameter from an integer to a unit pointer - changed the
itemvmethodgetGloveHandednessreturn type from int8_t to uint32_t - changed the
itemvmethodgetAmmoTypeto take no parameters and to return anstd::stringby value - changed the
itemvmethodgetDyeAmountto take an integer parameter - changed the
unitvmethodgetCreatureTileto take a boolean parameter - add
ref-targetattributes to various fields that were missing them, for use bygui/gm-editorand similar tools - changed
caste_raw.extracts.vermin_bite_chancetovermin_bite_stateand changed its type tomatter_state - changed
ci_personal_reputation_profilestfieldentity_idtocultural_identity(now referring to acultural_identity) - changed
cultural_identity.events[]tocultural_identity.rumor_info.events[] - changed
dance_formfieldentitytoevent(now referring to at ahistory_event) - changed
dance_form_sectionfieldacts_out_civtoacts_out_event(now referring to ahistory_event) - changed
entity_burial_requestfieldcivtohfid(now referring to ahistorical_figure) - changed
entity_pop_specifierstfieldsquad_idtosquad_enid(now referring to ahistorical_entity) - changed
gps.color[x][y]togps.default_palette.color[x*16+y] - changed
history_event_modified_buildingstfieldmodificationto use a different bitfieldabstract_building_tower_flag - changed
itemdef_ammost,itemdef_siegeammost,itemdef_toolst,itemdef_trapcompst, anditemdef_weaponstfields "texpos" (and "texpos2") into longer lists of specific fields - changed
knowledge_profilest.known_events[]toknowledge_profilest.rumor_info.events[] - changed
relationship_event_supplementinteger fieldoccasion_typetocircumstanceof typeunit_thought_type(an enum) - changed
relationship_event_supplementinteger fieldsitetocircumstance_idfield of typecircumstance_id(a union) - changed
relationship_event_supplementfieldprofessiontoreason_idfield of typehistory_event_reason_id - changed
scholar_knowledge.knowledge_goalbitfield to a union of allknowledge_scholar_flags_Nbitfields (selected by the value ofscholar_knowledge.research_prject) - changed
unit.enemy.rumor[]tounit.enemy.rumor_info.events[]