Difference between revisions of "EXMP"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Whatevermind
(Created page)
 
sc4e>Whatevermind
m (general cleanup, evolving standards, link update, etc.)
Line 1: Line 1:
The following format is used by both [[Exemplar]] and [[Cohort]] files in [[SimCity 4]]. A list of the properties within exemplars and cohorts can be found in the [[ExemplarPropertiesList]].
+
The following format is used by both [[Exemplar]] and [[Cohort]] files in [[SimCity 4]]. A list of the properties within exemplars and cohorts can be found in the [[exemplar properties]].
  
 
Exemplars/Cohorts can be either text or binary (text formats are found exclusively in Maxis plugins) and this can be determined by reading the fourth byte in any exemplar or cohort. In text files this is T and in binary files it is B.  The following file specification is credited to [[People:Buggi|Buggi]], [[People:Karybdis|Karybdis]], [[People:ILive|ILive]], and [[People:Tropod|Tropod]].
 
Exemplars/Cohorts can be either text or binary (text formats are found exclusively in Maxis plugins) and this can be determined by reading the fourth byte in any exemplar or cohort. In text files this is T and in binary files it is B.  The following file specification is credited to [[People:Buggi|Buggi]], [[People:Karybdis|Karybdis]], [[People:ILive|ILive]], and [[People:Tropod|Tropod]].
  
=== Exemplar and Cohort File Format===
+
==Exemplar and Cohort File Format==
 
+
<pre>
 
     8 BYTES -  The file identifier. Can be EQZB1###, EQZT1### for exemplars and CQZB1### or CQZT1### for cohorts.
 
     8 BYTES -  The file identifier. Can be EQZB1###, EQZT1### for exemplars and CQZB1### or CQZT1### for cohorts.
 
                 The fourth byte denotes whether the file is Text or Binary (T or B).
 
                 The fourth byte denotes whether the file is Text or Binary (T or B).
Line 33: Line 33:
 
     ARBIT -    Value repetitions when KeyType is 0x80. Depending on data type, the length of these repetitions varies.
 
     ARBIT -    Value repetitions when KeyType is 0x80. Depending on data type, the length of these repetitions varies.
 
                 See ValueType below on data types.
 
                 See ValueType below on data types.
   
+
</pre>   
  
===ValueType===
+
==ValueType==
+
<pre>
 
     Type        Numeric value  Property values length
 
     Type        Numeric value  Property values length
 
     ----        -------------  ----------------------
 
     ----        -------------  ----------------------
Line 47: Line 47:
 
     UInt16      0x200         2
 
     UInt16      0x200         2
 
     String      0xC00          Number of Reps Value is String Length
 
     String      0xC00          Number of Reps Value is String Length
 +
</pre>
  
  

Revision as of 19:41, 24 November 2012

The following format is used by both Exemplar and Cohort files in SimCity 4. A list of the properties within exemplars and cohorts can be found in the exemplar properties.

Exemplars/Cohorts can be either text or binary (text formats are found exclusively in Maxis plugins) and this can be determined by reading the fourth byte in any exemplar or cohort. In text files this is T and in binary files it is B. The following file specification is credited to Buggi, Karybdis, ILive, and Tropod.

Exemplar and Cohort File Format

    8 BYTES -   The file identifier. Can be EQZB1###, EQZT1### for exemplars and CQZB1### or CQZT1### for cohorts.
                The fourth byte denotes whether the file is Text or Binary (T or B).
                The fifth byte is the version number, which in these examples is 1.
    DWORD -     Parent cohort Type id
    DWORD -     Parent cohort Group id
    DWORD -     Parent cohort Instance id
    DWORD -     Property count. This specifies how many properties are
                contained in the exemplar or cohort. Critical to reading the
                file properly.
    +24         Repetitions of properties follow. Each property varies in size.
 
    
    Property structure
    ------------------
    All properties have the same basic structure. They start at offset 24 in an exemplar or cohort. 
        
    DWORD -     The property's numerical value. Represented as 0x???????? in ILive's reader and DatGen4.
    WORD -      The property's '''ValueType'''. This defines weather its a uint or a float, etc.
                See table below for possible values.
    WORD -      The property's '''KeyType'''. The KeyType contains a value of 0x80 if the property has more than or equal to one repetition,
                and 0x00 if it has 0 repetitions. 0x80 is the only recorded KeyType
    BYTE -      Number of values, or value repetitions, if the KeyType is zero. When KeyType is 0x80, this is an unused flag.
    DWORD -     Number of values, or value repetitions, if the KeyType value is 0x80. A repetition of 1 represents
                properties capable of more than one repetition but held to 1 rep for the moment.
 
    ''When KeyType is 0x00, this is a single value as defined by ValueType''
    ARBIT -     Value repetitions when KeyType is 0x80. Depending on data type, the length of these repetitions varies.
                See ValueType below on data types.

ValueType

    Type        Numeric value   Property values length
    ----        -------------   ----------------------
    SInt32      0x700           4
    Float32     0x900           4
    UInt32      0x300           4
    Bool        0xB00           1
    UInt8       0x100           1
    SInt64      0x800           8
    UInt16      0x200 	        2
    String      0xC00           Number of Reps Value is String Length