Difference between revisions of "Automata Subfiles"

From SC4D Encyclopaedia
Jump to navigation Jump to search
(→‎Vehicle Automata Subfile (0x896e714a): add path data and another float)
Line 5: Line 5:
 
List of records of the form:
 
List of records of the form:
 
<pre>
 
<pre>
DWORD       Record Size
+
DWORD           Record Size
DWORD       CRC
+
DWORD           CRC
DWORD       Memory address
+
DWORD           Memory address
WORD×3     Version (always 2, 2, 8)
+
WORD×3         Version (always 2, 2, 8)
BYTE       Zot (always 0x04)
+
BYTE           Zot (always 0x04)
DWORD       Unknown (always 0)
+
DWORD           Unknown (always 0)
BYTE       Appearance flag (e.g. 0x10, 0x11, 0x14 or 0x15)
+
BYTE           Appearance flag (e.g. 0x10, 0x11, 0x14 or 0x15)
DWORD       Record type identifier (always 0xc7cc75f1)
+
DWORD           Record type identifier (always 0xc7cc75f1)
BYTE×4     (Min Tract X, Min Tract Z, Max Tract X, Max Tract Z) coordinate
+
BYTE×4         (Min Tract X, Min Tract Z, Max Tract X, Max Tract Z) coordinate
WORD×2     Tract size (X, Z)
+
WORD×2         Tract size (X, Z)
DWORD       Count of properties
+
DWORD           Count of properties
 
     SGPROP      SaveGame Properties, repeated Count times (e.g. Occupant Group property 0xAA1DD396)
 
     SGPROP      SaveGame Properties, repeated Count times (e.g. Occupant Group property 0xAA1DD396)
DWORD×3     (Group=0x096E6739, Type=0x6534284A, Instance)-ID of Exemplar
+
DWORD×3         (Group=0x096E6739, Type=0x6534284A, Instance)-ID of Exemplar
FLOAT32×3   (x, y, z)-coordinate A
+
FLOAT32×3       (x, y, z)-coordinate A
FLOAT32×3   (x, y, z)-coordinate B or (-1, -2, -3)
+
FLOAT32×3       (x, y, z)-coordinate B or (-1, -2, -3)
FLOAT32×3   Direction (a unit vector)
+
FLOAT32×3       Direction (a unit vector)
FLOAT32     Unknown scalar (approximately satisfies: coordinate A + direction * scalar / 2 = coordinate C)
+
FLOAT32         Unknown scalar (approximately satisfies: coordinate A + direction * scalar / 2 = coordinate C)
FLOAT32     Speed in km/s (in range 80..110 km/h defined in Automata Controller)
+
FLOAT32         Speed in km/s (in range 80..110 km/h defined in Automata Controller)
DWORD       Unknown bitset
+
DWORD           Unknown bitset
DWORD       Unknown (always 0)
+
DWORD           Unknown (always 0)
DWORD       Address
+
DWORD           Address
 
     DWORD      Subfile (Automata Attractor subfile) when Address is not 0
 
     DWORD      Subfile (Automata Attractor subfile) when Address is not 0
FLOAT32×5   Unknown (the last three are 0.0 if the attractor is absent, so might be related parameters)
+
FLOAT32×5       Unknown (the last three are 0.0 if the attractor is absent, so might be related parameters)
DWORD       Address
+
DWORD           Address
 
     DWORD      Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
 
     DWORD      Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
DWORD       Count of blocks to follow
+
DWORD           Count of blocks to follow
 
     DWORD      Unknown (seen 0, 7, 13)
 
     DWORD      Unknown (seen 0, 7, 13)
 
     WORD        Unknown (always 0x03)
 
     WORD        Unknown (always 0x03)
 
     DWORD      Address
 
     DWORD      Address
         DWORD       Subfile (Automata Generator or Attractor subfile) when Address is not 0
+
         DWORD   Subfile (Automata Generator or Attractor subfile) when Address is not 0
 
     DWORD      Index of block starting at 0, 1,...
 
     DWORD      Index of block starting at 0, 1,...
 
     FLOAT32    Unknown (-1.0 or large numerical values)
 
     FLOAT32    Unknown (-1.0 or large numerical values)
Line 40: Line 40:
 
     BYTES×5    Unknown (always 0)
 
     BYTES×5    Unknown (always 0)
 
     DWORD      Unknown bitset
 
     DWORD      Unknown bitset
DWORD       Count of auxiliary models
+
DWORD           Count of auxiliary models
 
     DWORD×3    TGI of auxiliary S3D-model (e.g. head lights, rear lights)
 
     DWORD×3    TGI of auxiliary S3D-model (e.g. head lights, rear lights)
DWORD×3     TGI of S3D-model
+
DWORD×3         TGI of S3D-model
DWORD       Instance ID
+
DWORD           Instance ID
DWORD       Count of manager addresses
+
DWORD           Count of manager addresses
 
     DWORD      Address
 
     DWORD      Address
 
     DWORD      Subfile (e.g. City Situation Manager or Automata Controller Manager)
 
     DWORD      Subfile (e.g. City Situation Manager or Automata Controller Manager)
Line 53: Line 53:
 
DWORD          Occupant Group
 
DWORD          Occupant Group
 
DWORD          Address
 
DWORD          Address
     DWORD           Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
+
     DWORD       Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
 
DWORD          Unknown (seen 1, 3, 7)
 
DWORD          Unknown (seen 1, 3, 7)
 
BYTE            Unknown (in range 0...47 -- maybe vehicle lifespan?)
 
BYTE            Unknown (in range 0...47 -- maybe vehicle lifespan?)
 
DWORD          Address of network tile
 
DWORD          Address of network tile
     DWORD           Subfile (e.g. Network Subfile 1, Prebuilt Network Subfile, Bridge Subfile) when Address is not 0
+
     DWORD       Subfile (e.g. Network Subfile 1, Prebuilt Network Subfile, Bridge Subfile) when Address is not 0
 
BYTE            Exit side of path (0,1,2,3 = W,N,E,S)
 
BYTE            Exit side of path (0,1,2,3 = W,N,E,S)
 
BYTE            Entry side of path (0,1,2,3 = W,N,E,S)
 
BYTE            Entry side of path (0,1,2,3 = W,N,E,S)
Line 64: Line 64:
 
DWORD          Unknown (seen 0...40 -- smaller values are much more frequent)
 
DWORD          Unknown (seen 0...40 -- smaller values are much more frequent)
 
DWORD          Count of blocks to follow
 
DWORD          Count of blocks to follow
     BYTE×3         Unknown (seen for Occupant Group Moving Van)
+
     BYTE×3     Unknown (seen for Occupant Group Moving Van)
 
DWORD×2        Unknown (always 0)
 
DWORD×2        Unknown (always 0)
 
FLOAT32×3      (x, y, z)-coordinate C or (-1, -2, -3)
 
FLOAT32×3      (x, y, z)-coordinate C or (-1, -2, -3)

Revision as of 04:38, 12 February 2023

This page pertains to the format of the Automata Subfiles within the Savegame files.

Vehicle Automata Subfile (0x896e714a)

Structure

List of records of the form:

DWORD           Record Size
DWORD           CRC
DWORD           Memory address
WORD×3          Version (always 2, 2, 8)
BYTE            Zot (always 0x04)
DWORD           Unknown (always 0)
BYTE            Appearance flag (e.g. 0x10, 0x11, 0x14 or 0x15)
DWORD           Record type identifier (always 0xc7cc75f1)
BYTE×4          (Min Tract X, Min Tract Z, Max Tract X, Max Tract Z) coordinate
WORD×2          Tract size (X, Z)
DWORD           Count of properties
    SGPROP      SaveGame Properties, repeated Count times (e.g. Occupant Group property 0xAA1DD396)
DWORD×3         (Group=0x096E6739, Type=0x6534284A, Instance)-ID of Exemplar
FLOAT32×3       (x, y, z)-coordinate A
FLOAT32×3       (x, y, z)-coordinate B or (-1, -2, -3)
FLOAT32×3       Direction (a unit vector)
FLOAT32         Unknown scalar (approximately satisfies: coordinate A + direction * scalar / 2 = coordinate C)
FLOAT32         Speed in km/s (in range 80..110 km/h defined in Automata Controller)
DWORD           Unknown bitset
DWORD           Unknown (always 0)
DWORD           Address
    DWORD       Subfile (Automata Attractor subfile) when Address is not 0
FLOAT32×5       Unknown (the last three are 0.0 if the attractor is absent, so might be related parameters)
DWORD           Address
    DWORD       Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
DWORD           Count of blocks to follow
    DWORD       Unknown (seen 0, 7, 13)
    WORD        Unknown (always 0x03)
    DWORD       Address
        DWORD   Subfile (Automata Generator or Attractor subfile) when Address is not 0
    DWORD       Index of block starting at 0, 1,...
    FLOAT32     Unknown (-1.0 or large numerical values)
    DWORD       Unknown (0 or 1)
    BYTES×5     Unknown (always 0)
    DWORD       Unknown bitset
DWORD           Count of auxiliary models
    DWORD×3     TGI of auxiliary S3D-model (e.g. head lights, rear lights)
DWORD×3         TGI of S3D-model
DWORD           Instance ID
DWORD           Count of manager addresses
    DWORD       Address
    DWORD       Subfile (e.g. City Situation Manager or Automata Controller Manager)
FLOAT32         Speed in km/s (can differ from other speeds)
FLOAT32         Speed in km/s (can differ from other speeds)
FLOAT32×6       Unknown (often 0 or 1, but numerical values are possible)
BYTE            Unknown (seen 0, 25, 50, 254)
DWORD           Occupant Group
DWORD           Address
    DWORD       Subfile (e.g. Trailer Vehicle, Ambulance, Bus, Patrol Car) when Address is not 0
DWORD           Unknown (seen 1, 3, 7)
BYTE            Unknown (in range 0...47 -- maybe vehicle lifespan?)
DWORD           Address of network tile
    DWORD       Subfile (e.g. Network Subfile 1, Prebuilt Network Subfile, Bridge Subfile) when Address is not 0
BYTE            Exit side of path (0,1,2,3 = W,N,E,S)
BYTE            Entry side of path (0,1,2,3 = W,N,E,S)
BYTE            Path class number
BYTE            Unknown (presumably Path Transport Type, i.e. 0x01 for vehicles)
DWORD           Unknown (seen 0...40 -- smaller values are much more frequent)
DWORD           Count of blocks to follow
    BYTE×3      Unknown (seen for Occupant Group Moving Van)
DWORD×2         Unknown (always 0)
FLOAT32×3       (x, y, z)-coordinate C or (-1, -2, -3)
FLOAT32×3       (-1, -2, -3)
FLOAT32         Unknown (often 0.0)

For the format of the properties, see SaveGame Properties.