Difference between revisions of "EXMP"

From SimsWiki
Jump to: navigation, search
(Auto-inserted from WakkaWikki)
 
(slightly reformatted)
Line 7: Line 7:
 
Format Spec Follows
 
Format Spec Follows
  
Exemplar and Cohort File Format for Simcity4 by EA. Specification by Buggi, Karybdis, Ilive, Tropod
+
== Exemplar and Cohort File Format for Simcity4 by EA. Specification by Buggi, Karybdis, Ilive, Tropod ==
Exemplar/Cohort Binary File Structure
+
------------------------------
+
  
  
8 BYTES -  The file identifier. Can be EQZB1###, EQZT1### for exemplars and CQZB1### or CQZT1### for cohorts. B denotes Binary format. T is text. 1 is version.
+
    8 BYTES -  The file identifier. Can be EQZB1###, EQZT1### for exemplars
DWORD -    Parent cohort type id
+
                and CQZB1### or CQZT1### for cohorts. B denotes Binary format.
DWORD -   Parent cohort group id
+
                T is text. 1 is version.
DWORD -   Parent cohort instance id
+
    DWORD -    Parent cohort type id
DWORD -   Property count. This specifies how many properties are contained in the exemplar or cohort. Critical to reading the file properly.
+
    DWORD -     Parent cohort group id
+24             Repetitions of properties follow. Each property varies in size.
+
    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.
Property structure
+
    +24         Repetitions of properties follow. Each property varies in size.
-----------------
+
All properties have the same basic structure. They start at offset 24 in an exemplar or cohort.  
+
   
+
    Property structure
+
    -----------------
DWORD -   The properties numerical value. Represented as 0x???????? in Ilives reader and DatGen4.
+
    All properties have the same basic structure. They start at offset
WORD -   The properties ValueType. This defines weather its a uint or a float etc. See table below for possible values.
+
    24 in an exemplar or cohort.  
WORD -   The 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. 80 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.
+
    DWORD -     The properties numerical value. Represented as
'' When KeyType is 0x00, this is a single value as defined by ValueType
+
                0x???????? in Ilives reader and DatGen4.
ARBIT -   Value repetitions when KeyType is 0x80. Depending on data type, the length of these repetitions varies. See ValueType below on data types.
+
    WORD -     The properties ValueType. This defines weather its a
+
                uint or a float etc. See table below for possible
 
+
                values.
 
+
    WORD -     The KeyType. The KeyType contains a value of 0x80 if the
ValueType
+
                property has more than or equal to one repetition, and
-----------
+
                0x00 if it has 0 repetitions. 80 is the only recorded
Type,       Numeric value,   Property values length
+
                KeyType
--------  
+
    BYTE -     Number of values, or value repetitions, if the KeyType
SInt32,     0x700,                      4
+
                is zero. When KeyType is 0x80, this is an unused flag.
Float32,     0x900,                      4
+
    DWORD -     Number of values, or value repetitions, if the KeyType
UInt32,    0x300,                      4
+
                value is 0x80. A repetition of 1 represents properties capable of
Bool,       0xB00,                      1
+
                more than one repetition but held to 1 rep for the moment.
UInt8,       0x100,                      1
+
SInt64,     0x800,                      8
+
    '' When KeyType is 0x00, this is a single value as defined by ValueType ''
UInt16,     0x200,       2
+
    ARBIT -     Value repetitions when KeyType is 0x80. Depending on
String,     0xC00,           Number of Reps Value is String Length
+
                data type, the length of these repetitions varies. See
 +
                ValueType below on data types.
 +
   
 +
    ValueTypes
 +
    ----------
 +
 +
    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
  
  
 
  [[Category:Modding]]
 
  [[Category:Modding]]

Revision as of 18:49, 19 May 2008

This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/EXMP
This Page Details the Exemplar and Cohort formats of Simcity 4

Lists of the exemplar/cohort properties can be found here: ExemplarPropertiesList

Exemplars/Cohorts can be either Text or Binary (Text formats are found exclusively in maxis plugins) and this can be determined by reading the 4th byte in any exemplar or cohort. In text EXMP files this is T and in Binary EXMP files it is B.

Format Spec Follows

Exemplar and Cohort File Format for Simcity4 by EA. Specification by Buggi, Karybdis, Ilive, Tropod

   8 BYTES -   The file identifier. Can be EQZB1###, EQZT1### for exemplars
               and CQZB1### or CQZT1### for cohorts. B denotes Binary format.
               T is text. 1 is version.
   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 properties numerical value. Represented as
               0x???????? in Ilives reader and DatGen4.
   WORD -      The properties ValueType. This defines weather its a
               uint or a float etc. See table below for possible
               values.
   WORD -      The 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. 80 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.
   
   ValueTypes
   ----------

   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
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox