Code Monkey home page Code Monkey logo

dfparse's Introduction

dfparse

Goal

This goal of this project is to be able to understand and parse Dwarf Fortress data files, starting with save files, into a structured format. Once parsing this data is possible, other tools may be built on top of this, such as the ability to modify and rewrite files. I'm focusing on Dwarf Fortress Premium first, but if we can get that completed I'm open to entertaining support for older versions.

Selfishly, I started this effort to see if I could salvage my first fort in DF Premium which is affected by a crash when loading the save file; I'm sure the bug will be fixed before I can reverse engineer things, but mapping out the save file should enable all kinds of other interesting things.

Progress

This is in its infancy. I'm putting it online in the hopes of crowdsourcing the effort with help from the many talented people in the Dwarf Fortress community that surely have more understanding of the data formats and inner workings of the game. So far, I don't have any insider information; I'm reverse engineering things using a JS debugger and my own save files. At the time of this writing, I've churned through over 4 megabytes of the uncompressed save file bytes, not that I understand it all, but I've found some meaning and some patterns, so I've got a long way to go still.

Contributing

Want to contribute? Here are some ideas:

  1. Validating the code thus far against your own save files, to confirm or invalidate my multitude of guesses and assumptions.
  2. Sharing information you have or insights; there are many places where the meaning of the data is unknown or the semantics of the structures may be wrong.
  3. Sharing your own detective work; feel free to hack on this code, do your own reverse engineering, then send me a pull request if you'd like to fill out the parsing!
  4. Linking me to other projects or documentation around the same goals; if someone else has figured some things out, I'd love to borrow their findings.
  5. Engineering ideas are also welcome, but performance, code structure, tests, etc are not my primary focus.

Credits

Progress thus far was aided immensely by the work done by Andux researching the format of world and save files for older versions of Dwarf Fortress.

dfparse's People

Contributors

jpage-godaddy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lmeerwood

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.