Dwarf Fortress data structure descriptions
Clone or download
Latest commit 11faf4a Aug 23, 2018
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
Bitfield.pm
Common.pm
Enum.pm
README.md
SYNTAX.rst
StructFields.pm Support automatic array size detection from index-enum Jun 26, 2018
StructType.pm
codegen.pl
defs.xml-empty Add a perl script that automates resetting for a new version. Mar 7, 2012
df-code.lisp
df.advmode.xml
df.announcements.xml .1 to .01 in since attributes Jun 27, 2018
df.art.xml Added MESSENGER enum value Jun 28, 2018
df.building-raws.xml
df.building-vectors.xml
df.buildings.xml
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
df.entity-raws.xml
df.globals.xml
df.graphics.xml
df.history.xml
df.init.xml support 'long' type directly because size differences on win/others Jul 19, 2016
df.interaction.xml
df.item-raws.xml
df.item-vectors.xml
df.itemimprovements.xml assign names to some unnamed fields to prevent "anon_X" conflicts in … Mar 18, 2018
df.items.xml
df.job-types.xml
df.jobs.xml
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
df.materials.xml
df.meeting.xml
df.military.xml
df.pathfinding.xml
df.plant-raws.xml
df.plants.xml
df.projectile.xml More supporting code for linked lists. Jul 1, 2018
df.raws.xml Update 'world' for v0.44.06 Mar 10, 2018
df.reaction-raws.xml
df.refs.xml
df.resource.xml
df.skills.xml Add profession::MESSENGER Jun 26, 2018
df.stockpile.xml
df.syndrome.xml
df.tile-types.xml
df.ui-menus.xml
df.ui.xml
df.unit-thoughts.xml
df.units.xml
df.vermin.xml
df.viewscreen.xml
df.world-data.xml Named is_volcano flag Jul 18, 2018
df.world-site.xml
df.world.xml Fix indentation, rm old comment Jul 13, 2018
disasm.lisp Don't list linux globals that couldn't be decoded. Feb 18, 2012
how-to-update.rst links to metasm and df_mist repos Jul 5, 2016
list.pl
lower-1.xslt
lower-2.xslt
make-csv.sh
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
match-vtables.pl
new-release.pl
start-utils.lisp
start.lisp
start.sh
start.sh-core
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.