Dwarf Fortress World.dat File Format for df34.07
dfWorldDat current version: 0
Link to dfWorldDat SourceForge ProjectPrimary Goal:To provide synchronization between a World.dat or World.sav and it's raws, so that modders may quickly test changes without re-genning a new world.
(in other words, replace
DF World Tinker)
Secondary Goal:To provide an export mechanism giving world information so that third party GUIs may be made to render the world, view it in detail, search it's layers for ideal embark sites, generate movies of world history (oh yeah), etc, etc.
About:I've been working on this since the early releases of df2010, extending as needed when needed.
Getting burned out deciphering the cryptic world format, and too busy to pursue time consuming trial-and-error discovery at the moment.
So I cleaned up the file, commented it, and opened up what I have to create a team project for it.
The SF project has one file, a template for the
010 Hex Editor by Sweetscape.
This will parse most of the header, RAW tags, geology data, regions and some subregions. Then it will error out on a subregion.
I need help completing this, by people with a reasonable understanding of hex editing, data structures, grok 'little-endian', basic C knowledge.
And most importantly, people willing to do trial-and-error experimentation to discover the inner workings of the World.dat format.
Tasks:Listed roughly in the order found in the world.dat file, difficulty varies.
Task 0: Figure out the rest of the header.
Task 1: Figure out Animal People
Task 2: Region Meta-data.
Task 3: Region Map. This may be related to how it is displayed on world maps.
Task 4: Map Element probably not be best name. Will be renamed once it is decyphered.
Task 5: Figure out what LayerType values are valid and what they mean.
Task 6: Figure out what soil knows about itself.
Task 7: Verify and clarify descriptions in Rock data.
Task 8: Geology unknown word.
Task 9: Subregion Unknowns preceding Name.
Task 10: Subregion Unknowns following Name
Task 11: Subregion Unknowns following Map Grid Coordinates.
Task 12: Subregion Unknown 192 byte block.
Task 13: Subregion of unknown repeating shorts.
Task 14: Figure out the dfsubregionUnkStruct20 data structure.
Task 15: Figure out unknown at end of subregions.
Getting Started:- Turn off compressed saves in init.txt, and use vanilla RAWs
- Get 010 Hex Editor by Sweetscape
- Get the latest DwarfFortress3407Template.bt from the dfWorldDat SF project.
- Read the 010 Editor help files about scripts and templates.
- Gen a generic pocket world, open the world.dat file in 010, load the template, run it.
- It will fail somewhere in the subregions. Take a look around, get a feel for it.
- Now is a good time to skim through the whole template file, to understand what it is doing.
- Dive in.
I've documented the template file fairly thoroughly.
Some things I learned with dfWorldTinker have not been incorporated yet, but not much.
If you want to contribute, come back to this page to see what tasks have been assigned, then pick one still open and PM me that you're working on it.
(All of them are open right now.)
If there is enough interest, I'll get the SourceForge page better organized.
If there is a
very large amount of interest, I'll move over to GitHub.