Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: dfWorldDat : the Dwarf Fortress World.dat File Format Project  (Read 19130 times)

Parker147

  • Bay Watcher
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #30 on: December 06, 2011, 08:59:57 am »

I would love to have all the world information available to my Legends Viewer program. Right now I'm using the XML Dump, which is a bit spotty on some things and I don't expect it to be updated anytime soon, especially with all the new things being added. I would think looking at the XML Dump would help a lot with finding the structure of the data and there is a wiki page that explains most of it. I would enjoy trying to help out with this, but I think any free-time I have will end up being used to work on the Legends Viewer, but if there is any way I can help let me know.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #31 on: December 08, 2011, 10:19:08 am »

I'd love to provide it.
(Primary Goal and Secondary Goal on the first post.)

I used the XML dumps when I got started, back in 2010, and was able to get much more region information out back then.
But when the format changed significantly back around 31.21, I lost the ability to reliably read regions.  XML does not provide enough detail to figure anything else in detail.

As DFHack progresses, maybe revelation of internal structures will shine light on file structures.  I am working too many hours right now to invest time to investigate.
Here in USA, they call it Ğloyalty timeğ.



The biggest help anyone could provide right now is the basic ability to figure out where each region begins and ends.

There are a lot of variable length structures in there.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #32 on: April 20, 2012, 09:52:35 am »


Updated to latest, now that 34.07 has been out for a while.
Still incomplete.
Still willing to switch to another hex editor with comparable features.
Still hoping that others get interested.
Logged

Blakmane

  • Bay Watcher
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #33 on: April 21, 2012, 07:36:40 am »

A lot of interest around I think, but very little time or actual ability to help :-(
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #34 on: April 23, 2012, 05:57:57 pm »

Looks interesting. Posting to watch.
Logged

Mimos

  • Escaped Lunatic
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #35 on: July 19, 2012, 10:02:32 am »

I did some research on the Block Info Array of the REGION MAP SAVE block  (world.dat):

This is a copy of the table form the Wiki with some information added (italic):
http://dwarffortresswiki.org/index.php/User:Andux/Format_research/WORLD.DAT#REGION_SAVE_block

Type    Name    Description
int32       Always 3? Might be the length value for a byte-list.
byte        ?
byte        ?
byte        ?
int16        elevation
int16        rainfall
int16        vegetation
int16        temperature
int16        evilness
int16        drainage
int16        volcanism
int16        savagery
int16        ??
int32        ??
int32        ??
int16        something with deserts/aquifer?? vegetation modifier for extremely hot regions and cloes to towns?
int16        ??
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int16       Always -30000?
int32        ??
int32        ??
int16        GeologyID With this information you can change all the layers in the Biome :-)

edit: added GeologyID & updated vegetation modifier
« Last Edit: July 19, 2012, 08:39:12 pm by Mimos »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #36 on: July 19, 2012, 08:24:20 pm »

Hmm... Maybe once I get my C++ skill sharpened, and I learn a bit more in college, and mess around with Hex/Memory editing some more I might be able to help.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #37 on: July 20, 2012, 01:06:56 pm »


Very nice.
It's good to see activity.

Judging by Toady's post about army camps, the format probably will change a great deal with the next release.
34.11 is probably going to remain the most stable version for a while, and figuring it out is very important in order to find what changes are in the next, so I'll update the reference template once I get a change this weekend.

I'm still willing to use a different hex editor, if it has comparable templates to 010.
Of course, anybody can use anything they like.

btw, whoever came up with "chord progression in Welsh hip-hop" in the wiki page, I especially like that.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #38 on: July 20, 2012, 01:26:27 pm »

Most of this information is much more easily accessible through DFHack using the information from df-structures.
+ Everything's loaded into memory with proper hierarchical structures rather than flat blobs of data requiring conditional decoding.
+ Important metadata is also readily available where recognized, and some types of objects (items, buildings, history events, etc.) even allow interaction through virtual method calls.
+ Irrelevant data can be safely ignored - unlike when reading world.dat, you don't need to know how much space it takes up in order to skip over it.
- Only the most recent versions can be properly handled - whenever the data structures change significantly, DFHack has to be rebuilt with new headers derived from df-structures and that build will not work in any previous versions of DF. With world.dat, you can at least examine the version number to figure out which bytes you need to skip within each section.
« Last Edit: July 20, 2012, 01:51:13 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Mimos

  • Escaped Lunatic
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #39 on: July 21, 2012, 07:25:43 pm »

I wanted to edit a nice spot on the worldmap a bit before embarking and I thought that hexediting would be the easyest wax to go. I thought DFHack could only be used for fortress map editing, does it support world map editing, too? I will look into it, thanks for the link.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #40 on: July 23, 2012, 10:48:07 am »

It depends what sort of "world map editing" you actually want to do. Chances are, it'll be possible using DFHack's Lua interface, though you'll need to be very careful not to corrupt the map by trying to assign invalid data.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Mimos

  • Escaped Lunatic
    • View Profile
Re: dfWorldDat : the Dwarf Fortress World.dat File Format Project
« Reply #41 on: August 19, 2012, 12:06:34 pm »

I had to test a new IDE (Delphi XE2) for work and searched for something to implement. So I went for a DF world.dat editor.
http://dffd.wimbli.com/file.php?id=6794

Its still an early alpha (even the readme). So at the moment its not an editor but a map viewer. Maybe it can be useful already.
If I forgot to thank someone or if you want to be excluded please let me know.

Feedback and of course help with further map parsing is greatly appreciated.
Logged
Pages: 1 2 [3]