Difference between revisions of "Building Subfile"
Jump to navigation
Jump to search
sc4e>CasperVg (Building Subfile, decoded by RippleJet) |
sc4e>CasperVg m (layout change) |
||
Line 72: | Line 72: | ||
A finished building always has a value of 1.00 in this field.</pre> | A finished building always has a value of 1.00 in this field.</pre> | ||
− | + | <h1>Savegame Properties (SGProps)<h1> | |
<pre>0x899AFBAD - Custom Name | <pre>0x899AFBAD - Custom Name | ||
Type: String | Type: String |
Revision as of 11:38, 28 September 2012
This page pertains to the format of the Building Subfile within the Savegame files. This file has Type ID A9BD882D. It can be viewed using the SC4 Savegame Explorer, but not edited. This particular subfile was decoded by RippleJet
Structure
DWORD Size DWORD CRC DWORD Memory WORD Major Version? (only seen 0x0002) WORD Minor Version? (only seen 0x0004) WORD Zot Word (always 0x0000 for buildings) BYTE Unknown (only seen 0x00) BYTE Appearance Flag (** DWORD 0x278128A0 (always the same) BYTE Min Tract X Coordinate BYTE Min Tract Z Coordinate BYTE Max Tract X Coordinate BYTE Max Tract Z Coordinate WORD X Tract Size? (power of 2) (only seen 0x0002) WORD Z Tract Size? (power of 2) (only seen 0x0002) DWORD Count of Properties (can be several of them) SGPROP SaveGame Properties, repeated Count times (* BYTE Unknown (I think I've only seen 0x01) DWORD Group ID (from the Prop Exemplar) DWORD Type ID (from the Prop Exemplar) DWORD Instance ID (from the Prop Exemplar) DWORD Instance ID (the value given when the building appeared) FLOAT32 Min X Coordinate FLOAT32 Min Y Coordinate FLOAT32 Min Z Coordinate FLOAT32 Max X Coordinate FLOAT32 Max Y Coordinate FLOAT32 Max Z Coordinate BYTE Orientation FLOAT32 Scaffolding Height (*** *) 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, 0C=String 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) **) Apperance Flag (offset 0x0013) 0x01 (00000001b) - Building that appears in the game (if this is off, the building has been deleted) 0x02 (00000010b) - ? (unused) 0x04 (00000100b) - ? (always on) 0x08 (00001000b) - Flora (not used for buildings) 0x40 (01000000b) - Burnt (probably not used for buildings, as if they burn, they become replaced by a burnt prop) ***) Scaffolding Height Depending on the height of the finished building, it is divided into a number of (let's call it F) fractions. During construction, if the building is growable (or LotConfigPropertyDoConstruction = True), the scaffolding will jump up in steps equal to 1/F of the final height. The height of the current scaffolding is given in this field. Checking several buildings under construction of different heights, I've e.g. found the following values: 1/2, 1/3, 2/3, 3/5, 4/5, 2/7, 4/7, 4/9, 8/17, 7/20 Once the scaffolding enters the height of the final building, this field will get a value of 1.00 A finished building always has a value of 1.00 in this field.