Skip to content
Dwarf Fortress data structure descriptions
Branch: master
Clone or download
lethosor Merge pull request #316 from AtomicChicken/casteFlags
Identified caste_flags in unit.enemy
Latest commit 943a9aa Mar 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml Add .travis.yml Feb 13, 2018
Bitfield.pm Revert "Remove non-trivial bitfield constructors" Dec 27, 2016
Common.pm
Enum.pm Add new army_controller (probably) vector from 0.44.11 Jul 10, 2018
README.md
SYNTAX.rst Linked list Jul 1, 2018
StructFields.pm
StructType.pm
codegen.pl Properly mark static.fields-*.inc files as generated Mar 22, 2016
defs.xml-empty
df-code.lisp
df.advmode.xml 0.44.10 - realign ui_advmode May 6, 2018
df.announcements.xml
df.art.xml
df.building-raws.xml
df.building-vectors.xml
df.buildings.xml .1 to .01 in since attributes Jun 27, 2018
df.creature-raws.xml Fix creature_raw size (#276, reverts #272) Jun 27, 2018
df.d_init.xml
df.descriptors.xml Fix broken instance-vectors Mar 10, 2018
df.entities.xml Add trade_state.Stuck Feb 15, 2019
df.entity-raws.xml
df.globals.xml
df.graphics.xml
df.history.xml added ref-target Feb 2, 2019
df.init.xml
df.interaction.xml
df.item-raws.xml
df.item-vectors.xml Branch-related additions May 10, 2016
df.itemimprovements.xml
df.items.xml identified "gelded" body_part_status flag Dec 23, 2018
df.job-types.xml Add job_type attribute helper if it was generated from designation Jun 18, 2018
df.jobs.xml More supporting code for linked lists. Jul 1, 2018
df.keybindings.xml
df.knowledge.xml Allow unions of types with non-trivial constructors (e.g. bitfields) Dec 28, 2016
df.language.xml
df.legends.xml
df.machines.xml
df.map.xml More supporting code for linked lists. Jul 1, 2018
df.materials.xml .1 to .01 in since attributes Jun 27, 2018
df.meeting.xml added performance info Jul 16, 2018
df.military.xml
df.pathfinding.xml Add new unit_path_goal enum values Dec 25, 2015
df.plant-raws.xml
df.plants.xml more field names. Oct 28, 2018
df.projectile.xml More supporting code for linked lists. Jul 1, 2018
df.raws.xml
df.reaction-raws.xml Fix broken instance-vectors Mar 10, 2018
df.refs.xml Update structures Mar 11, 2018
df.resource.xml
df.skills.xml Add profession::MESSENGER Jun 26, 2018
df.stockpile.xml Add setup_character_info (used by setupdwarf/setupadventure) and iden… Feb 21, 2018
df.syndrome.xml Name unk values in syndrome structure Jul 1, 2018
df.tile-types.xml
df.ui-menus.xml display furniture-related fields in ui_sidebar_menus Dec 1, 2018
df.ui.xml
df.unit-thoughts.xml
df.units.xml named caste_flags in unit.enemy Mar 17, 2019
df.vermin.xml Change bitfield <compound>s to <bitfield>s Dec 27, 2016
df.viewscreen.xml
df.world-data.xml
df.world-site.xml misc fields Nov 28, 2018
df.world.xml
disasm.lisp
how-to-update.rst
list.pl
lower-1.xslt
lower-2.xslt
make-csv.sh make-csv: use $() instead of backticks Jul 20, 2018
make-dt.pl
make-keybindings.pl Fix make-keybindings.pl inserting INTERFACEKEY_ before keys that end … Mar 10, 2018
make-scans.sh
match-ctors.pl Use the three-argument form of open() Jul 21, 2014
match-vtables.pl
new-release.pl
start-utils.lisp
start.lisp Fix final objects in the old test file to auto-mark things aligned. Dec 13, 2015
start.sh
start.sh-core Determine the sbcl heap size based on the architecture. Mar 6, 2012
symbols.xml win32: fix vtables for viewscreen_storesst and squad_order_rescue_hfst Aug 23, 2018
version.lisp

README.md

DF-structures

DF-structures is the core information on which DFHack depends.

For information on how to understand this format, see ./SYNTAX.rst. For how to update for a new version of DF, see ./how-to-update.rst

Originally dfhack used a file called Memory.xml to describe data structures of the game. It explicitly listed addresses of known global variables, and offsets within structures to fields, not unlike the ini files used by Dwarf Therapist.

However, as the number of known fields and objects grow, maintaining the explicit offset lists quickly becomes difficult, error prone, and inefficient.

This format instead represents data structure layout purely via listing all fields in the correct order, exactly like a structure definition does in the C++ language itself. There is still a file with numeric data, but it only contains absolute addresses of global objects.

You can’t perform that action at this time.