Changes

Jump to navigation Jump to search
3,666 bytes added ,  18:02, 10 August 2019
m
:head_bang:
Line 6: Line 6:  
A .gbx file more specifically stores the serialization of one or more class instances. There is one main instance, and optionally a number of auxiliary instances.
 
A .gbx file more specifically stores the serialization of one or more class instances. There is one main instance, and optionally a number of auxiliary instances.
   −
The serializable classes are organized into 16 ''engines''. Each class is also subdivided into ''chunks''. A class is then not serialized in one go, but rather as a series of chunks. This allows Nadeo to easily extend classes in new TrackMania versions: instead of having to define a new class they can simply add more chunks to an existing one, and have older versions ignore these new chunk types.
+
The serializable classes are organized into ''engines''. Each class is also subdivided into ''chunks''. A class is then not serialized in one go, but rather as a series of chunks. This allows Nadeo to easily extend classes in new TrackMania versions: instead of having to define a new class they can simply add more chunks to an existing one, and have older versions ignore these new chunk types.
    
The data in a .gbx file follows the pattern {{c|<chunk ID> <chunk data>}}. A ''chunk ID'' is a 32-bit number that identifies the engine, the class, and the chunk in that class. If you for example see the bytes <code>07 30 04 03</code> in the file, that would correspond to the integer 0x03043007, and be interpreted as follows:
 
The data in a .gbx file follows the pattern {{c|<chunk ID> <chunk data>}}. A ''chunk ID'' is a 32-bit number that identifies the engine, the class, and the chunk in that class. If you for example see the bytes <code>07 30 04 03</code> in the file, that would correspond to the integer 0x03043007, and be interpreted as follows:
Line 71: Line 71:  
The file body contains further chunks of the main class instance, and may also contain auxiliary class instances. Reading the body is started by creating an in-memory instance of the class corresponding to the main class ID (instances are called ''nodes'' internally), and calling ReadNode on it:
 
The file body contains further chunks of the main class instance, and may also contain auxiliary class instances. Reading the body is started by creating an in-memory instance of the class corresponding to the main class ID (instances are called ''nodes'' internally), and calling ReadNode on it:
   −
  ReadNode()
+
  ReadNode()<ref>[[ManiaPlanet_internals#Object_system|CMwNod::Archive]]</ref>
 
  {
 
  {
 
     while (true)
 
     while (true)
 
     {
 
     {
         chunkID = ReadUInt32();
+
         chunkID = ReadUInt32();<ref>[[ManiaPlanet_internals#CClassicArchive|CClassicArchive::ReadNat32]]</ref>
         if (chunkID == 0xFACADE01)
+
         if (chunkID == 0xFACADE01) // no more chunks
 +
        {
 +
            OnNodLoaded();<ref>[[ManiaPlanet_internals#Object_system|CMwNod::OnNodLoaded]]</ref>
 
             return;
 
             return;
 +
        }
 +
 +
        chunkFlags = GetChunkInfo(chunkID);<ref>[[ManiaPlanet_internals#Object_system|CMwNod::GetChunkInfo]]</ref>
 
   
 
   
         chunkFlags = GetChunkFlags(chunkID);
+
         if (chunkFlags == 0xFACADE01 || (chunkFlags & 0x11) == 0x10)
        if (chunkFlags & 0x10)
   
         {
 
         {
 
             skip = ReadUInt32();
 
             skip = ReadUInt32();
 +
            if (skip != 0x534B4950) // "SKIP"
 +
            {
 +
                OnNodLoaded();
 +
                return;
 +
            }
 +
 
             chunkDataSize = ReadUInt32();
 
             chunkDataSize = ReadUInt32();
 +
            SkipData(chunkDataSize);<ref>[[ManiaPlanet_internals#CClassicArchive|CClassicArchive::SkipData]]</ref> // skip unknown or obsolete chunk
 
         }
 
         }
 
   
 
   
         ReadChunk(chunkID);
+
         if (chunkFlags != 0xFACADE01 && (chunkFlags & 0x11) != 0x10)
 +
        {
 +
            if (chunkFlags & 0x10) // skippable
 +
            {
 +
                skip = ReadUInt32();          // unused
 +
                chunkDataSize = ReadUInt32(); // unused
 +
            }
 +
 +
            ReadChunk(chunkID);<ref>[[ManiaPlanet_internals#Object_system|CMwNod::Chunk]]</ref> // read the chunk
 +
        }
 
     }
 
     }
 
  }
 
  }
   −
GetChunkFlags() doesn't read anything from the file; it provides loading flags for the specified chunk ID. The only important flag is whether or not the chunk is "skippable". If it is, the chunk ID is followed by an uint32 0x50494B53 ("SKIP", shows up as "PIKS" in the file due to little-endian ordering) and an uint32 specifying the size of the chunk data. This allows older versions of TrackMania that don't know how to parse this chunk ID to skip over the chunk data and go to the next chunk. If the chunk is not skippable, the chunk data follows immediately after the chunk ID.
+
The code 0xFACADE01 is used here for two different purposes. As a dummy chunk ID (read from the file), it signifies the end of the chunk list for the current class. As a flag (returned by the function GetChunkInfo), it signifies that the passed chunk ID is unknown. GetChunkInfo() doesn't read anything from the file; it provides loading flags for the specified chunk ID. The flag 0x01 indicates that the chunk must be read. If this flag is not set, the chunk can be skipped (if possible). The second important flag is 0x10 and indicates whether the chunk is "skippable" or not. If it is, the chunk ID is followed by an uint32 0x50494B53 ("SKIP", shows up as "PIKS" in the file due to little-endian ordering) and an uint32 specifying the size of the chunk data. This allows older versions of TrackMania that don't know how to parse this chunk ID to skip over the chunk data and go to the next chunk. If the chunk is not skippable, the chunk data follows immediately after the chunk ID.
   −
A dummy chunk ID of 0xFACADE01 signifies the end of the chunk list for the current class.
+
The function OnNodLoaded() is used by some classes to prepare the read data (e.g., to make them compatible with newer versions of the engine).
    
Chunk data is not self-describing; the program itself has to know how to read each one. In fact, if your program doesn't know a specific chunk ID and the chunk is not skippable, you can't even tell how long the chunk is.
 
Chunk data is not self-describing; the program itself has to know how to read each one. In fact, if your program doesn't know a specific chunk ID and the chunk is not skippable, you can't even tell how long the chunk is.
Line 103: Line 123:  
* '''byte''', '''uint16''', '''int32''', '''uint32''', '''uint64''', '''uint128''', '''float''': regular little-endian encoding.
 
* '''byte''', '''uint16''', '''int32''', '''uint32''', '''uint64''', '''uint128''', '''float''': regular little-endian encoding.
   −
* '''vec2D''':
+
* '''vec2''':
 
** float x
 
** float x
 
** float y
 
** float y
   −
* '''vec3D''':
+
* '''vec3''':
 
** float x
 
** float x
 
** float y
 
** float y
Line 117: Line 137:  
** float b
 
** float b
   −
* '''string''':
+
* '''string''':<ref>[[ManiaPlanet_internals#CClassicArchive|CClassicArchive::DoString]]</ref>
 
** uint32 length
 
** uint32 length
 
** byte chars[length] ({{wp|UTF-8}}, older files sometimes with {{wp|Byte order mark|BOM}}, not zero-terminated)
 
** byte chars[length] ({{wp|UTF-8}}, older files sometimes with {{wp|Byte order mark|BOM}}, not zero-terminated)
   −
* '''lookbackstring''': a form of compression which allows to avoid repeating the same string multiple times. Every time a new string is encountered, it is added to a string list, and from then on this list entry is referenced instead of repeating the string another time.
+
* '''lookbackstring''':<ref>[[ManiaPlanet_internals#Id|CMwId::Archive]]</ref> a form of compression which allows to avoid repeating the same string multiple times. Every time a new string is encountered, it is added to a string list, and from then on this list entry is referenced instead of repeating the string another time.
 
** if this is the first lookback string encountered:
 
** if this is the first lookback string encountered:
 
*** uint32 version (currently 3)
 
*** uint32 version (currently 3)
Line 130: Line 150:  
''Note'': the lookback string state is reset after each header chunk. The string list is cleared completely, and the next lookback string will again trigger the version number. If index represents a number (bits 30 and 31 not set), it describes the position inside a ''global'' string table. In most cases it concerns the [[Collection ID|ID of a collection]].
 
''Note'': the lookback string state is reset after each header chunk. The string list is cleared completely, and the next lookback string will again trigger the version number. If index represents a number (bits 30 and 31 not set), it describes the position inside a ''global'' string table. In most cases it concerns the [[Collection ID|ID of a collection]].
   −
* '''fileref''': path to an external file, e.g. a skin.
+
''Note'': Virtual Skipper 2 uses version 2 of the lookback strings. In this version, the string is always stored, the index always contains the position within the global name table, and the field with the version is also always present.
 +
 
 +
* '''meta''':<ref>[[ManiaPlanet_internals#Identifier|SGameCtnIdentifier::Archive]]</ref> contains [[ManiaPlanet_internals#Identifier|meta]] information like the track environment, time of day, and author.
 +
** lookbackstring id
 +
** lookbackstring collection
 +
** lookbackstring author
 +
 
 +
* '''fileref''':<ref>CSystemPackManager::ArchivePackDesc</ref> path to an external file, e.g. a skin.
 
** byte version (currently 3)
 
** byte version (currently 3)
 
** if version >= 3:
 
** if version >= 3:
Line 138: Line 165:  
*** string locatorUrl
 
*** string locatorUrl
   −
* '''meta''': contains [[ManiaPlanet_internals#Identifier|meta]] information like the track environment, time of day, and author.
+
* '''noderef''':<ref>[[ManiaPlanet_internals#CSystemArchiveNod|CSystemArchiveNod::DoNodPtr]]</ref> a reference to an auxiliary class instance.
** lookbackstring field1
  −
** lookbackstring field2
  −
** lookbackstring author
  −
 
  −
* '''noderef''': a reference to an auxiliary class instance.
   
** uint32 index. if this is -1, the node reference is empty (null).
 
** uint32 index. if this is -1, the node reference is empty (null).
 
** if the index is >= 0 and the node at the index has not been read yet:
 
** if the index is >= 0 and the node at the index has not been read yet:
Line 195: Line 217:  
             5: (old)Rounds, 6: InProgress, 7: Campaign, 8: Multi, 9: Solo, 10: Site, 11: SoloNadeo, 12: MultiNadeo)
 
             5: (old)Rounds, 6: InProgress, 7: Campaign, 8: Multi, 9: Solo, 10: Site, 11: SoloNadeo, 12: MultiNadeo)
 
  if version >= 1:
 
  if version >= 1:
     bool locked (used by VirtualSkipper to lock the map parameter)
+
     bool locked (used by Virtual Skipper to lock the map parameters)
 
     string password (weak xor encryption, no longer used in newer track files; see 03043029)
 
     string password (weak xor encryption, no longer used in newer track files; see 03043029)
 
     if version >= 2:
 
     if version >= 2:
 
         meta decoration (timeOfDay, environment, envirAuthor) (decoration envir can be different than collection envir)
 
         meta decoration (timeOfDay, environment, envirAuthor) (decoration envir can be different than collection envir)
 
         if version >= 3:
 
         if version >= 3:
             vec2D mapOrigin
+
             vec2 mapOrigin
 
             if version >= 4:
 
             if version >= 4:
                 vec2D mapTarget
+
                 vec2 mapTarget
 
                 if version >= 5:
 
                 if version >= 5:
 
                     uint128
 
                     uint128
Line 253: Line 275:  
             5: (old)Rounds, 6: InProgress, 7: Campaign, 8: Multi, 9: Solo, 10: Site, 11: SoloNadeo, 12: MultiNadeo)
 
             5: (old)Rounds, 6: InProgress, 7: Campaign, 8: Multi, 9: Solo, 10: Site, 11: SoloNadeo, 12: MultiNadeo)
 
 
 +
'''03043012'''
 +
string
 +
 +
'''03043013'''
 +
ReadChunk(0x0304301F)
 +
 
'''03043014''' (skippable)
 
'''03043014''' (skippable)
 
  uint32
 
  uint32
Line 267: Line 295:  
 
 
'''03043018''' (skippable)
 
'''03043018''' (skippable)
  uint32
+
  bool
 
  uint32 numLaps
 
  uint32 numLaps
   Line 283: Line 311:  
  uint32 sizeY
 
  uint32 sizeY
 
  uint32 sizeZ
 
  uint32 sizeZ
  uint32 needUnlock
+
  bool needUnlock
  uint32 flagsAre32Bit
+
  if chunkId != 03043013:
 +
    uint32 version
 
   
 
   
 
  uint32 numBlocks
 
  uint32 numBlocks
Line 293: Line 322:  
     byte y
 
     byte y
 
     byte z
 
     byte z
     uint16/uint32 flags
+
     if version == 0:
 +
        uint16 flags
 +
    if version > 0:
 +
        uint32 flags
 
     if (flags == 0xFFFFFFFF)
 
     if (flags == 0xFFFFFFFF)
 
         continue (read the next block)
 
         continue (read the next block)
Line 301: Line 333:  
     if (flags & 0x100000)
 
     if (flags & 0x100000)
 
         noderef blockparameters
 
         noderef blockparameters
 +
 
''Note:'' blocks with flags 0xFFFFFFFF should be skipped, they aren't counted in the numBlocks.
 
''Note:'' blocks with flags 0xFFFFFFFF should be skipped, they aren't counted in the numBlocks.
   Line 317: Line 350:  
 
 
'''03043025'''
 
'''03043025'''
  vec2D mapCoordOrigin
+
  vec2 mapCoordOrigin
  vec2D mapCoordTarget
+
  vec2 mapCoordTarget
 
 
 
'''03043026'''
 
'''03043026'''
Line 324: Line 357:  
 
 
'''03043027'''
 
'''03043027'''
  uint32 provided
+
  bool archiveGmCamVal
  if provided != 0:
+
  if archiveGmCamVal:
 
     byte
 
     byte
     vec3D x 3
+
     GmMat3 (vec3 x 3)
     vec3D
+
     vec3
 
     float
 
     float
 
     float
 
     float
Line 342: Line 375:     
'''0304302A'''
 
'''0304302A'''
  uint32
+
  bool
    
'''0304303D''' (skippable)
 
'''0304303D''' (skippable)
Line 348: Line 381:  
  uint32 version
 
  uint32 version
 
  if version >= 5:
 
  if version >= 5:
     uint32 frames
+
     uint32 frames   // If version < 5 then frames = 1
 
  if version >= 2:
 
  if version >= 2:
     if version < 5:
+
     for each frame:
      if version >= 4:
  −
          uint32 size
  −
          byte riff[size] // Avg lightmap webp file
   
       uint32 size
 
       uint32 size
       byte jfif[size]   // Intens/Avg lightmap jpeg file
+
       byte image[size]   // Image is JPEG/JFIF or WEBP/RIFF file format
       if version == 3:
+
       if version >= 3:
 
           uint32 size
 
           uint32 size
           byte jfif[size] // Intens lightmap jpeg file
+
           byte image[size]
    if version >= 5:
+
      if version >= 6:
      for each frame:
   
           uint32 size
 
           uint32 size
           byte riff[size] // Avg lightmap webp file
+
           byte image[size]
          uint32 size
  −
          byte jfif[size] // Intens lightmap jpeg file
   
     if size != 0:
 
     if size != 0:
 
       uint32 uncompressedSize
 
       uint32 uncompressedSize
 
       uint32 compressedSize
 
       uint32 compressedSize
       byte data[compressedSize] // Lightmap cache zip file
+
       byte compressedData[compressedSize] // ZLIB compressed lightmap cache node
    
'''03043044''' (skippable)
 
'''03043044''' (skippable)
 
  uint32 unknown (0)
 
  uint32 unknown (0)
 
  uint32 size
 
  uint32 size
  uint32 flags
+
  uint32 classID
  uint32 unknown (1, 2)
+
  uint32 version
uint32 count (number of metadata records)
+
if version >= 2:
for each count:
+
  uint32 count (number of metadata records)
  string varName
+
  for each count:
  uint32 varType
+
    string varName
  switch varType:
+
    uint32 varType
    case EType_Boolean:
+
    switch varType:
      bool
+
      case EType_Boolean:
    case EType_Integer:
+
        bool
      int32
+
      case EType_Integer:
    case EType_Real:
+
        int32
      float
+
      case EType_Real:
    case EType_Text:
+
        float
      string
+
      case EType_Text:
    case EType_Int2:
+
        string
      int32
+
      case EType_Int2:
      int32
+
        int32
    case EType_Int3:
+
        int32
      int32
+
      case EType_Int3:
      int32
+
        int32
      int32
+
        int32
    case EType_Vec2:
+
        int32
      float
+
      case EType_Vec2:
      float
+
        float
    case EType_Vec3:
+
        float
      float
+
      case EType_Vec3:
      float
+
        float
      float
+
        float
    case EType_Array:
+
        float
      uint32 typeKey
+
      case EType_Array:
      uint32 typeValue
+
        uint32 typeKey
      uint32 arrayElements
+
        uint32 typeValue
      for each arrayElements
+
        uint32 arrayElements
        switch typeKey:
+
        for each arrayElements
          case EType_Boolean:
+
          switch typeKey:
            bool
+
            case EType_Boolean:
          case EType_Integer:
+
              bool
            int32
+
            case EType_Integer:
          case EType_Real:
+
              int32
            float
+
            case EType_Real:
          case EType_Text:
+
              float
            string
+
            case EType_Text:
        switch typeValue:
+
              string
          case EType_Boolean:
+
          switch typeValue:
            bool
+
            case EType_Boolean:
          case EType_Integer:
+
              bool
            int32
+
            case EType_Integer:
          case EType_Real:
+
              int32
            float
+
            case EType_Real:
          case EType_Text:
+
              float
            string
+
            case EType_Text:
          case EType_Int2:
+
              string
            int32
+
            case EType_Int2:
            int32
+
              int32
          case EType_Int3:
+
              int32
            int32
+
            case EType_Int3:
            int32
+
              int32
            int32
+
              int32
          case EType_Vec2:
+
              int32
            float
+
            case EType_Vec2:
            float
+
              float
          case EType_Vec3:
+
              float
            float
+
            case EType_Vec3:
            float
+
              float
            float
+
              float
          case EType_Array:
+
              float
            recursively read multidimensional arrays
+
            case EType_Array:
 +
              recursively read multidimensional arrays
   −
<div class="mw-collapsible mw-collapsed">
   
The variable type is to be interpreted as follows:
 
The variable type is to be interpreted as follows:
<div class="mw-collapsible-content">
   
  enum eScriptType
 
  enum eScriptType
 
  {
 
  {
Line 461: Line 487:  
   EType_Iso4,
 
   EType_Iso4,
 
   EType_Ident,
 
   EType_Ident,
   EType_Int2
+
   EType_Int2,
 +
  EType_Struct
 
  };
 
  };
</div>
+
Maniaplanet 4.1 has changed the way script types and values are written. The code now does the following:
</div>
+
 
 +
* First write the list of all types (all types appear only once).
 +
* For each value, write the index of the type in the list, and then write the value.
 +
 
 +
Writing the types and values has not changed except for the addition of structures which are a plain list of members.
 +
 
 +
Also note that the indices are written in the following form:
 +
 
 +
* If the index is < 128, it is written directly into one byte (because this covers 99% of the cases).
 +
* Otherwise, it is written in the first 7 bits of the first byte and in the following 2 bytes, a total of 23 bits (7+8+8). The 8th bit of the first byte is set to 1.
 +
 
 +
Note that this scheme is also used to write string lengths.
    
'''03043054''' (skippable)
 
'''03043054''' (skippable)
Line 470: Line 508:  
  uint32
 
  uint32
 
  uint32 chunkSize
 
  uint32 chunkSize
  uint32 itemsCount (number of embedded items)
+
  uint32 itemCount (number of embedded items)
 
  uint32 zipSize (embedded items ZIP file size)
 
  uint32 zipSize (embedded items ZIP file size)
 
  byte zipFile[zipSize]
 
  byte zipFile[zipSize]
Line 532: Line 570:     
'''0301B000'''
 
'''0301B000'''
  uint32 num
+
  uint32 archiveCount
  Item items[num]
+
  SCollectorStock archive[archiveCount]
     meta
+
     meta (blockName, collection, author)
 
     uint32
 
     uint32
   Line 596: Line 634:     
'''0305B005'''
 
'''0305B005'''
uint32 x 3 (ignored)
+
(all fields are ignored)
 +
uint32
 +
uint32
 +
 +
uint32
    
'''0305B006'''
 
'''0305B006'''
  uint32 num
+
  uint32 count
 
  uint32 items[count] (ignored)
 
  uint32 items[count] (ignored)
 +
 +
'''0305B007'''
 +
uint32 (ignored)
    
'''0305B008'''
 
'''0305B008'''
Line 641: Line 686:     
===CGameWaypointSpecialProperty (03 13B 000) ===
 
===CGameWaypointSpecialProperty (03 13B 000) ===
 +
Mapped to the new GameData engine (2E) as class CGameWaypointSpecialProperty (2E009000).
 +
 
'''0313B000'''
 
'''0313B000'''
 
  uint32 version
 
  uint32 version
Line 725: Line 772:     
A sample record looks as follows:
 
A sample record looks as follows:
  vec3D position
+
  vec3 position
 
  uint16 angle      (0..0xFFFF -> 0..pi)
 
  uint16 angle      (0..0xFFFF -> 0..pi)
 
  int16 axisHeading (-0x8000..0x7FFF -> -pi..pi)
 
  int16 axisHeading (-0x8000..0x7FFF -> -pi..pi)
Line 818: Line 865:  
Base class for CGameCtnBlockInfo, CGameCtnMacroBlockInfo, CGameCtnObjectInfo and CGameCtnDecoration.
 
Base class for CGameCtnBlockInfo, CGameCtnMacroBlockInfo, CGameCtnObjectInfo and CGameCtnDecoration.
   −
Deprecated. Moved to the new GameData engine (2E) as class CGameCtnCollector (2E001000).
+
Mapped to the new GameData engine (2E) as class CGameCtnCollector (2E001000).
    
'''0301A003''' ''"Desc"'' (header)
 
'''0301A003''' ''"Desc"'' (header)
 
  meta (name, collection, author)
 
  meta (name, collection, author)
 
  lookbackstring version
 
  lookbackstring version
  string pagePath (slash-separated folder path where the block appears in the editor)
+
  string pageName (slash-separated folder path where the block appears in the editor)
 
  if version == 5:
 
  if version == 5:
 
     lookbackstring
 
     lookbackstring
Line 829: Line 876:  
     lookbackstring
 
     lookbackstring
 
  if version >= 3:
 
  if version >= 3:
     uint32 flags
+
     struct SCollectorDescFlags
     uint16 index
+
    {
 +
        uint32 __unused2__ : 1;
 +
        uint32 IsInternal  : 1;
 +
        uint32 IsAdvanced  : 1;
 +
        uint32 IconDesc    : 5;  // 0 = Unknown, 1 = NoIcon, 2 = BGRA_64x64, 3 = BGRA_128x128
 +
        uint32 __unused__  : 24;
 +
    };
 +
     uint16 catalogPosition (order of the blocks within pageName)
 
  if version >= 7:
 
  if version >= 7:
 
     string name
 
     string name
 
  if version >= 8:
 
  if version >= 8:
     byte
+
     byte prodState (0: Aborted, 1: GameBox, 2: DevBuild, 3: Release)
    
'''0301A004''' ''"Icon"'' (header)
 
'''0301A004''' ''"Icon"'' (header)
Line 876: Line 930:     
===CGameCtnObjectInfo (03 01C 000)===
 
===CGameCtnObjectInfo (03 01C 000)===
Deprecated. Moved to the new GameData engine (2E) as class CGameItemModel (2E002000).
+
Mapped to the new GameData engine (2E) as class CGameItemModel (2E002000).
    
'''0301C000''' (header)
 
'''0301C000''' (header)
  uint32 objectInfoType (0: Undefined, 1: Ornament, 2: PickUp, 3: Character, 4: Vehicle)
+
  uint32 itemType (0: Undefined, 1: Ornament (formerly: StaticObject), 2: PickUp (formerly: DynaObject), 3: Character, 4: Vehicle, 5: Spot, 6: Cannon, 7: Group, 8: Decal, 9: Turret, 10: Wagon, 11: Block, 12: EntitySpawner
''Note:'' In class CGameItemModel the enumerators are: 0: Undefined, 1: StaticObject, 2: DynaObject, 3: Character, 4: Vehicle, 5: Spot, 6: Cannon
      
'''0301C001''' (header)
 
'''0301C001''' (header)
Line 911: Line 964:     
'''0301C012'''
 
'''0301C012'''
  vec3D groundPoint
+
  vec3 groundPoint
 
  float painterGroundMargin
 
  float painterGroundMargin
 
  float orbitalCenterHeightFromGround
 
  float orbitalCenterHeightFromGround
Line 918: Line 971:     
'''301C013'''
 
'''301C013'''
  nodref audioEnvironmentInCar (CPlugAudioEnvironment; used for cars)
+
  noderef audioEnvironmentInCar (CPlugAudioEnvironment; used for cars)
    
'''301C014'''
 
'''301C014'''
Line 939: Line 992:  
'''0301C019'''
 
'''0301C019'''
 
  int version
 
  int version
  nodref phyModel                 // CPlugSurface
+
  noderef phyModel               // CPlugSurface
  nodref visModel                 // CPlugSurface
+
  noderef visModel               // CPlugSurface
 
  if version >= 1:
 
  if version >= 1:
     nodref visModelStatic       // CPlugSolid2Model
+
     noderef visModelStatic     // CPlugSolid2Model
    
===CGameCtnDecoration (03 038 000)===
 
===CGameCtnDecoration (03 038 000)===
Line 957: Line 1,010:  
'''03033001''' ''"Desc"''
 
'''03033001''' ''"Desc"''
 
  byte version
 
  byte version
  lookbackstring environment
+
  lookbackstring collection
  bool
+
  bool needUnlock
 
  if version >= 1:
 
  if version >= 1:
 
     string iconEnv
 
     string iconEnv
 
     string iconCollection
 
     string iconCollection
 
     if version >= 2:
 
     if version >= 2:
         int32
+
         int32 sortIndex
 
         if version >= 3:
 
         if version >= 3:
             lookbackstring terrain
+
             lookbackstring defaultZone
 
             if version >= 4:
 
             if version >= 4:
 
                 meta (vehicle, collection, author)
 
                 meta (vehicle, collection, author)
 
                 if version >= 5:
 
                 if version >= 5:
                     string
+
                     string mapFid
                     float
+
                     vec2
                     float
+
                     vec2
                    float
+
                     if version == 5:
                    float
+
                         vec2 mapCoordElem
                     if version <= 5:
+
                     if version == 6 || version == 7:
                         float
+
                         vec2 mapCoordElem
                        float
+
                         vec2 mapCoordIcon
                     if version <= 7:
  −
                         float
  −
                         float
   
                     if version >= 7:
 
                     if version >= 7:
 
                         string loadscreen
 
                         string loadscreen
 
                         if version >= 8:
 
                         if version >= 8:
                             float
+
                             vec2 mapCoordElem
                             float
+
                             vec2 mapCoordIcon
                             float
+
                             vec2 mapCoordDesc
                            float
+
                             string longDesc
                            float
  −
                            float
  −
                             string
   
                             if version >= 9:
 
                             if version >= 9:
                                 string name
+
                                 string displayName
 
                                 if version >= 10:
 
                                 if version >= 10:
                                     bool
+
                                     bool isEditable
    
'''03033002''' ''"CollectorFolders"''
 
'''03033002''' ''"CollectorFolders"''
 
  byte version
 
  byte version
  string dirName
+
  string folderBlockInfo
  string dirName
+
  string folderItem
  string dirName
+
  string folderDecoration
 
  if version == 1 || version == 2:
 
  if version == 1 || version == 2:
     string dirName
+
     string folder
 
  if version >= 2:
 
  if version >= 2:
     string dirName
+
     string folderCardEventInfo
 
  if version >= 3:
 
  if version >= 3:
     string dirName
+
     string folderMacroBlockInfo
 
  if version >= 4:
 
  if version >= 4:
     string dirName
+
     string folderMacroDecals
    
'''03033003''' ''"MenuIconsFolders"''
 
'''03033003''' ''"MenuIconsFolders"''
 
  byte version
 
  byte version
  string dirName
+
  string folderMenusIcons
    
===CGameSkin (03 031 000)===
 
===CGameSkin (03 031 000)===
Line 1,028: Line 1,075:  
     string file
 
     string file
 
     if version >= 2:
 
     if version >= 2:
         bool mipMap
+
         bool needMipMap
 
  if version >= 4:
 
  if version >= 4:
 
     string dirNameAlt
 
     string dirNameAlt
 
  if version >= 5:
 
  if version >= 5:
     bool unknown
+
     bool useDefaultSkin
    
===CGamePlayerProfile (03 08C 000)===
 
===CGamePlayerProfile (03 08C 000)===
 
'''0308C000''' ''"NetPlayerProfile"''
 
'''0308C000''' ''"NetPlayerProfile"''
  string login
+
  string onlineLogin
 
  string onlineSupportKey
 
  string onlineSupportKey
   Line 1,044: Line 1,091:  
  for each number:
 
  for each number:
 
     string dirName
 
     string dirName
 +
 +
== References to the actual functions ==
 +
<references />
    
== Applications and Libraries that can inspect/modify the file format ==
 
== Applications and Libraries that can inspect/modify the file format ==
Line 1,063: Line 1,113:  
* [http://www.wolfgang-rolke.de/gbxdump/gbxlightmap.zip GbxLightMap download] - a Windows tool to extract the lightmaps from a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxlightmap.zip GbxLightMap download] - a Windows tool to extract the lightmaps from a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxmetadata.zip GbxMetadata download] - a Windows tool that indicates the persistent attributes of a given .Map.Gbx file (includes source code).
 
* [http://www.wolfgang-rolke.de/gbxdump/gbxmetadata.zip GbxMetadata download] - a Windows tool that indicates the persistent attributes of a given .Map.Gbx file (includes source code).
 +
* [[File:Krzychor-campaign-maker.zip]] - a Windows tool that allows to create custom campaigns for TMNF/TMUF. Sources not included.
    
[[Category:File formats]]
 
[[Category:File formats]]
90

edits

Navigation menu