Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What's the difference between world.dat and world.sav?  (Read 1383 times)

voliol

  • Bay Watcher
    • View Profile
    • Website
What's the difference between world.dat and world.sav?
« on: December 02, 2020, 09:41:47 am »

Some saves seem to have a world.dat, and some saves a world.sav? Is there any difference between them? I'm making a Python 3 script for extracting the generated raws (https://dffd.bay12games.com/submit.php?action=edit&eid=15321), and trying to figure out if it's something I can just ignore.

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: What's the difference between world.dat and world.sav?
« Reply #1 on: December 02, 2020, 09:59:24 am »

The difference is that "world.sav" has either a Fortress or Adventurer in progress, while "world.dat" is ready to start a new game.

Incidentally, I've already written a Perl script (and even a PHP script) to extract generated raws, in case you want to double-check your implementation and make it compatible with as many versions as you need.
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.

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: What's the difference between world.dat and world.sav?
« Reply #2 on: December 02, 2020, 01:14:18 pm »

Huh, that's a funny difference. Should work the same for me though, if that's all it is. Thanks! :)

Figures someone made something like this before, and a prettier solution at that, even able to read compressed saves. Mine just looks through the uncompressed save, pretending it's a text file, and then outputs anything looking like an object (all the square brackets following each "[OBJECT:"). Then it discards/ignores all junk data it gets by reading the rest of the save, which I'm sure is A-OK. The upside is that the same version I made to work with 0.47.04 also worked with 0.31.06 without any changes, so I don't think I have to bother with compatibility issues.