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
Compatibility with Dwarf Fortress 53.13, Structures review, Other bug fixes and improvements
Compatibility with Dwarf Fortress 53.13
The main focus of this release is to add compatibility with Dwarf Fortress 53.13.
Structures review
A fairly significant review and update of DFHack's view of DF data structures is incorporated in this release. This should have little impact on regular players but may affect those who write DFHack scripts. See the changelog for more details.
Other bug fixes and improvements
A minor bug that occasionally affected autotrain has been fixed, some documentation was slightly improved, and a few APIs were made more useful.
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
Documentation
- updated documentation for
autofarmfor more clarity
API
- add flexible casting to
enum_fieldto enable explicit casting to more types - Handle units without current soul in
Units::getFocusPenalty
Structures
- added some missing enums and bitfields
- assigned proper bitfield data type on
agreement_details_data_plot_infiltration_coup.flags - changed various fields to make use of existing enums and bitfields
- ensured that
original-namealways appears afternameortype-name, never before - filled in missing
original-nameattributes - fixed assorted typos in
original-nameattributes - fixed base types of
creature_sound_type,creature_sound_method_type, andart_image_property_verb - fixed several enums
- fixed several structure field type errors
- fixed several typos in
original-nameattributes - fixed various fields to use correct signedness
- fixed various fields to use
int8_torboolas appropriate - merged
item_statue_graphics_typebitfield intoitem_statue_graphics_flag - other changes:
- added name to field
cgl_itemst.item_type inclusion_typenow has 16-bit base type (though nothing relies on it)- renamed
adventure_interface_attackst.scrselected_item_idoll_position_wrestletoselected_item_id
- added name to field
- specific changes:
- fixed
building_constructionst.typeto be 32-bit, along with theconstruction_typeenum - fixed
contextst.interrogator_relationshipsto be a pointer toevidence_repositoryst - fixed
actor_entryst.associated_orgto contain pointers toorganization_entryst - fixed
justice_interfacest.interrogation_reportto contain pointers tointerrogation_report - fixed
main_interface_settings.memberto contain shared pointers toworld_gen_param_valuest - fixed
squad_equipment_interfacest.am_cand_subtypeto containint16_t - fixed
startup_charactersheet_petst.raceto beint32_t - fixed
lookinfo_verminst.casteto beint16_t - fixed
intrigue_corruption.facet_ratingto beint16_t - fixed
historical_entity.current_wgwgto be a direct pointer - fixed
historical_figure.worldgen_relationshipsto be a direct pointer - fixed
pmd_tree_texture_infost.texpos_tree_wood_tileto use correct array length (sized against the correct enum) - fixed
build_square_typeenum to add missing elementOUTSIDE - swapped
main_hover_instructionelementsADVENTURE_MOVE_DOWN_RAMP_EandADVENTURE_MOVE_DOWN_RAMP_W viewscreen_titlest.modenow uses new enumtitle_mode_typeviewscreen_worldst.squad_flagnow uses new bitfieldcivlist_squad_flagviewscreen_worldst.messenger_flagnow uses new bitfieldcivlist_messenger_flag- fixed
historical_entity.resources.art_image_typesto use newentity_art_image_typeenum adventure_movement_movest.aim_attack_flagnow usesaim_attack_flagbitfieldadventure_movement_mountst.riderpositionnow usesrider_positions_typeenumadventure_constructionst.building_jobitemflagnow usesjob_material_categorybitfieldadventure_constructionst.mat_jobitemflagnow usesjob_material_categorybitfieldadventure_constructionst.mat_jobitemflag_masternow usesjob_material_categorybitfieldbuilding_defst.build_keynow usesinterface_keyenumbody_detail_plan.bp_layers_tissuenow usescreature_interaction_effect_target_modeenumbody_detail_plan.bp_position_valuenow usesbody_part_position_typeenumbody_detail_plan.bp_relation_value_1now usesbody_part_relation_typeenumcustom_stockpile_interfacest.cur_main_mode_flagnow usesstockpile_group_setbitfieldcustom_stockpile_interfacest.main_mode_flagnow usesstockpile_group_setbitfieldname_creator_interfacest.cur_name_placenow useslanguage_name_componentenumname_creator_interfacest.cur_word_placenow useslanguage_word_table_indexenumdance_form_section.dance_flagnow usesdance_flagbitfieldevidence_hf_filest.evidencenow usesevidence_typeenumhistorical_entity.resources.scholar_flagnow usesentity_scholar_flagbitfieldinteraction_effect_summon_unitstfieldsrequired_creature_flagsandforbidden_creature_flagsnow usecreature_raw_flagsenuminteraction_effect_summon_unitstfieldsrequired_caste_flagsandforbidden_caste_flagsnow usecaste_raw_flagsenuminteraction_effect_change_weatherstfieldsadd_weather_flagandremove_weather_flagnow useregion_weather_bitsbitfieldcreature_interaction_effect_body_transformationstfieldsrequired_creature_flagsandforbidden_creature_flagsnow usecreature_raw_flagsenumcreature_interaction_effect_body_transformationstfieldsrequired_caste_flagsandforbidden_caste_flagsnow usecaste_raw_flagsenumunit_personality.habitnow useshabit_typeenumworld_region_feature.vertical_connectionnow useslayer_connection_typeenumsite_construction_blueprintstfieldsconstruction_typeandbuilding_typenow usebuilding_typeenumsite_construction_blueprintstfieldsconstruction_jobitemflagandbuilding_jobitemflagnow usejob_material_categorybitfieldbuilding_weaponrackst.rack_flagsis now unsignedtemperaturest.fractionis now unsignedhistorical_entityfieldsdid_wg_variable_positionanddid_wg_variable_market_positionare now unsigneditem_body_componentfieldsnonsolid_remaining,layer_wound_area,layer_cut_fraction,layer_dent_fraction, andlayer_effect_fractionare now signedunit_personality.traitsis now signedrpd_indicator_datastfieldsmarker_char,marker_f,marker_b, andmarker_brare now unsignedembark_note.tileis now unsignedworld_populationfieldscount_min,count_max, andtemp_numare now unsignedworld_site_realization.mini_colorsis now unsignedunit.body.componentsfieldsnonsolid_remaining,layer_wound_area,layer_cut_fraction,layer_dent_fraction, andlayer_effect_fractionare now signedunit.bodyfieldsblood_maxandblood_countare now signedunit.countersfieldspain,nausea, anddizzinessare now signedunitfieldsuwss_alt_period,uwss_alt_on_period,uwss_speed_add,uwss_speed_perc, anduwss_skill_role_adjustare now signedunit.countersfieldsparalysis,numbness,fever,exhaustion,hunger_timer,thirst_timer,sleepiness_timer,stomach_content,stomach_food,vomit_timeout, andstored_fatare now signedunit.status2.liquid_depthare now signedviewscreen_dwarfmodest.sideSubmenuis nowboolentity_rawfieldslikes_site,tolerates_site,start_biome,settlement_biome, andactive_seasonare nowboolentity_raw.jobs.permitted_laboris nowint8_tgraphicstfieldsdo_clean_tile_cacheanddo_post_init_texture_clearare nowboolworld_generatorstfieldshave_logged_parametersandlast_used_validare nowbool
- fixed