Binary Data File Layout

Below is the whole save file for a blank game world as of August 2025

00000000: 454c 532d 4d4d 4c08 0004 6d65 7461 0800  ELS-MML...meta..
00000010: 0776 6572 7369 6f6e 0101 0008 0008 7361  .version......sa
00000020: 7665 7469 6d65 0600 1432 3032 352d 6175  vetime...2025-au
00000030: 672d 3131 4031 343a 3537 3a35 3300 0800  g-11@14:57:53...
00000040: 0376 6572 0702 0000 0003 0000 0106 0007  .ver............
00000050: 616c 7068 612e 3106 000a 6275 696c 642e  alpha.1...build.
00000060: 3833 3233 0000 0800 0577 6f72 6c64 0800  8323.....world..
00000070: 0763 6f6d 7061 6e79 0600 0003 0000 1388  .company........
00000080: 0008 0005 7469 6c65 7304 0000 0064 0400  ....tiles....d..
00000090: 0000 6407 0200 0000 7bff ff00 ffff 00ff  ..d.....{.......
000000a0: ff00 ffff 00ff ff00 ffff 00ff ff00 ffff  ................
000000b0: 00ff ff00 ffff 00ff ff00 ffff 00ff ff00  ................
000000c0: ffff 00ff ff00 ffff 00ff ff00 ffff 00ff  ................
000000d0: ff00 ff9b 00ff 6303 ffff 00ff ff00 ffff  ......c.........
000000e0: 00ff ff00 ffff 00ff ff00 ffff 00ff ff00  ................
000000f0: ffff 00ff ff00 ffff 00ff ff00 ffff 00ff  ................
00000100: ff00 ffff 00ff ff00 ffff 00ff ff00 ffff  ................
00000110: 00ff 3500 0008 0003 636c 6b07 0400 0000  ..5.....clk.....
00000120: 0300 0000 0100 0000 0800 0000 0000 0800  ................
00000130: 0865 6e74 6974 6965 730a 0000 0002 0900  .entities.......
00000140: 0000 2a02 1006 0003 3b42 5307 0500 0000  ..*.....;BS.....
00000150: 0245 4800 0045 4400 0004 0000 0400 0800  .EH..ED.........
00000160: 046d 6574 6107 0400 0000 0000 0009 0000  .meta...........
00000170: 004a 0203 0600 033b 5350 0705 0000 0002  .J.....;SP......
00000180: 4538 0000 4538 0000 0400 0005 0008 0003  E8..E8..........
00000190: 696e 760a 0000 0002 0900 0000 0c02 0004  inv.............
000001a0: 0000 0000 0210 0b00 0009 0000 000c 0201  ................
000001b0: 0400 0000 0102 080b 0000 0000 0008 0005  ................
000001c0: 7065 6f6e 730a 0000 0001 0900 0000 5a07  peons.........Z.
000001d0: 0500 0000 0245 4800 0045 4800 0004 0000  .....EH..EH.....
000001e0: 0200 0800 0464 6174 6102 0002 1607 0600  .....data.......
000001f0: 0000 0200 044a 6566 6600 0b54 7574 6f72  .....Jeff..Tutor
00000200: 6961 6c73 6f6e 070b 0000 0002 0101 0300  ialson..........
00000210: 0000 2b04 0041 f4d2 0008 0006 6a6f 6269  ..+..A......jobi
00000220: 6e76 0a00 0000 0000 0000 0800 0861 7272  nv...........arr
00000230: 6976 6572 730a 0000 0001 0900 0000 3802  ivers.........8.
00000240: 0007 0500 0000 07c3 0000 0045 4800 00c3  ...........EH...
00000250: 0000 0045 4800 0045 4800 0045 4800 0041  ...EH..EH..EH..A
00000260: 2000 0007 0b00 0000 0301 0001 0800 046d   ..............m
00000270: 6574 6102 0000 0000 0008 0003 706f 7307  eta.........pos.
00000280: 0500 0000 0345 4a00 0045 4800 003f 8000  .....EJ..EH..?..
00000290: 0000 9808                                ....

The implementation is based on Minecrafts NBT system.

Order of serialising / de-serialising

IO

Save Game

Load Game

SaveFile

Serialised Data

Serialise

WorldInfo

Company Info

Tile Info

Time & Day Info

Shops

Shop Tool Entites

Peons

Road Arrivers

Game Meta Info

Camera Pos

Deserialise

DeserialisedWorldInfo

Company Info

Tile Info

Shops

Shop Tool Entities

Peons

Road Arrivers

Time & Day Info

Camera Pos

Game

Game State

Writing

BinaryNode n = new BinaryNode();
n.push!(int)(420);
n.push!(string)("Hello World!");

// 'ELS-MML' is the 'magic number' for MultiMall Save files
writeBinaryFile("save.sav", "./saves/", n, "ELS-MML");

Reading

// 'ELS-MML' if the first couple of bytes in a file don't match this then we don't read it
BinaryNode n = readBinaryFile(file, savePath, "ELS-MML");
int a = n.read!(int)();
string b = n.read!(string)();

printDebug("int: %d, string: %s", a, b);
// Console out: int: 420, string: "Hello World"