github DFHack/dfhack 53.10-r2rc1
DFHack 53.10-r2rc1

pre-release13 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

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 indicators
  • sort:
    • added Uniformed filter 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
  • 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::addItemSpatter as dfhack.maps.addItemSpatter.
  • Added Maps::addMaterialSpatter as dfhack.maps.addMaterialSpatter.

Structures

  • added original-name attributes 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_mats to include 640 new elements for CREATURE_1-200, HIST_FIG_1-200, PLANT_1-200, and UNUSED01-40
    • assigned proper placeholder names to interface_key section labels
    • promoted several inline-defined types to top-level (intrigue_corruption_flag, job_posting_flag, unitproperyplacementst)
    • plant_raw.stockpile_growth_flags now uses ras_crop_flag
    • added entity_raw_flags element "SIEGE_SKILLED_MINERS"
    • added stockpile_category element "ALL"
    • fixed structure layouts for adventure_interface_companionsst, caste_raw, entity_position_assignment, message_order_to_perform_actionst, and workshop_graphics_infost
    • renamed army_controller_goal_infiltrate_societyst field "agoal_ab_id" to "goal_ab_id"
    • renamed creature_graphics_layer field "dye_color_iuse_palette_rowndex" to "use_palette_row"
    • renamed entity_raw_flags enum member "MISSING_UNDERWORLD_DISASTERS" to "MINING_UNDERWORLD_DISASTERS"
    • assigned proper names to hf_religious_datast.anon_1, pet_profilest.anon_1, and unit_vision_arcst.anon_1
    • renamed historical_entity field "unkarmy_reeling_defense" to "army_reeling_defense"
    • renamed history_event_hf_learns_secretst field "interaction_effect" to "interaction_source"
    • renamed item_craft_graphics_flag field "size" to "material"
    • renamed lookinfo_spatterst field "extend" to "extent"
    • renamed personality_ethicst field "reponse" to "response"
    • renamed personality_facet_type enum member "PERSEVERENCE" to "PERSEVERANCE"
    • renamed value_type enum member "PERSEVERENCE" to "PERSEVERANCE"
    • renamed poetic_form_action enum member "MakeConsession" to "MakeConcession"
    • renamed simple_action_type enum member "performe_horrible_experiments" to "performed_horrible_experiments"
    • renamed stair_graphics_flag_material enum member "FOZEN" to "FROZEN"
    • renamed timbre_type enum member "PURE_" to "PURE"
    • renamed tissue_style_type enum member "PONY_TAILS" to "PONY_TAIL"
    • renamed unit field "job.siege_boulder" to "job.siege_builder"
    • renamed unit field "pool_index" to "pool_id"
    • renamed viewscreen_choose_start_sitest field "def_candidate_nearst" to "def_candidate_near_st"
    • changed caste_raw.extracts.blood_state and caste_raw.extracts.pus_state to use the matter_state enum
    • changed d_init.display.track_tile_invert and d_init.display.track_ramp_invert to use a bitfield
    • changed interrogation_resultst.relationship_factor to 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 contain circumstance_id unions instead of plain integers
    • changed world.buildings.other.WINDOW_ANY to 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, and world.items.other.FOOD_STORAGE to specify the correct element types
    • changed game.main_interface.last_displayed_hover_inst to use the main_hover_instruction enum
    • changed world.raws.music.all[N].m_event[] and world.raws.music.all[N].context[] to hold enums
    • changed widget_job_details_button.jb to correctly point at a job instead of a generic pointer
    • changed world.worldgen_status.rejection_reason to use the map_reject_type enum
    • changed world.history.first_[research]_flag[N] to use the various knowledge_scholar_flags_N bitfields
    • changed the history_event vmethods getSentence and getPhrase to add 2 new boolean arguments (to which the game always passes "true, false")
    • changed the interaction_target vmethod affects_unit first parameter from an integer to a unit pointer
    • changed the item vmethod getGloveHandedness return type from int8_t to uint32_t
    • changed the item vmethod getAmmoType to take no parameters and to return an std::string by value
    • changed the item vmethod getDyeAmount to take an integer parameter
    • changed the unit vmethod getCreatureTile to take a boolean parameter
    • add ref-target attributes to various fields that were missing them, for use by gui/gm-editor and similar tools
    • changed caste_raw.extracts.vermin_bite_chance to vermin_bite_state and changed its type to matter_state
    • changed ci_personal_reputation_profilest field entity_id to cultural_identity (now referring to a cultural_identity)
    • changed cultural_identity.events[] to cultural_identity.rumor_info.events[]
    • changed dance_form field entity to event (now referring to at a history_event)
    • changed dance_form_section field acts_out_civ to acts_out_event (now referring to a history_event)
    • changed entity_burial_request field civ to hfid (now referring to a historical_figure)
    • changed entity_pop_specifierst field squad_id to squad_enid (now referring to a historical_entity)
    • changed gps.color[x][y] to gps.default_palette.color[x*16+y]
    • changed history_event_modified_buildingst field modification to use a different bitfield abstract_building_tower_flag
    • changed itemdef_ammost, itemdef_siegeammost, itemdef_toolst, itemdef_trapcompst, and itemdef_weaponst fields "texpos" (and "texpos2") into longer lists of specific fields
    • changed knowledge_profilest.known_events[] to knowledge_profilest.rumor_info.events[]
    • changed relationship_event_supplement integer field occasion_type to circumstance of type unit_thought_type (an enum)
    • changed relationship_event_supplement integer field site to circumstance_id field of type circumstance_id (a union)
    • changed relationship_event_supplement field profession to reason_id field of type history_event_reason_id
    • changed scholar_knowledge.knowledge_goal bitfield to a union of all knowledge_scholar_flags_N bitfields (selected by the value of scholar_knowledge.research_prject)
    • changed unit.enemy.rumor[] to unit.enemy.rumor_info.events[]

Don't miss a new dfhack release

NewReleases is sending notifications on new releases.