https://github.com/dfhack/df-structures
Dwarf Fortress data structure descriptions
https://github.com/dfhack/df-structures
dfhack dwarf-fortress
Last synced: 9 months ago
JSON representation
Dwarf Fortress data structure descriptions
- Host: GitHub
- URL: https://github.com/dfhack/df-structures
- Owner: DFHack
- Created: 2012-01-01T02:30:34.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2025-05-06T00:42:28.000Z (9 months ago)
- Last Synced: 2025-05-06T01:34:32.674Z (9 months ago)
- Topics: dfhack, dwarf-fortress
- Language: Perl
- Homepage: https://github.com/DFHack/dfhack
- Size: 38 MB
- Stars: 123
- Watchers: 17
- Forks: 81
- Open Issues: 47
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
Awesome Lists containing this project
README
# DF-structures
[](https://github.com/DFHack/df-structures/actions?query=workflow%3ABuild)
DF-structures is the core information on which
[DFHack](https://github.com/DFHack/dfhack) depends.
For information on how to understand this format,
see [./SYNTAX.rst](./SYNTAX.rst). For how to update
for a new version of DF, see
[new-release-processing.rst](https://github.com/DFHack/df_misc/blob/master/doc/new-release-processing.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.