I've managed to figure out the general structure of the level.dat file format (and, by extension, level-init.dat). I enjoy poking around at stuff like this, and am currently working on a tool to manage mods, as well as get various pieces of information about saves, like game version and mods used. Eventually, I'd like to build it up to a save editor, but right now it's more for screwing around.
So, here's my dumb question, for those of you who are more familiar with reverse-engineering binary files: What is the big blob of data right after the ore list? Here's the overall structure I've managed to put together, for context:
Code: Select all
SaveFormat_00_15 extends BaseSave {
0:
  // Version info. 0.15.9-0 would be:
  uint16 major; // 0
  uint16 minor; // 15
  uint16 patch; // 9
  uint16 build; // 0
  // 63 00 00 00 00 00 in singleplayer
  // 00 00 00 00 00 00 in MP.  Flags?
  byte[6] unknown_1;
  bigstring gamemode; // "freeplay", usually.
  bigstring base; // Not sure why this is needed, always "base"
  biglist<Mod_00_15> mods;
  biglist<littlestring> players;
  // 29 A8 81 02 01 02 on MP (0.15.9)
  // F8 26 08 00 01 04 on SP (0.15.0) Settings/flags?
  byte[6] unknown_2;
  biglist<OreDef_00_15> ores;
  // And what follows is a big block of gibberish. 259-260ish bytes long, variable size, no discernible size header.
  // It has various repeating patterns, like 47 E1 7A and 80 84 1E 00.
  // Then there's a few zero bytes (at least 4), and then some bigstrings that look like entity names.
}
OreDef_00_15 extends object {
  bigstring name;
  byte[3] unknown_1; // NOT RGB color.  While coal is 00 00 00, oil is 02 02 03, and enemy-base is 01 01 01. Best I can think of is perlin noise adjustments.
}
Mod_00_15 extends BaseMod {
  // 08 41 69 72 63 72 61 66 74 01 03 00 26 08 89 B7
  // Aircraft v1.3.0, CRC 0x260889B7
  littlestring name;
  uint8 major;
  uint8 minor;
  uint8 patch;
  uint32 crc;
}




 It has a working save reader built in!
  It has a working save reader built in!




