v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

User:Andux/Format research/WORLD.DAT

From Dwarf Fortress Wiki
< User:Andux‎ | Format research
Revision as of 21:57, 25 December 2013 by 66.97.127.116 (talk) (→‎World header: I just spent an hour debugging my code. Updated Andux's header structure to fit my findings)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WORLD.DAT files contain data for worlds in which no adventurer or fortress is currently active.

File structure[edit]

World header[edit]

This immediately follows the save header:

Type Name Description
int16 Unknown Always 0?
int32 Unk1
int32 Unk2
int32 Unk3
int32 Unk4 Max civ ID?
int32 Unk5 Max unit ID?
int32 Unk6
int32 Unk7
int32 Unk8
int32 Unk9 Max hist. fig. ID?
int32 Unk10 Max event ID?
int32 Unk11
int32 Unk12
int32 Unk13
int32 Unk14
int32 Unk15
int32 Unk16
int32 Unk17
int32 Unk18
int32 Unk19
int32 Unk20
int32 Unk21
int32 Unk22
int32 Unk23
byte has_name If this is 1, a name struct immediately follows.
Type Name Description
byte Immediately follows the name struct.
int16 ?
int32 ?
int32 ?
int32 ?
String WorldName The full world name in whatever language.

Immediately after the world name come the generated raws and string table.

Generated raws[edit]

Generated raws are stored in a List of string-lists; each string-list is a List of String structures which contain the raw tags. There may be multiple sections of generated raws, depending on version; in the order they appear in the file, these are:

§ save_version Contents
1. > 1362 MATERIAL raws
2. >= 1400 ITEM raws
3. >= 1287 CREATURE raws
4. > 1362 INTERACTION raws

String tables[edit]

The string tables enumerate all the raw section names used by the save.

Each section is a List of String structures containing the name of a raw object; there are a total of 19 or 20 sections, depending on version:

  1. INORGANIC materials
  2. PLANT types
  3. BODY types
  4. BODYGLOSS entries
  5. CREATURE entries
  6. ITEM types
  7. BUILDING types (custom workshops)
  8. ENTITY classes
  9. WORD entries
  10. SYMBOL entries
  11. TRANSLATION entries (languages)
  12. COLOR entries
  13. SHAPE entries
  14. COLOR_PATTERN entries (also includes COLOR entries)
  15. REACTION entries
  16. MATERIAL_TEMPLATE types
  17. TISSUE_TEMPLATE types
  18. BODY_DETAIL_PLAN entries
  19. CREATURE_VARIATION types
  20. INTERACTION types (if save_version > 1372)

World data[edit]

  1. List of 8-byte records
  2. int32 (or List?)
  3. List of int32s -- civ ids?
  4. List of int32s -- unit ids?
  5. List of int32s
  6. List of 8-byte records -- confirm
  7. List of int32s
  8. List of int32s -- confirm
  9. int32 (or List?)
  10. int32 (or List?)

New in 0.34.xx[edit]

These are only present if the save version is 1372 or greater.

  1. List of int32s
  2. List of int32s -- book/slab ids?
  3. int32 (or List?)
  4. int32 (or List?)
  5. int32 (or List?)
Book defs[edit]
Type Name Description
bytes Generally 89? bytes for slabs, 129-133 bytes for books?
string title Name of the book/slab/letter.
int32 Only present in slabs?
int16 Only present in slabs?

Entity defs[edit]

Type Name Description
int16 EntityType? ?
int32 EntityID
String EntityClass Raw section in entity_*.txt
int16 ?
int16 ?
int32 NextEntityID? Probably wrong
int16 ShortListSize? Flags? Number of int16s which follow. Commonly zero. Could be bit flags?
[int32?] ? Optional. Appears only if above is = 2? ‼Science‼ doesn't know!
byte has_name If this is 1, a name struct immediately follows.
Type Name Description
[int32?] Optional. Seems to only appear in saves with version of 1341 or less when the entity has no name.
int16 CreatureType An index into the CREATURE stringlist/vector.
int16 ?
int16 ?

Next up, we have the confusing bit: a tangled mess of roughly 8 bajillion List structs, often in pairs, with record sizes that vary according to a convoluted schedule, which may or may not based on a combination of:

  • the hexagrams of the I Ching
  • Martian lunar cycles
  • the migratory patterns of Mesonychoteuthis hamiltoni
  • chord progression in Welsh hip-hop



Anyway, here's my attempt at automagically parsing the struct (hex dumps manually cleaned of funky gibberish):

Reading .DAT header:
 save_version  = 1354
 is_compressed = 0

Loading spire_world.dat
Loaded world data: Ogusposmlo
Civ def (1/2069):
002FAA4F: Entity type? (INT16) = 0
002FAA51: Civ 0: Civ ID (int32) = 0
002FAA55: Civ 0: Entity class = SUBTERRANEAN_ANIMAL_PEOPLES
002FAA72: Civ 0: ?? (int16) = 25
002FAA74: Civ 0: ?? (int16) = 75
002FAA76: Civ 0: Next civ ID (int32) = 1
002FAA7A: Civ 0: ?? (int16) = 0
002FAA7C: Civ 0: Has name (byte) = 0
002FAA7D: Civ 0: Creature type? (int16) = 286 (CAVE_SWALLOW_MAN)
002FAA7F: Civ 0: ?? (int16?) = 0
002FAA81: Civ 0: ?? (int16?) = 0
002FAA83: Civ 0: A1a: Skipped 12 2-byte record(s).
002FAA9F: Civ 0: A1b: Skipped 12 4-byte record(s).
002FAAD3: Civ 0: A2a: List has 0 2-byte records.
002FAAD7: Civ 0: A2b: List has 0 4-byte records.
002FAADB: Civ 0: A3a: List has 0 2-byte records.
002FAADF: Civ 0: A3b: List has 0 4-byte records.
002FAAE3: Civ 0: A4a: List has 0 2-byte records.
002FAAE7: Civ 0: A4b: List has 0 4-byte records.
002FAAEB: Civ 0: A5a: Skipped 20 2-byte record(s).
002FAB17: Civ 0: A5b: Skipped 20 4-byte record(s).
002FAB6B: Civ 0: A6a: List has 0 2-byte records.
002FAB6F: Civ 0: A6b: List has 0 4-byte records.
002FAB73: Civ 0: A7a: Skipped 6 2-byte record(s).
002FAB83: Civ 0: A7b: Skipped 6 4-byte record(s).
002FAB9F: Civ 0: A8a: Skipped 12 2-byte record(s).
002FABBB: Civ 0: A8b: Skipped 12 4-byte record(s).
002FABEF: Civ 0: A9a: Skipped 12 2-byte record(s).
002FAC0B: Civ 0: A9b: Skipped 12 4-byte record(s).
002FAC3F: Civ 0: A10a: Skipped 12 2-byte record(s).
002FAC5B: Civ 0: A10b: Skipped 12 4-byte record(s).
002FAC8F: Civ 0: A11a: Skipped 6 2-byte record(s).
002FAC9F: Civ 0: A11b: Skipped 6 4-byte record(s).
002FACBB: Civ 0: A12a: List has 0 2-byte records.
002FACBF: Civ 0: A12b: List has 0 4-byte records.
002FACC3: Civ 0: A13a: Skipped 1 2-byte record(s).
002FACC9: Civ 0: A13b: Skipped 1 4-byte record(s).
002FACD1: Civ 0: A14a: List has 0 2-byte records.
002FACD5: Civ 0: A14b: List has 0 4-byte records.
002FACD9: Civ 0: A15a: Skipped 18 2-byte record(s).
002FAD01: Civ 0: A15b: Skipped 18 4-byte record(s).
002FAD4D: Civ 0: A16a: Skipped 95 2-byte record(s).
002FAE0F: Civ 0: A16b: Skipped 95 4-byte record(s).
002FAF8F: Civ 0: B1a: List has 0 4-byte records.
002FAF93: Civ 0: B1b: List has 0 2-byte records.
002FAF97: Civ 0: B2a: Skipped 3 4-byte record(s).
002FAFA7: Civ 0: B2b: Skipped 3 2-byte record(s).
002FAFB1: Civ 0: C1a: List has 0 2-byte records.
002FAFB5: Civ 0: C1b: List has 0 4-byte records.
002FAFB9: Civ 0: C2a: List has 0 2-byte records.
002FAFBD: Civ 0: C2b: List has 0 4-byte records.
002FAFC1: Civ 0: D1: List has 0 2-byte records.
002FAFC5: Civ 0: D2: List has 0 2-byte records.
002FAFC9: Civ 0: D3: List has 0 2-byte records.
002FAFCD: Civ 0: E: List has 0 4-byte records.
002FAFD1: Civ 0: F7a: Skipped 14 4-byte record(s).
002FB00D: Civ 0: F7b: Skipped 14 2-byte record(s).
002FB02D: Civ 0: F8a: List has 0 4-byte records.
002FB031: Civ 0: F8b: List has 0 2-byte records.
002FB035: Civ 0: F9a: List has 0 4-byte records.
002FB039: Civ 0: F9b: List has 0 2-byte records.
002FB03D: Civ 0: F10a: List has 0 4-byte records.
002FB041: Civ 0: F10b: List has 0 2-byte records.
002FB045: Civ 0: F11a: Skipped 8 4-byte record(s).
002FB069: Civ 0: F11b: Skipped 8 2-byte record(s).
002FB07D: Civ 0: G1a: List has 0 2-byte records.
002FB081: Civ 0: G1b: List has 0 4-byte records.
002FB085: Civ 0: G2a: Skipped 6 2-byte record(s).
002FB095: Civ 0: G2b: Skipped 6 4-byte record(s).
002FB0B1: Civ 0: H: List has 0 4-byte records.
002FB0B5: Civ 0: H: List has 0 4-byte records.
002FB0B9: Civ 0: H: List has 0 4-byte records.
002FB0BD: Civ 0: I1a: Skipped 8 2-byte record(s).
002FB0D1: Civ 0: I1b: Skipped 8 4-byte record(s).
002FB0F5: Civ 0: I2a: List has 0 2-byte records.
002FB0F9: Civ 0: I2b: List has 0 4-byte records.
002FB0FD: Civ 0: I3a: List has 0 2-byte records.
002FB101: Civ 0: I3b: List has 0 4-byte records.
002FB105: Civ 0: I4a: Skipped 4 2-byte record(s).
002FB111: Civ 0: I4b: Skipped 4 4-byte record(s).
002FB125: Civ 0: I5a: Skipped 2 2-byte record(s).
002FB12D: Civ 0: I5b: Skipped 2 4-byte record(s).
002FB139: Civ 0: I6a: List has 0 2-byte records.
002FB13D: Civ 0: I6b: List has 0 4-byte records.
002FB141: Civ 0: I7a: Skipped 2 2-byte record(s).
002FB149: Civ 0: I7b: Skipped 2 4-byte record(s).
002FB155: Civ 0: I8a: List has 0 2-byte records.
002FB159: Civ 0: I8b: List has 0 4-byte records.
002FB15D: Civ 0: I9a: List has 0 2-byte records.
002FB161: Civ 0: I9b: List has 0 4-byte records.
002FB165: Civ 0: J1a: ?? (INT16) = -1
002FB167: Civ 0: J1a: ???? (INT32) = 344
002FB16B: Civ 0: J2a: ?? (INT16) = -1
002FB16D: Civ 0: J2a: ???? (INT32) = 2871255248
002FB171: Civ 0: J3a: ?? (INT16) = -1
002FB173: Civ 0: J3a: ???? (INT32) = 0
002FB177: Civ 0: K1: List has 0 2-byte records.
002FB17B: Civ 0: K2: Skipped 2 2-byte record(s).
002FB183: Civ 0: K3: List has 0 2-byte records.
002FB187: Civ 0: K4: List has 0 2-byte records.
002FB18B: Civ 0: K5: Skipped 1 2-byte record(s).
002FB191: Civ 0: K6: List has 0 2-byte records.
002FB195: Civ 0: K7: List has 0 2-byte records.
002FB199: Civ 0: K8: List has 0 2-byte records.
002FB19D: Civ 0: K9: List has 0 2-byte records.
002FB1A1: Civ 0: K10: Skipped 2 2-byte record(s).
002FB1A9: Civ 0: K11: List has 0 2-byte records.
002FB1AD: Civ 0: K12: List has 0 2-byte records.
002FB1B1: Civ 0: K13: List has 0 2-byte records.
002FB1B5: Civ 0: K14: List has 0 2-byte records.
002FB1B9: Civ 0: K15: List has 0 2-byte records.
002FB1BD: Civ 0: L1a: List has 0 2-byte records.
002FB1C1: Civ 0: L1b: List has 0 4-byte records.
002FB1C5: Civ 0: L2a: Skipped 6 2-byte record(s).
002FB1D5: Civ 0: L2b: Skipped 6 4-byte record(s).
002FB1F1: Civ 0: L3a: Skipped 6 2-byte record(s).
002FB201: Civ 0: L3b: Skipped 6 4-byte record(s).
002FB21D: Civ 0: L4a: Skipped 6 2-byte record(s).
002FB22D: Civ 0: L4b: Skipped 6 4-byte record(s).
002FB249: Civ 0: L5a: List has 0 2-byte records.
002FB24D: Civ 0: L5b: List has 0 4-byte records.
002FB251: Civ 0: L6a: Skipped 6 2-byte record(s).
002FB261: Civ 0: L6b: Skipped 6 4-byte record(s).
002FB27D: Civ 0: L7a: List has 0 2-byte records.
002FB281: Civ 0: L7b: List has 0 4-byte records.
002FB285: Civ 0: L8a: List has 0 2-byte records.
002FB289: Civ 0: L8b: List has 0 4-byte records.
002FB28D: Civ 0: ???? (int32) = 0
002FB291: Civ 0: ???? (int32) = 0
002FB295: Civ 0: ???? (int32) = 0
002FB299: Civ 0: ???? (int32) = 0
002FB29D: Civ 0: M1: List has 0 8-byte records.
002FB2A1: Civ 0: M2a: List has 0 8-byte records.
002FB2A5: Civ 0: M2b: List has 0 4-byte records.
002FB2A9: Civ 0: M2c: Skipped 1 8-byte record(s).
002FB2B5: Civ 0: Na: Skipped 1 2-byte record(s).
002FB2BB: Civ 0: Nb: Skipped 1 4-byte record(s).
002FB2C3: Civ 0: Nc: Skipped 1 2-byte record(s).
002FB2C9: Civ 0: O1: Skipped 1 1-byte record(s).
002FB2CE: Civ 0: O2: Skipped 1 1-byte record(s).
002FB2D3: Civ 0: O3: Skipped 1 1-byte record(s).
002FB2D8: Civ 0: O4: Skipped 1 1-byte record(s).
002FB2DD: Civ 0: P1: Skipped 1 2-byte record(s).
002FB2E3: Civ 0: P2: Skipped 1 2-byte record(s).
002FB2E9: Civ 0: Q: List has 0 12-byte records.
002FB2ED: Civ 0: R: List has 0 10-byte records.
002FB2F1: Civ 0: S1a: ???? (int32) = -1
002FB2F5: Civ 0: S1b: ?? (int16) = -1
002FB2F7: Civ 0: S2a: ???? (int32) = 147033212
002FB2FB: Civ 0: S2b: ?? (int16) = -1
002FB2FD: Civ 0: S3a: ???? (int32) = -1
002FB301: Civ 0: S3b: ?? (int16) = -1
002FB303: Civ 0: Skipping the last 137 bytes.
002FB303 : 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 :
002FB313 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
002FB323 : 00 00 00 00 00 00 00 00 00 0D 00 01 00 01 00 01 :
002FB333 : 00 01 00 0F 00 00 00 01 00 0F 00 0F 00 00 00 00 :
002FB343 : 00 00 00 00 00 00 00 02 00 0F 00 0F 00 0F 00 0F :
002FB353 : 00 0F 00 0F 00 00 00 00 00 00 00 00 00 00 00 00 :
002FB363 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
002FB373 : 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF :
002FB383 : FF 00 00 00 00 FF FF FF FF 00 00 01 00 00 00 1B :
002FB393 : 00 53 55 42 54 45 52 52 41 4E 45 41 4E 5F 41 4E :  SUBTERRANEAN_AN

Hex dump of the next struct:

002FB38C : 00 00 01 00 00 00 1B 00 53 55 42 54 45 52 52 41 :         SUBTERRA
002FB39C : 4E 45 41 4E 5F 41 4E 49 4D 41 4C 5F 50 45 4F 50 : NEAN_ANIMAL_PEOP
002FB3AC : 4C 45 53 19 00 4B 00 02 00 00 00 00 00 00 11 01 : LES
002FB3BC : 00 00 00 00 0C 00 00 00 13 00 23 00 23 00 24 00 :
002FB3CC : 24 00 25 00 25 00 23 00 23 00 25 00 25 00 23 00 :
002FB3DC : 0C 00 00 00 A6 00 00 00 8B 00 00 00 8B 00 00 00 :
002FB3EC : 9D 00 00 00 9D 00 00 00 9A 00 00 00 9A 00 00 00 :
002FB3FC : 94 00 00 00 94 00 00 00 95 00 00 00 95 00 00 00 :
002FB40C : 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
002FB41C : 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 00 :
002FB42C : A4 01 A4 01 A4 01 A4 01 A4 01 15 00 15 00 17 00 :
002FB43C : 17 00 16 00 16 00 16 00 16 00 19 00 16 00 19 00 :
002FB44C : 16 00 11 00 00 00 48 00 00 00 49 00 00 00 4C 00 :
002FB45C : 00 00 4D 00 00 00 4E 00 00 00 8F 00 00 00 8F 00 :
002FB46C : 00 00 8B 00 00 00 8B 00 00 00 9D 00 00 00 9D 00 :
002FB47C : 00 00 9A 00 00 00 9A 00 00 00 95 00 00 00 95 00 :
002FB48C : 00 00 95 00 00 00 95 00 00 00 00 00 00 00 00 00 :
002FB49C : 00 00 05 00 00 00 A4 01 A4 01 A4 01 A4 01 A4 01 :
002FB4AC : 05 00 00 00 48 00 00 00 49 00 00 00 4C 00 00 00 :
002FB4BC : 4D 00 00 00 4E 00 00 00 0C 00 00 00 23 00 25 00 :

And here's what happens as soon as it hits something besides SUBTERRANEAN_ANIMAL_PEOPLES:

Civ def (783/2069):
0051B017: Entity type? (INT16) = 0
0051B019: Civ 782: Civ ID (int32) = 782
0051B01D: Civ 782: Entity class = MOUNTAIN
0051B027: Civ 782: ?? (int16) = 65535
0051B029: Civ 782: ?? (int16) = 27
0051B02B: Civ 782: Next civ ID (int32) = 783
0051B02F: Civ 782: ?? (int16) = 0
0051B031: Civ 782: Has name (byte) = 1
0051B032: Civ 782: Given name is blank.
0051B034: Civ 782: Nickname is blank.
0051B036: Civ 782: Name word data:
--------:  * The X: Singular Noun form of word #681 (RIM).
--------:  * Of X: Present Participle form of word #2065 (DWELL).
--------:  * LanguageIndex = 0 (DWARF).
--------:  * Unknown = 2
0051B066: Civ 782: Creature type? (int16) = 226 (DWARF)
0051B068: Civ 782: ?? (int16?) = 0
0051B06A: Civ 782: ?? (int16?) = 0
0051B06C: Civ 782: A1a: Skipped 34 2-byte record(s).
0051B0B4: Civ 782: A1b: Skipped 34 4-byte record(s).
0051B140: Civ 782: A2a: Skipped 1 2-byte record(s).
0051B146: Civ 782: A2b: Skipped 1 4-byte record(s).
0051B14E: Civ 782: A3a: Skipped 2 2-byte record(s).
0051B156: Civ 782: A3b: Skipped 2 4-byte record(s).
0051B162: Civ 782: A4a: Skipped 3 2-byte record(s).
0051B16C: Civ 782: A4b: Skipped 3 4-byte record(s).
0051B17C: Civ 782: A5a: Skipped 192 2-byte record(s).
0051B300: Civ 782: A5b: Skipped 192 4-byte record(s).
0051B604: Civ 782: A6a: List has 0 2-byte records.
0051B608: Civ 782: A6b: List has 0 4-byte records.
0051B60C: Civ 782: A7a: Skipped 8 2-byte record(s).
0051B620: Civ 782: A7b: Skipped 8 4-byte record(s).
0051B644: Civ 782: A8a: Skipped 54 2-byte record(s).
0051B6B4: Civ 782: A8b: Skipped 54 4-byte record(s).
0051B790: Civ 782: A9a: Skipped 34 2-byte record(s).
0051B7D8: Civ 782: A9b: Skipped 34 4-byte record(s).
0051B864: Civ 782: A10a: Skipped 34 2-byte record(s).
0051B8AC: Civ 782: A10b: Skipped 34 4-byte record(s).
0051B938: Civ 782: A11a: Skipped 4 2-byte record(s).
0051B944: Civ 782: A11b: Skipped 4 4-byte record(s).
0051B958: Civ 782: A12a: Skipped 3 2-byte record(s).
0051B962: Civ 782: A12b: Skipped 3 4-byte record(s).
0051B972: Civ 782: A13a: Skipped 11 2-byte record(s).
0051B98C: Civ 782: A13b: Skipped 11 4-byte record(s).
0051B9BC: Civ 782: A14a: Skipped 4 2-byte record(s).
0051B9C8: Civ 782: A14b: Skipped 4 4-byte record(s).
0051B9DC: Civ 782: A15a: Skipped 72 2-byte record(s).
0051BA70: Civ 782: A15b: Skipped 72 4-byte record(s).
0051BB94: Civ 782: A16a: Skipped 308 2-byte record(s).
0051BE00: Civ 782: A16b: Skipped 308 4-byte record(s).
0051C2D4: Civ 782: B1a: Skipped 4 4-byte record(s).
0051C2E8: Civ 782: B1b: Skipped 4 2-byte record(s).
0051C2F4: Civ 782: B2a: Skipped 10 4-byte record(s).
0051C320: Civ 782: B2b: Skipped 10 2-byte record(s).
0051C338: Civ 782: C1a: List has 0 2-byte records.
0051C33C: Civ 782: C1b: List has 0 4-byte records.
0051C340: Civ 782: C2a: Skipped 5 2-byte record(s).
0051C34E: Civ 782: C2b: Skipped 5 4-byte record(s).
0051C366: Civ 782: D1: Skipped 5 2-byte record(s).
0051C374: Civ 782: D2: Skipped 5 2-byte record(s).
0051C382: Civ 782: D3: Skipped 5 2-byte record(s).
0051C390: Civ 782: E: Skipped 5 4-byte record(s).
0051C3A8: Civ 782: F7a: Skipped 43 4-byte record(s).
0051C458: Civ 782: F7b: Skipped 43 2-byte record(s).
0051C4B2: Civ 782: F8a: List has 0 4-byte records.
0051C4B6: Civ 782: F8b: List has 0 2-byte records.
0051C4BA: Civ 782: F9a: Skipped 9 4-byte record(s).
0051C4E2: Civ 782: F9b: Skipped 9 2-byte record(s).
0051C4F8: Civ 782: F10a: Skipped 6 4-byte record(s).
0051C514: Civ 782: F10b: Skipped 6 2-byte record(s).
0051C524: Civ 782: F11a: Skipped 2 4-byte record(s).
0051C530: Civ 782: F11b: Skipped 2 2-byte record(s).
0051C538: Civ 782: G1a: List has 0 2-byte records.
0051C53C: Civ 782: G1b: List has 0 4-byte records.
0051C540: Civ 782: G2a: Skipped 8 2-byte record(s).
0051C554: Civ 782: G2b: Skipped 8 4-byte record(s).
0051C578: Civ 782: H: Skipped 22 4-byte record(s).
0051C5D4: Civ 782: H: Skipped 37 4-byte record(s).
0051C66C: Civ 782: H: Skipped 70 4-byte record(s).
0051C788: Civ 782: I1a: Skipped 31 2-byte record(s).
0051C7CA: Civ 782: I1b: Skipped 31 4-byte record(s).
0051C84A: Civ 782: I2a: List has 0 2-byte records.
0051C84E: Civ 782: I2b: List has 0 4-byte records.
0051C852: Civ 782: I3a: List has 0 2-byte records.
0051C856: Civ 782: I3b: List has 0 4-byte records.
0051C85A: Civ 782: I4a: Skipped 1 2-byte record(s).
0051C860: Civ 782: I4b: Skipped 1 4-byte record(s).
0051C868: Civ 782: I5a: Skipped 19 2-byte record(s).
0051C892: Civ 782: I5b: Skipped 19 4-byte record(s).
0051C8E2: Civ 782: I6a: List has 0 2-byte records.
0051C8E6: Civ 782: I6b: List has 0 4-byte records.
0051C8EA: Civ 782: I7a: Skipped 1 2-byte record(s).
0051C8F0: Civ 782: I7b: Skipped 1 4-byte record(s).
0051C8F8: Civ 782: I8a: Skipped 3 2-byte record(s).
0051C902: Civ 782: I8b: Skipped 3 4-byte record(s).
0051C912: Civ 782: I9a: Skipped 4 2-byte record(s).
0051C91E: Civ 782: I9b: Skipped 4 4-byte record(s).
0051C932: Civ 782: J1a: ?? (INT16) = -1
0051C934: Civ 782: J1a: ???? (INT32) = 49
0051C938: Civ 782: J2a: ?? (INT16) = -1
0051C93A: Civ 782: J2a: ???? (INT32) = 49
0051C93E: Civ 782: J3a: ?? (INT16) = -1
0051C940: Civ 782: J3a: ???? (INT32) = 48
0051C944: Civ 782: K1: Skipped 1 2-byte record(s).
0051C94A: Civ 782: K2: Skipped 6 2-byte record(s).
0051C95A: Civ 782: K3: Skipped 3 2-byte record(s).
0051C964: Civ 782: K4: Skipped 10 2-byte record(s).
0051C97C: Civ 782: K5: Skipped 1 2-byte record(s).
0051C982: Civ 782: K6: Skipped 3 2-byte record(s).
0051C98C: Civ 782: K7: Skipped 3 2-byte record(s).
0051C996: Civ 782: K8: Skipped 4 2-byte record(s).
0051C9A2: Civ 782: K9: Skipped 3 2-byte record(s).
0051C9AC: Civ 782: K10: Skipped 2 2-byte record(s).
0051C9B4: Civ 782: K11: Skipped 5 2-byte record(s).
0051C9C2: Civ 782: K12: Skipped 5 2-byte record(s).
0051C9D0: Civ 782: K13: Skipped 5 2-byte record(s).
0051C9DE: Civ 782: K14: Skipped 1 2-byte record(s).
0051C9E4: Civ 782: K15: Skipped 4 2-byte record(s).
0051C9F0: Civ 782: L1a: Skipped 5 2-byte record(s).
0051C9FE: Civ 782: L1b: Skipped 5 4-byte record(s).
0051CA16: Civ 782: L2a: Skipped 6 2-byte record(s).
0051CA26: Civ 782: L2b: Skipped 6 4-byte record(s).
0051CA42: Civ 782: L3a: Skipped 5 2-byte record(s).
0051CA50: Civ 782: L3b: Skipped 5 4-byte record(s).
0051CA68: Civ 782: L4a: Skipped 6 2-byte record(s).
0051CA78: Civ 782: L4b: Skipped 6 4-byte record(s).
0051CA94: Civ 782: L5a: Skipped 6 2-byte record(s).
0051CAA4: Civ 782: L5b: Skipped 6 4-byte record(s).
0051CAC0: Civ 782: L6a: Skipped 5 2-byte record(s).
0051CACE: Civ 782: L6b: Skipped 5 4-byte record(s).
0051CAE6: Civ 782: L7a: Skipped 2 2-byte record(s).
0051CAEE: Civ 782: L7b: Skipped 2 4-byte record(s).
0051CAFA: Civ 782: L8a: List has 0 2-byte records.
0051CAFE: Civ 782: L8b: List has 0 4-byte records.
0051CB02: Civ 782: ???? (int32) = 0
0051CB06: Civ 782: ???? (int32) = 0
0051CB0A: Civ 782: ???? (int32) = 0
0051CB0E: Civ 782: ???? (int32) = 0
0051CB12: Civ 782: M1: Skipped 2 8-byte record(s).
0051CB26: Civ 782: M2a: Skipped 1 8-byte record(s).
0051CB32: Civ 782: M2b: Skipped 7 4-byte record(s).
0051CB52: Civ 782: M2c: Skipped 1 8-byte record(s).
0051CB5E: Civ 782: Na: Skipped 1 2-byte record(s).
0051CB64: Civ 782: Nb: Skipped 1 4-byte record(s).
0051CB6C: Civ 782: Nc: Skipped 1 2-byte record(s).
0051CB72: Civ 782: O1: Skipped 1 1-byte record(s).
0051CB77: Civ 782: O2: Skipped 1 1-byte record(s).
0051CB7C: Civ 782: O3: Skipped 1 1-byte record(s).
0051CB81: Civ 782: O4: Skipped 1 1-byte record(s).
0051CB86: Civ 782: P1: Skipped 1 2-byte record(s).
0051CB8C: Civ 782: P2: Skipped 1 2-byte record(s).
0051CB92: Civ 782: Q: Skipped 1 12-byte record(s).
0051CBA2: Civ 782: R: Skipped 1 10-byte record(s).
0051CBB0: Civ 782: S1a: ???? (int32) = 1
0051CBB4: Civ 782: S1b: ?? (int16) = 282
0051CBB6: Civ 782: S2a: ???? (int32) = 327679
0051CBBA: Civ 782: S2b: ?? (int16) = -1
0051CBBC: Civ 782: S3a: ???? (int32) = -1
0051CBC0: Civ 782: S3b: ?? (int16) = -1
0051CBC2: Civ 782: Skipping the last 137 bytes.
0051CBC2 : 10 00 00 00 00 00 01 00 00 00 1C 00 01 00 00 00 :
0051CBD2 : 00 00 01 00 00 00 01 FF FF FF 01 00 00 00 1A 01 :
0051CBE2 : FF FF 04 00 FF FF FF FF FF FF FF FF 10 00 00 00 :
0051CBF2 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CC02 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CC12 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CC22 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CC32 : 00 00 00 00 01 00 00 00 FF FF FF FF FF FF 31 00 :
0051CC42 : 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 03 00 :
0051CC52 : 00 00 57 00 00 00 2D 01 00 00 62 01 00 00 03 00 :

0051CC4B: Warning: Next civ ID appears to be 50331648 (expecting 783)!

0051CC51 : 00 00 00 57 00 00 00 2D 01 00 00 62 01 00 00 03 :
0051CC61 : 00 00 00 00 00 00 0A 00 00 00 0D 04 00 00 0C 04 :
0051CC71 : 00 00 0B 04 00 00 0A 04 00 00 09 04 00 00 08 04 :
0051CC81 : 00 00 07 04 00 00 06 04 00 00 05 04 00 00 04 04 :
0051CC91 : 00 00 0A 00 00 00 C8 00 00 00 00 00 00 00 00 00 :
0051CCA1 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CCB1 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CCC1 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :
0051CCD1 : 0E 00 07 00 01 00 01 00 01 00 0F 00 0F 00 0F 00 :
0051CCE1 : 0F 00 0E 00 0E 00 02 00 0C 00 0C 00 0C 00 0C 00 :
0051CCF1 : 0E 00 0F 00 0F 00 0A 00 09 00 01 00 06 00 00 00 :
0051CD01 : 07 00 4D 4F 4E 41 52 43 48 00 00 00 00 04 00 00 :   MONARCH
0051CD11 : 00 C5 BF F7 0F 00 00 00 00 00 00 00 00 00 00 00 :
0051CD21 : 00 00 00 00 00 04 00 6B 69 6E 67 05 00 6B 69 6E :        king  kin
0051CD31 : 67 73 05 00 71 75 65 65 6E 06 00 71 75 65 65 6E : gs  queen  queen
0051CD41 : 73 04 00 6B 69 6E 67 05 00 6B 69 6E 67 73 0C 00 : s  king  kings  
0051CD51 : 6B 69 6E 67 20 63 6F 6E 73 6F 72 74 0D 00 6B 69 : king consort  ki
0051CD61 : 6E 67 73 20 63 6F 6E 73 6F 72 74 0D 00 71 75 65 : ngs consort  que
0051CD71 : 65 6E 20 63 6F 6E 73 6F 72 74 0E 00 71 75 65 65 : en consort  quee
0051CD81 : 6E 73 20 63 6F 6E 73 6F 72 74 0C 00 6B 69 6E 67 : ns consort  king

So... yeah.

Entity POSITION defs[edit]

To be documented.


Region data[edit]

After the last entity def comes the region data, which is divided into blocks.

REGION SAVE block[edit]

This structure appears unchanged from its 40d version.

Type Name Description
string magic Always "*START REGION SAVE*"
byte 1
int16 0
int32 1
int32 0
int32 0
byte has_name If this is 1, a name struct immediately follows.
REGION DIM SAVE block[edit]

This structure immediately follows the REGION SAVE block, and defines the dimensions of the world map. It also appears to be unchanged from its 40d version.

Type Name Description
string magic Always "*START REGION DIM SAVE*"
int16 region_width
int16 region_height
int32 ?
int16 ?
int32 ?
int16 ?
REGION MAP SAVE block[edit]

This structure immediately follows the REGION DIM SAVE block.

Type Name Description
string magic Always "*START REGION MAP SAVE*"
byte has_block_info If this is 1, an array of block_info structs follows
Block info array[edit]

The number of elements in the array is always equal to (region_width * region_height).

Type Name Description
int32 Always 3? Might be the length value for a byte-list.
byte ?
byte ?
byte ?
int16 elevation
int16 rainfall Appears to be a percentage.
int16 vegetation
int16 temperature This is in worldgen temperature units, not in Urists. Values may be negative.
int16 evil
int16 drainage Appears to be a percentage.
int16 volcanism Appears to be a percentage.
int16 savagery Appears to be a percentage.
int16 ??
int32 ??
int32 ??
int16 ??
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 ??

Field names based on info from Mimos.

Minimap array[edit]

The following struct is repeated 8 times, but the last 7 have their minimap_data filled with zeroes.

Type Name Description
byte has_minimap If this is 1, minimap data follows
[???] minimap_data Size is always (((region_width DIV 16) + 1) * (((region_height DIV 16) + 1) * 4) bytes
Unknown data[edit]
Type Name Description
int32 ????
int32 Always 1?

A List struct immediately follows; each entry has the following form:

Type Name Description
int32 index Starts at 0, increases with each subsequent record.
int32 b Always 1?
byte c Always 0?
int32 d Always -1?
int32 e Always -1?
int32 f ????
int32 g Always -1?
int32 h Always -1?
int32 i ????
int32 j Seems to be -1 unless (f = -1)
int32 k 0
int32 l Seems to be 0 unless (j = -1)
int32 m 0
int16 n ??
int32 o ????
int16 p ??
int32 q ????


REGION GEOLOGY SAVE block[edit]

This structure immediately follows the REGION MAP SAVE block.

Type Name Description
string magic Always "*START REGION GEOLOGY SAVE*"

To be documented.