Changes

Jump to navigation Jump to search
1,204 bytes added ,  18:02, 10 August 2019
m
:head_bang:
Line 275: 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 305: 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 315: 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 323: 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 370: 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
Line 482: Line 487:  
   EType_Iso4,
 
   EType_Iso4,
 
   EType_Ident,
 
   EType_Ident,
   EType_Int2
+
   EType_Int2,
 +
  EType_Struct
 
  };
 
  };
 +
Maniaplanet 4.1 has changed the way script types and values are written. The code now does the following:
 +
 +
* 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 667: 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 855: Line 876:  
     lookbackstring
 
     lookbackstring
 
  if version >= 3:
 
  if version >= 3:
     uint32 flags
+
     struct SCollectorDescFlags
 +
    {
 +
        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)
 
     uint16 catalogPosition (order of the blocks within pageName)
 
  if version >= 7:
 
  if version >= 7:
Line 905: Line 933:     
'''0301C000''' (header)
 
'''0301C000''' (header)
  uint32 itemType (0: Undefined, 1: Ornament (formerly: StaticObject), 2: PickUp (formerly: DynaObject), 3: Character, 4: Vehicle, 5: Spot, 6: Cannon, 7: Group (Dev build), 8: Decal (Dev build), 9: Turret (Dev build), 10: Wagon (Dev build), 11: Block (Dev build))
+
  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
    
'''0301C001''' (header)
 
'''0301C001''' (header)
Line 982: 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,057: Line 1,079:  
     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,091: 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