Difference between revisions of "Network Subfiles"
Jump to navigation
Jump to search
sc4e>Jdenm8 |
sc4e>Jdenm8 |
(No difference)
|
Revision as of 01:34, 29 September 2012
This page pertains to the format of the Network Subfiles within the Savegame files. These files have Type IDs 6A0F82B2 (Network Index), C9C05C6E (Network Subfile 1) and CA16374F (Network Subfile 2). They can be viewed using the SC4 Savegame Explorer, but not edited. These subfiles were decoded by RippleJet
Contents
Network Index Subfile (6A0F82B2)
Description
This index file contains a list of all network tiles, with links to the two network files where the records can be found.
Structure
Body
DWORD Subfile Size in bytes DWORD CRC DWORD Memory address WORD Major Version (0x0007 for built cities, but 0x0003 for Maxis' own, unbuilt cities) DWORD City Tile Count (4096, 16384 or 65536 depending on city size) DWORD Count of Network Tiles (0 for a new city) DWORD Tile Number (See Appendix 1) DWORD Link: Memory address DWORD Link: Subfile Type ID DWORD Count of blocks (either 0 or 10) DWORD Block Number (first one is 0, last one is 9) DWORD Count (anything between 0-16. Number of byte blocks) BYTE×8 Unknown block of bytes. Small numbers < 10 BYTE Unknown (always 0x00) DWORD Unknown (always 0x00000000) DWORD Unknown (Seen 0 and 2) DWORD Unknown (Only seen 2) DWORD Unknown (Seen 0 and 4) FLOAT32 Unknown (Small values, e.g. 0.0, 2.0, 5.0, 6.0, 8.0) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) FLOAT32 Unknown (Small values, e.g. 0.0, 2.0, 5.0, 6.0, 8.0) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) FLOAT32 Unknown (Small values, e.g. 0.0, 2.0, 5.0, 6.0, 8.0) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) FLOAT32 Unknown (Small values, e.g. 0.0, 2.0, 5.0, 6.0, 8.0) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (0 or 1) WORD Unknown (always 0) DWORD Unknown (always 2) DWORD Unknown (always 1) FLOAT32 Unknown (Small values, < 1.0) WORD Unknown (always 0) WORD Unknown (always 2) WORD Unknown (always 0) FLOAT32 Unknown (0.0 or 1.0) WORD Unknown (always 0) DWORD Count of blocks (0 for a new city) DWORD Link: Memory address DWORD Link: Subfile Type ID BYTE Unknown (only seen 0x00) DWORD Unknown (only seen 0x00000000) DWORD Unknown (Either 0, 1, 2 or 3) BOOLEAN Unknown (Either 0 or 1, false or true) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) DWORD Unknown (Either 0, 1, 2 or 3) BOOLEAN Unknown (Either 0 or 1, false or true) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) DWORD Unknown (Either 0, 1, 2 or 3) BOOLEAN Unknown (Either 0 or 1, false or true) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) DWORD Unknown (Either 0, 1, 2 or 3) BOOLEAN Unknown (Either 0 or 1, false or true) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) FLOAT32 Unknown (small value) DWORD Unknown (only seen 0x00000000) DWORD Unknown (only seen 0x00000000) DWORD Unknown (only seen 0x00000000) DWORD Tile X (63, 127 or 255 for a new city, smaller for built up cities) DWORD Tile Z (63, 127 or 255 for a new city, smaller for built up cities) FLOAT32 Unknown (Small value. 0.00 for a new city) BOOLEAN Unknown (always 1, true) FLOAT32 Unknown (Small value. 0.00 for a new city) BOOLEAN Unknown (always 1, true) DWORD Unknown (Does not appear if version = 0x0003. Always 0x00000000 if version = 0x0007)
Appendix 1
Tile numbering starts in the NW corner, which is tile number 0x00000000. Tile number 0x00000001 is to the east of that tile. In a small city, the first tile in the second row is 0x00000040. In a medium city, the first tile in the second row is 0x00000080. In a large city, the first tile in the second row is 0x00000100. In a small city, the last tile in the last row is 0x00000FFF. In a medium city, the last tile in the last row is 0x00003FFF. In a large city, the last tile in the last row is 0x0000FFFF.
Network Subfile 1 (C9C05C6E)
Structure
DWORD Record Size DWORD CRC DWORD Memory WORD Version Major (0x0002) WORD Version Minor (0x0003) WORD Zot Bytes (Always 0x0000) BYTE 0x00 BYTE Appearance Flag (Always 0x05) (See Appendix 2 in this section for more information) DWORD 0xC772BF98 (always the same) BYTE Min Tract X Coordinate (normally between 0x40 and 0x7F) BYTE Min Tract Z Coordinate (normally between 0x40 and 0x7F) BYTE Max Tract X Coordinate (normally between 0x40 and 0x7F) BYTE Max Tract Z Coordinate (normally between 0x40 and 0x7F) WORD X Tract Size (power of 2) (only seen 0x0002 ... 2² = 4 tiles) WORD Z Tract Size (power of 2) (only seen 0x0002 ... 2² = 4 tiles) DWORD Count of Properties (I've only seen 0x00000000) SGPROP SaveGame Properties, repeated Count times (See Appendix 1 in this section for more information) DWORD Group ID (always 0x00000000) DWORD Type ID (always 0x00000000) DWORD Instance ID (always 0x00000000) BYTE Unknown Flag (0 or 1) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Xmax FLOAT32 Ymax FLOAT32 Zmax FLOAT32 Xmin FLOAT32 Ymin FLOAT32 Zmin FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0) DWORD Unknown (Normally 0xFFDDDBDE) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 1) DWORD Unknown (Always 0xFFDDDBDE) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 1) DWORD Unknown (Always 0xFFDDDBDE) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 0) DWORD Unknown (Always 0xFFDDDBDE) DWORD TextureID / PathID BYTES×5 Unknown (Small values) BYTE Orientation (See Appendix 3 in this section for more information) BYTES×3 Unknown (Small values) BYTE Network Type (See Appendix 4 in this section for more information) BYTE Connection, West (See Appendix 5 in this section for more information) BYTE Connection, North (See Appendix 5 in this section for more information) BYTE Connection, East (See Appendix 5 in this section for more information) BYTE Connection, South (See Appendix 5 in this section for more information) BYTES×4 Unknown (Small values) FLOAT32 Xmin FLOAT32 Xmax FLOAT32 Ymin FLOAT32 Ymax FLOAT32 Zmin FLOAT32 Zmax BYTE Unknown (1 or 2) BYTE Unknown (Always 160) BYTE Unknown (Always 0) BYTE Unknown (Often 22) DWORD×4 Unknown (All 0) DWORD Unknown (Always 2) DWORD Unknown (0x00000000)
Appendix 1
Structure of SGPROP (SaveGame Properties): DWORD Property Name Value DWORD Property Name Value (doubled for some unknown reason) DWORD 0x00000000 BYTE Data Type, 01=UInt8, 02=UInt16, 03=UInt32, 07=SInt32, 08=SInt64, 09=Float32, 0B=Boolean BYTE KeyType, 0x00 = 0 reps, 0x80 = more than 0 reps WORD 0x0000 DWORD Rep Count (this one appears only if KeyType = 0x80) DATA Property Value (repeated Rep Count times, type according to Data Type)
Appendix 2
Apperance Flag (offset 0x0013) 0x01 (00000001b) - Network that appears in the game (if this is off, the network has been deleted) 0x02 (00000010b) - ? (unused) 0x04 (00000100b) - ? (always on) 0x08 (00001000b) - ? (unused) 0x40 (01000000b) - The network is burnt 0x80 (10000000b) - ? (unused)
Appendix 3
Orientation 0x00 = North 0x01 = East 0x02 = South 0x03 = West 0x80 = North, mirrored 0x81 = East, mirrored 0x82 = South, mirrored 0x83 = West, mirrored
Appendix 4
Network Type 0x00 = ? 0x01 = ? 0x02 = ? 0x03 = ? 0x04 = ? 0x05 = ? 0x06 = ? 0x07 = ?
Appendix 5
Connections ??
Network Subfile 2 (CA16374F)
Structure
DWORD Record Size DWORD CRC DWORD Memory WORD Version Major (0x0002) WORD Version Minor (0x0003) WORD Version ? (0x0008) WORD Version ? (0x0004) WORD Zot Bytes (Always 0x0000) BYTE 0x00 BYTE Appearance Flag (Always 0x05) (2 DWORD 0xC772BF98 (always the same) BYTE Min Tract X Coordinate (normally between 0x40 and 0x7F) BYTE Min Tract Z Coordinate (normally between 0x40 and 0x7F) BYTE Max Tract X Coordinate (normally between 0x40 and 0x7F) BYTE Max Tract Z Coordinate (normally between 0x40 and 0x7F) WORD X Tract Size (power of 2) (only seen 0x0002 ... 2² = 4 tiles) WORD Z Tract Size (power of 2) (only seen 0x0002 ... 2² = 4 tiles) DWORD Count of Properties (I've only seen 0x00000000) SGPROP SaveGame Properties, repeated Count times (1 DWORD Group ID (always 0x00000000) DWORD Type ID (always 0x00000000) DWORD Instance ID (always 0x00000000) BYTE Unknown (Always 0x05) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0, -1 or 1) FLOAT32 Xmax FLOAT32 Ymax FLOAT32 Zmax FLOAT32 Xmin FLOAT32 Ymin FLOAT32 Zmin FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 0) DWORD Unknown (Always 0xFF000000) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0) FLOAT32 Unknown (Normally 1) DWORD Unknown (Always 0xFF000000) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 1) DWORD Unknown (Always 0xFF000000) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 1) FLOAT32 Unknown (Normally 0) DWORD Unknown (Always 0xFF000000) DWORD TextureID / PathID BYTES×5 Unknown (Small values) BYTE Orientation (3 BYTES×3 Unknown (Small values) BYTE Network Type (4 BYTE Connection, West (5 BYTE Connection, North (5 BYTE Connection, East (5 BYTE Connection, South (5 BYTES×4 Unknown (Small values) FLOAT32 Xmin FLOAT32 Xmax FLOAT32 Ymin FLOAT32 Ymax FLOAT32 Zmin FLOAT32 Zmax BYTE Unknown (Always 128) BYTE Unknown (Always 32) BYTE Unknown (Always 0) BYTE Unknown (Seen 16-21) DWORD×4 Unknown (All 0) DWORD Unknown (Always 50) DWORD Unknown (0x00000000) WORD Unknown (0x0000) FLOAT32 Unknown (Normally 1) DWORD Number of extra blocks (0, 1, 2 or 3) DWORD Count (Either 0 or 4. Each block is 24 FLOATS, total 96 BYTES) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0, 0.75 or 1) FLOAT32 Unknown (Normally 0, 0.75 or 1) DWORD Unknown (Either 0x80FFFFFF or 0xFFFFFFFF) DWORD Count (Either 0 or 4. Each block is 24 FLOATS, total 96 BYTES) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0, 0.75 or 1) FLOAT32 Unknown (Normally 0, 0.75 or 1) DWORD Unknown (Either 0x80FFFFFF or 0xFFFFFFFF) DWORD Count (Either 0 or 4. Each block is 24 FLOATS, total 96 BYTES) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0, 0.75 or 1) FLOAT32 Unknown (Normally 0, 0.75 or 1) DWORD Unknown (Either 0x80FFFFFF or 0xFFFFFFFF) DWORD Count (Either 0 or 4. Each block is 24 FLOATS, total 96 BYTES) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0, 0.75 or 1) FLOAT32 Unknown (Normally 0, 0.75 or 1) DWORD Unknown (Either 0x80FFFFFF or 0xFFFFFFFF) DWORD Count (Always 4. Each block is 24 FLOATS, total 96 BYTES) FLOAT32 X Coordinate FLOAT32 Y Coordinate FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0, 0.75 or 1) FLOAT32 Unknown (Normally 0, 0.75 or 1) DWORD Unknown (Either 0x80FFFFFF or 0xFFFFFFFF) DWORD Unknown (Always 0x00000000) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 X Coordinate FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Y Coordinate FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Z Coordinate FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) FLOAT32 Unknown (Normally 0 or 1) DWORD Unknown (Small value, e.g. 62, 63) DWORD Unknown (Small value, e.g. 36, 38) BOOLEAN Unknown (Always 0) BOOLEAN Unknown (Either 0 or 1, false or true) BOOLEAN Unknown (Either 0 or 1, false or true) FLOAT32 Y Coordinate FLOAT32 Y Coordinate FLOAT32 Y Coordinate FLOAT32 Y Coordinate FLOAT32 Y Coordinate DWORD 0xCA16374F (Subfile ID) DWORD 0x00000000 (always the same) 1) Structure of SGPROP (SaveGame Properties): DWORD Property Name Value DWORD Property Name Value (doubled for some unknown reason) DWORD 0x00000000 BYTE Data Type, 01=UInt8, 02=UInt16, 03=UInt32, 07=SInt32, 08=SInt64, 09=Float32, 0B=Boolean BYTE KeyType, 0x00 = 0 reps, 0x80 = more than 0 reps WORD 0x0000 DWORD Rep Count (this one appears only if KeyType = 0x80) DATA Property Value (repeated Rep Count times, type according to Data Type) 2) Apperance Flag (offset 0x0017) 0x01 (00000001b) - Network that appears in the game (if this is off, the network has been deleted) 0x02 (00000010b) - ? (unused) 0x04 (00000100b) - ? (always on) 0x08 (00001000b) - ? (unused) 0x40 (01000000b) - The network is burnt 0x80 (10000000b) - ? (unused) 3) Orientation 0x00 = North 0x01 = East 0x02 = South 0x03 = West 0x80 = North, mirrored 0x81 = East, mirrored 0x82 = south, mirrored 0x83 = West, mirrored 4) Network Type 0x00 = ? 0x01 = ? 0x02 = ? 0x03 = ? 0x04 = ? 0x05 = ? 0x06 = ? 0x07 = ? 5) Connections ??
|