Changes

Jump to navigation Jump to search
14,888 bytes added ,  15:45, 4 November 2022
→‎Reading the body: Added Encapsulation
Line 172: Line 172:     
''Note'': In case of a text format .gbx file (marked by a 'T' in the header) all numbers and strings are stored as one line of ASCII text in each case. Every line ends with a carriage return-linefeed ({{c|<CR><LF>}}) combination (0x0D and 0x0A). A single {{c|<LF>}} is part of a string.
 
''Note'': In case of a text format .gbx file (marked by a 'T' in the header) all numbers and strings are stored as one line of ASCII text in each case. Every line ends with a carriage return-linefeed ({{c|<CR><LF>}}) combination (0x0D and 0x0A). A single {{c|<LF>}} is part of a string.
 +
 +
===Encapsulation===
 +
Encapsulation is a special kind of chunk behavior added in ManiaPlanet that handles lookbackstrings and noderefs differently.
 +
 +
* A new temporary lookbackstring list is created just for this chunk - the counting of strings starts from 1 again. However, the previous state of lookback strings is not reset.
 +
* An index of the noderef is not included and the node is not added to the node list. That list is not reset either.
 +
 +
It looks like this:
 +
 +
CSystemArchiveEncapsuledChunk::CSystemArchiveEncapsuledChunk();
 +
// ...
 +
CSystemArchiveEncapsuledChunk::~CSystemArchiveEncapsuledChunk();
 +
 +
In this range of code, you need to set up your binary reader to handle the two rules above.
 +
 +
Here is the list of chunks that use encapsulation:
 +
 +
* CGameCtnChallenge '''03043040''', '''03043041''', '''03043043''', '''03043044''', '''0304304E''', '''0304304F''' (version < 2), '''03043054''', '''03043058''' (version >= 1)
 +
* CGameCtnMacroBlockInfo '''0310D00B''', '''0310D011'''
 +
* CGamePlayerProfileChunk_GameScores '''03146000''', '''03146002''', '''03146004'''
 +
* CGamePlayerProfileChunk_ScriptPersistentTraits '''03170000'''
    
== Class descriptions ==
 
== Class descriptions ==
Line 275: Line 296:  
             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 332:  
  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 343:  
     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 354:  
     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 402:  
  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
          uint32 size
+
        byte image[size]  // Image is JPEG/JFIF or WEBP/RIFF file format
          byte riff[size] // Avg lightmap webp file
+
        if version >= 3:
      uint32 size
+
            uint32 size
      byte jfif[size]   // Intens/Avg lightmap jpeg file
+
            byte image[size]
      if version == 3:
+
        if version >= 6:
          uint32 size
+
            uint32 size
          byte jfif[size] // Intens lightmap jpeg file
+
            byte image[size]
    if version >= 5:
+
    if size != 0:
      for each frame:
+
        uint32 uncompressedSize
          uint32 size
+
        uint32 compressedSize
          byte riff[size] // Avg lightmap webp file
+
        byte compressedData[compressedSize] // ZLIB compressed lightmap cache node
          uint32 size
+
 
          byte jfif[size] // Intens lightmap jpeg file
+
'''03043040''' (skippable) ''"items"''
    if size != 0:
+
 
      uint32 uncompressedSize
+
''Note:'' This chunk has its own lookback string state (is encapsulated with CSystemArchiveEncapsuledChunk).
      uint32 compressedSize
+
 
      byte compressedData[compressedSize] // ZLIB compressed lightmap cache node
+
''Note:'' Version 5+ can have data that is based on the count of certain types of items in the item array. If you want to modify items in TM2020, you can come across issues when modifying the item array and it becomes rather difficult. This can be resolved by downgrading the version to 4. This downgrade should only affect item snapping - which is "useful" only when deleting items in the map editor.
 +
 
 +
''Note:'' The following information may not be 100% accurate.
 +
 
 +
* '''connectedItemPairs''': Array of AnchoredObjects index pairs where the first item (of pair) is the item that will delete the second item (of pair). Example: (87, 110) - item #87 will delete item #110, when #87 gets deleted.
 +
* '''snappedBlocks''': ''Values'' are ''indexes'' of the Blocks array (chunk 0x01F). -1 = snapped to an item and you should use the index of snappedItems.
 +
* '''snappedItems''': ''Values'' are ''indexes'' of the AnchoredObjects array (this chunk). -1 = snapped to a block and you should use the index of snappedBlocks.
 +
* '''snapItemGroups''': Separates item "deletion groups" via a simple number. Usual values are between 0 and 5. You can index these with itemSnapIndexes values.
 +
* '''itemSnapIndexes''': Uses the values above to connect them with the item list. ''Values'' are ''indexes'' of '''snappedBlocks'''/'''snappedItems''' arrays. Any index of this array corresponds to the same AnchoredObjects index, '''except -1''', which means the item is not snapped.
 +
 
 +
uint32 version
 +
uint32
 +
uint32 size
 +
uint32 (10)
 +
uint32 numItems
 +
for each item:
 +
    node item (CGameCtnAnchoredObject, direct node)
 +
if version >= 1 && version != 5:
 +
    uint32 connectedItemPairCount
 +
    uint2 connectedItemPairs[connectedItemPairCount] // 2 uint32 per element
 +
if version >= 5: // TM2020
 +
    uint32 snappedBlockCount
 +
    uint32 snappedBlocks[snappedBlockCount]
 +
    if version < 7:
 +
        uint32 snapItemGroupCount
 +
        uint32 snapItemGroups[snapItemGroupCount]
 +
    if version >= 6:
 +
        uint32 snappedItemCount
 +
        uint32 snappedItems[snappedItemCount]
 +
    if version >= 7:
 +
        uint32 snapItemGroupCount
 +
        uint32 snapItemGroups[snapItemGroupCount]
 +
    if version != 6:
 +
        uint32 size
 +
        uint32[size] // unknown atm
 +
    uint32 itemSnapIndexCount // should be the same as the item count itself
 +
    uint32 itemSnapIndexes[itemSnapIndexCount]
    
'''03043044''' (skippable)
 
'''03043044''' (skippable)
Line 398: Line 466:  
  uint32 version
 
  uint32 version
 
  if version >= 2:
 
  if version >= 2:
  uint32 count (number of metadata records)
+
    uint32 count (number of metadata records)
  for each count:
+
    for each count:
    string varName
+
        string varName
    uint32 varType
+
        uint32 varType
    switch varType:
+
        switch varType:
      case EType_Boolean:
  −
        bool
  −
      case EType_Integer:
  −
        int32
  −
      case EType_Real:
  −
        float
  −
      case EType_Text:
  −
        string
  −
      case EType_Int2:
  −
        int32
  −
        int32
  −
      case EType_Int3:
  −
        int32
  −
        int32
  −
        int32
  −
      case EType_Vec2:
  −
        float
  −
        float
  −
      case EType_Vec3:
  −
        float
  −
        float
  −
        float
  −
      case EType_Array:
  −
        uint32 typeKey
  −
        uint32 typeValue
  −
        uint32 arrayElements
  −
        for each arrayElements
  −
          switch typeKey:
   
             case EType_Boolean:
 
             case EType_Boolean:
              bool
+
                bool
            case EType_Integer:
  −
              int32
  −
            case EType_Real:
  −
              float
  −
            case EType_Text:
  −
              string
  −
          switch typeValue:
  −
            case EType_Boolean:
  −
              bool
   
             case EType_Integer:
 
             case EType_Integer:
              int32
+
                int32
 
             case EType_Real:
 
             case EType_Real:
              float
+
                float
 
             case EType_Text:
 
             case EType_Text:
              string
+
                string
 
             case EType_Int2:
 
             case EType_Int2:
              int32
+
                int32
              int32
+
                int32
 
             case EType_Int3:
 
             case EType_Int3:
              int32
+
                int32
              int32
+
                int32
              int32
+
                int32
 
             case EType_Vec2:
 
             case EType_Vec2:
              float
+
                float
              float
+
                float
 
             case EType_Vec3:
 
             case EType_Vec3:
              float
+
                float
              float
+
                float
              float
+
                float
 
             case EType_Array:
 
             case EType_Array:
              recursively read multidimensional arrays
+
                uint32 typeKey
 +
                uint32 typeValue
 +
                uint32 arrayElements
 +
                for each arrayElements
 +
                    switch typeKey:
 +
                        case EType_Boolean:
 +
                            bool
 +
                        case EType_Integer:
 +
                            int32
 +
                        case EType_Real:
 +
                            float
 +
                        case EType_Text:
 +
                            string
 +
                    switch typeValue:
 +
                        case EType_Boolean:
 +
                            bool
 +
                        case EType_Integer:
 +
                            int32
 +
                        case EType_Real:
 +
                            float
 +
                        case EType_Text:
 +
                            string
 +
                        case EType_Int2:
 +
                            int32
 +
                            int32
 +
                        case EType_Int3:
 +
                            int32
 +
                            int32
 +
                            int32
 +
                        case EType_Vec2:
 +
                            float
 +
                            float
 +
                        case EType_Vec3:
 +
                            float
 +
                            float
 +
                            float
 +
                        case EType_Array:
 +
                            recursively read multidimensional arrays
    
The variable type is to be interpreted as follows:
 
The variable type is to be interpreted as follows:
 
  enum eScriptType
 
  enum eScriptType
 
  {
 
  {
  EType_Void = 0,
+
    EType_Void = 0,
  EType_Boolean,
+
    EType_Boolean,
  EType_Integer,
+
    EType_Integer,
  EType_Real,
+
    EType_Real,
  EType_Class,
+
    EType_Class,
  EType_Text,
+
    EType_Text,
  EType_Enum,
+
    EType_Enum,
  EType_Array,
+
    EType_Array,
  EType_ParamArray,
+
    EType_ParamArray,
  EType_Vec2,
+
    EType_Vec2,
  EType_Vec3,
+
    EType_Vec3,
  EType_Int3,
+
    EType_Int3,
  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)
 +
 +
''Note:'' This chunk has its own lookback string state (is encapsulated with CSystemArchiveEncapsuledChunk).
 +
 
  uint32 version (1)
 
  uint32 version (1)
 
  uint32
 
  uint32
 
  uint32 chunkSize
 
  uint32 chunkSize
 
  uint32 itemCount (number of embedded items)
 
  uint32 itemCount (number of embedded items)
 +
meta items[itemCount]
 
  uint32 zipSize (embedded items ZIP file size)
 
  uint32 zipSize (embedded items ZIP file size)
 
  byte zipFile[zipSize]
 
  byte zipFile[zipSize]
 +
uint32 textureCount
 +
string textures[textureCount]
    
'''21080001''' ''"VskDesc"''
 
'''21080001''' ''"VskDesc"''
Line 554: Line 642:  
  SCollectorStock archive[archiveCount]
 
  SCollectorStock archive[archiveCount]
 
     meta (blockName, collection, author)
 
     meta (blockName, collection, author)
     uint32
+
     uint32 numPieces
    
===CGameCtnChallengeParameters (03 05B 000)===
 
===CGameCtnChallengeParameters (03 05B 000)===
Line 643: Line 731:     
'''0305B00D'''
 
'''0305B00D'''
  uint32 (-1?)
+
  noderef raceValidateGhost (CGameCtnGhost) (usually -1)
   −
'''0305B00E'''
+
'''0305B00E''' (skippable)
(skippable)
+
  string mapType
  uint32
+
  string mapStyle
  uint32
   
  uint32
 
  uint32
   Line 665: Line 752:  
  fileref packDesc
 
  fileref packDesc
 
  fileref parentPackDesc
 
  fileref parentPackDesc
 +
 +
'''03059003''' ''"TM2020"''
 +
uint32 version
 +
fileref secondaryPackDesc
    
===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 675: Line 768:  
     string tag
 
     string tag
 
     uint32 order
 
     uint32 order
 +
 +
===CGameCtnAnchoredObject (03 101 000)===
 +
 +
'''03101002'''
 +
uint32 version
 +
meta (itemFile, collection, author)
 +
vec3 pitchYawRoll
 +
byte blockUnitX
 +
byte blockUnitY
 +
byte blockUnitZ
 +
lookbackstring anchorTreeId
 +
vec3 absolutePositionInMap
 +
CGameWaypointSpecialProperty waypointSpecialProperty (-1 if not a waypoint, otherwise direct node)
 +
if version < 5:
 +
    uint32
 +
if version >= 4:
 +
    uint16 flags
 +
    if version >= 5:
 +
        vec3 pivotPosition
 +
        if version >= 6:
 +
            float scale
 +
            if version >= 7:
 +
                if (flags & 4) == 4:
 +
                    fileRef packDesc
 +
                if version >= 8: // TM 2020
 +
                    vec3
 +
                    vec3
    
===CGameCtnReplayRecord (03 093 000)===
 
===CGameCtnReplayRecord (03 093 000)===
 
'''03093000''' ''"Version"''
 
'''03093000''' ''"Version"''
 
  uint32 version
 
  uint32 version
  if version >= 2:
+
  if version >= 3:
 
     meta (trackUID, environment, author)
 
     meta (trackUID, environment, author)
 
     uint32 time (ms)
 
     uint32 time (ms)
Line 769: Line 889:  
===CGameCtnGhost (03 092 000)===
 
===CGameCtnGhost (03 092 000)===
 
CGameCtnGhost is a subclass of CGameGhost. If you encounter an unknown chunk ID while reading a CGameCtnGhost instance, delegate it to CGameGhost.
 
CGameCtnGhost is a subclass of CGameGhost. If you encounter an unknown chunk ID while reading a CGameCtnGhost instance, delegate it to CGameGhost.
 +
 +
'''03092000''' (skippable)
 +
uint32
 +
meta playerModel
 +
vec3
 +
 +
uint32 numSkinRef
 +
fileref skinRef[numSkinRef]
 +
 +
uint32
 +
string ghostNickname
 +
string ghostAvatarFile
 +
uint32
    
'''03092005''' (skippable)
 
'''03092005''' (skippable)
Line 783: Line 916:     
'''0309200B''' (skippable)
 
'''0309200B''' (skippable)
  uint32 num
+
  uint32 numCheckpoints
  uint64[num]
+
  for each checkpoint:
 +
    uint32 time
 +
    uint32 stuntsScore (usually 0 in TM2)
    
'''0309200C'''
 
'''0309200C'''
Line 822: Line 957:     
'''03092019'''
 
'''03092019'''
  uint32 eventsDuration
+
  uint32 eventsDuration (if 0 then stop reading this chunk)
 
  uint32 ignored
 
  uint32 ignored
 
  uint32 numControlNames
 
  uint32 numControlNames
Line 855: Line 990:  
     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 = 64x64, 3 = 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 865: Line 1,007:  
  uint16 iconWidth
 
  uint16 iconWidth
 
  uint16 iconHeight
 
  uint16 iconHeight
  byte iconData[4*iconWidth*iconHeight]   // one RGBA uint32 per pixel
+
  if (int16)iconWidth >= 0 && (int16)iconHeight >= 0:
 +
    byte iconData[4*iconWidth*iconHeight] // one RGBA uint32 per pixel
 +
else:
 +
    uint16 version
 +
    if version >= 1:
 +
        uint32 size
 +
        byte iconData[size] // WebP image
    
'''0301A006''' (header)
 
'''0301A006''' (header)
Line 877: Line 1,025:  
  uint32
 
  uint32
 
  uint32
 
  uint32
 +
 +
'''0301A008'''
 +
byte
 +
string skinFile
    
'''0301A009'''
 
'''0301A009'''
Line 905: Line 1,057:     
'''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 997: Line 1,149:  
                     vec2
 
                     vec2
 
                     vec2
 
                     vec2
                     if version <= 5:
+
                     if version == 5:
 +
                        vec2 mapCoordElem
 +
                    if version == 6 || version == 7:
 
                         vec2 mapCoordElem
 
                         vec2 mapCoordElem
                    if version <= 7:
   
                         vec2 mapCoordIcon
 
                         vec2 mapCoordIcon
 
                     if version >= 7:
 
                     if version >= 7:
Line 1,050: Line 1,203:  
     string dirNameAlt
 
     string dirNameAlt
 
  if version >= 5:
 
  if version >= 5:
     bool unknown
+
     bool useDefaultSkin
    
===CGamePlayerProfile (03 08C 000)===
 
===CGamePlayerProfile (03 08C 000)===
Line 1,056: Line 1,209:  
  string onlineLogin
 
  string onlineLogin
 
  string onlineSupportKey
 
  string onlineSupportKey
 +
 +
===CGameCtnMediaClipGroup (03 07A 000)===
 +
'''0307A003'''
 +
uint32 ignored (0xA)
 +
uint32 numClips
 +
for each clip:
 +
    noderef clip
 +
uint32 numClips
 +
for each clip:
 +
    vec3 referenceFramePosition (NaN if none)
 +
    uint32 referenceFrameRotation
 +
    uint32 triggerCondition (0: None, 1: Time < arg, 2: Time > arg, 3: Already triggered, 4: Speed < arg, 5: Speed > arg, 6: Not already triggered)
 +
    float triggerArgument
 +
    uint32 numTriggers
 +
    for each trigger:
 +
        vec3 position
 +
 +
===CGameCtnMediaClip (03 079 000)===
 +
'''03079002'''
 +
uint32
 +
uint32 numTracks
 +
for each track:
 +
    noderef mediaTrack
 +
string clipName
 +
uint32
 +
 +
'''03079003'''
 +
uint32
 +
uint32 numTracks
 +
for each track:
 +
    noderef mediaTrack
 +
string clipName
 +
 +
'''03079004''' (all fields are ignored)
 +
uint32
 +
 +
'''03079005'''
 +
uint32 ignored (0xA)
 +
uint32 numTracks
 +
for each track:
 +
    noderef mediaTrack
 +
string clipName
 +
 +
'''03079007'''
 +
uint32 localPlayerClipEntIndex
 +
 +
'''0307900A'''
 +
bool stopWhenLeave
 +
 +
'''0307900D'''
 +
uint32
 +
uint32 version
 +
uint32 numTracks
 +
for each track:
 +
    noderef mediaTrack
 +
string clipName
 +
bool stopWhenLeave
 +
bool
 +
bool stopWhenRespawn
 +
string
 +
float
 +
uint32 localPlayerClipEntIndex
 +
 +
===CGameCtnMediaTrack (03 078 000)===
 +
'''03078001'''
 +
string trackName
 +
uint32 ignored (0xA)
 +
uint32 numTracks
 +
for each track:
 +
    noderef mediaBlock
 +
uint32 unknown
 +
 +
'''03078004'''
 +
bool keepPlaying
 +
uint32 ignored (0)
 +
 +
===CControlEffectSimi (07 010 000)===
 +
'''07010003'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    vec2 position
 +
    float rotation (in rad)
 +
    float scaleX
 +
    float scaleY
 +
    float opacity
 +
    float depth
 +
bool centered
 +
 +
'''07010004'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    vec2 position
 +
    float rotation (in rad)
 +
    float scaleX
 +
    float scaleY
 +
    float opacity
 +
    float depth
 +
    float
 +
    float isContinousEffect
 +
    float
 +
    float
 +
bool centered
 +
uint32 colorBlendMode
 +
bool isContinousEffect
 +
 +
'''07010005'''
 +
ReadChunk(0x07010004)
 +
bool isInterpolated
 +
 +
===CGameCtnMediaBlock===
 +
 +
====CGameCtnMediaBlockCameraPath (03 0A1 000)====
 +
'''030A1002'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    vec3 cameraPosition
 +
    float pitch (rad)
 +
    float yaw  (rad)
 +
    float roll  (rad)
 +
    float FOV
 +
    bool anchorRot
 +
    uint32 indexTargetPlayer (maxint: None, 0: Local player)
 +
    bool anchorVis
 +
    uint32 indexAnchorPlayer (maxint: None, 0: Local player)
 +
    vec3 targetPosition
 +
    float weight
 +
    float
 +
    float
 +
    float
 +
    float
 +
 +
====CGameCtnMediaBlockCameraCustom (03 0A2 000)====
 +
'''030A2005'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    uint32 interpolation (0: None, 1: Hermit, 2: Linear, 3: FixedTangent)
 +
    uint64 unused (0)
 +
    vec3 cameraPosition
 +
    float pitch (rad)
 +
    float yaw  (rad)
 +
    float roll  (rad)
 +
    float FOV
 +
    bool anchorRot
 +
    uint32 indexTargetPlayer (maxint: None, 0: Local player)
 +
    bool anchorVis
 +
    uint32 indexAnchorPlayer (maxint: None, 0: Local player)
 +
    vec3 targetPosition
 +
    float leftTangentX
 +
    float leftTangentY
 +
    float leftTangentZ
 +
    float rightTangentX
 +
    float rightTangentY
 +
    float rightTangentZ
 +
 +
====CGameCtnMediaBlockCameraEffectShake (03 0A4 000)====
 +
'''030A4000'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float intensity
 +
    float speed
 +
 +
====CGameCtnMediaBlockImage (03 0A5 000)====
 +
'''030A5000'''
 +
noderef CControlEffectSimi
 +
fileref image
 +
 +
====CGameCtnMediaBlockMusicEffect (03 0A6 000)====
 +
'''030A6001'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float musicVolume
 +
    float soundVolume
 +
 +
====CGameCtnMediaBlockSound (03 0A7 000)====
 +
'''030A7001'''
 +
fileref sound
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float volume
 +
    float pan
 +
 +
'''030A7002'''
 +
uint32 playCount
 +
bool isLooping
 +
 +
'''030A7003'''
 +
uint32 version
 +
uint32 playCount
 +
bool isLooping
 +
bool isMusic
 +
if version >= 1:
 +
    bool stopWithClip
 +
    if version >= 2:
 +
        bool audioToSpeech
 +
        int audioToSpeechTarget
 +
 +
'''030A7004'''
 +
fileref sound
 +
uint32 ignored (1)
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float volume
 +
    float pan (unused)
 +
    vec3 soundTransmitorPosition
 +
 +
====CGameCtnMediaBlockText (03 0A8 000)====
 +
'''030A8001'''
 +
string text
 +
noderef CControlEffectSimi
 +
 +
'''030A8002'''
 +
color textColor (with in-game color selector format)
 +
 +
====CGameCtnMediaBlockTrails (03 0A9 000)====
 +
'''030A9000'''
 +
float timeClipStart
 +
float timeClipEnd
 +
 +
====CGameCtnMediaBlockTransitionFade (03 0AB 000)====
 +
'''030AB000'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float opacity
 +
color transitionColor (with in-game color selector format)
 +
float ignored (1.0)
 +
 +
====CGameCtnMediaBlockFxColors (03 080 000)====
 +
'''03080003'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float intensity
 +
    float blendZ          (far)
 +
    float distance        (near)
 +
    float distance        (far)
 +
    additionnalParameters (near)
 +
    additionnalParameters (far)
 +
 +
additionnalParameters format:
 +
    float inverse
 +
    float hue
 +
    float saturation
 +
    float brightness
 +
    float contrast
 +
    color
 +
    float ignored  (1.0)
 +
    float ignored  (1.0)
 +
    float ignored  (1.0)
 +
    float ignored  (0.0)
 +
 +
====CGameCtnMediaBlockFxBlurDepth (03 081 000)====
 +
'''03081001'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float lensSize
 +
    bool forceFocus
 +
    float focusZ
 +
 +
====CGameCtnMediaBlockFxBlurMotion (03 082 000)====
 +
'''03082000'''
 +
float timeClipStart
 +
float timeClipEnd
 +
 +
====CGameCtnMediaBlockFxBloom (03 083 000)====
 +
'''03083001'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float intensity
 +
    float sensitivity
 +
 +
====CGameControlCameraFree (03 084 000)====
 +
'''03084003'''
 +
float timeClipStart
 +
float timeClipEnd
 +
lookbackstring cameraView
 +
uint32 indexTargetPlayer (0: Local player)
 +
 +
====CGameCtnMediaBlockTime (03 085 000)====
 +
'''03085000'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float timeValue
 +
    float tangent
 +
 +
====CGameCtnMediaBlock3dStereo (03 024 000)====
 +
'''03024000'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
    float separation
 +
    float screenDist
 +
 +
====CGameCtnMediaBlockTriangles (03 029 000)====
 +
'''03029001'''
 +
uint32 numKeys
 +
for each key:
 +
    float timeStamp
 +
uint32 numKeys
 +
uint32 numPoints
 +
for each key:
 +
    for each point:
 +
        vec3 pointPosition
 +
uint32 numPoints
 +
for each point: 
 +
    color pointColor (with in-game color selector format)
 +
    float opacity
 +
uint32 numTriangles
 +
for each triangle:  (index of the 3 vertices forming the triangle)
 +
    uint32 vertex1
 +
    uint32 vertex2
 +
    uint32 vertex3
 +
uint32 ignored (1)
 +
uint32 ignored (0)
 +
uint32 ignored (0)
 +
float  ignored (1.0)
 +
uint32 ignored (0)
 +
uint64 ignored (0)
 +
 +
====CGameCtnMediaBlockGhost (03 0E5 000)====
 +
'''030E5001'''
 +
float timeClipStart
 +
float timeClipEnd
 +
noderef ghostModel (CGameCtnGhost)
 +
float startOffset
 +
 +
'''030E5002'''
 +
uint32 version
 +
if version < 3:
 +
    float timeClipStart
 +
    float timeClipEnd
 +
if version >= 3:
 +
    uint32 numKeys
 +
    for each key:
 +
        float timeStamp
 +
        float
 +
noderef ghostModel (CGameCtnGhost)
 +
float startOffset
 +
bool noDamage
 +
bool forceLight
 +
bool forceHue
    
===CMwNod (01 001 000)===
 
===CMwNod (01 001 000)===
Line 1,072: Line 1,577:  
* [http://www.xaseco.org/tools.php Extract GBX data] - a PHP script to format and print data from all file types supported by the GBX Data Fetcher module.
 
* [http://www.xaseco.org/tools.php Extract GBX data] - a PHP script to format and print data from all file types supported by the GBX Data Fetcher module.
 
* [http://www.xaseco.org/tools.php Tally GBX versions] - a PHP script to tally some version data from all .Challenge|Map.Gbx files (includes sample challenges in all known versions).
 
* [http://www.xaseco.org/tools.php Tally GBX versions] - a PHP script to tally some version data from all .Challenge|Map.Gbx files (includes sample challenges in all known versions).
 +
* [https://github.com/BigBang1112/gbx-net GBX.NET] - a C#/.NET parser for .Gbx files.
 +
* [https://github.com/donadigo/pygbx pygbx] - a Python library to parse .Gbx files.
 +
* [https://github.com/ThaumicTom/gbx.js gbx.js] - a slim, fast and easy to set up Gamebox (GBX) parser written in vanilla JavaScript.
 +
* [https://github.com/stefan-baumann/ManiaPlanetSharp ManiaPlanetSharp] - a .NET library, written in C#, which provides easy-to-use, object-oriented ways to access data and services related to ManiaPlanet.
 
* [http://micolous.id.au/pages/disasm.html Trackmania Disassembler] - includes a library allowing you to write your own applications that can read the format.
 
* [http://micolous.id.au/pages/disasm.html Trackmania Disassembler] - includes a library allowing you to write your own applications that can read the format.
 
* {{ArchiveOrg|http://tossha.ru/trackstudio/|TrackStudio|https://web.archive.org/web/20160319194133/http://tossha.ru/trackstudio/}} - a Windows TrackMania Forever track editor with 3D interface.
 
* {{ArchiveOrg|http://tossha.ru/trackstudio/|TrackStudio|https://web.archive.org/web/20160319194133/http://tossha.ru/trackstudio/}} - a Windows TrackMania Forever track editor with 3D interface.
Line 1,084: Line 1,593:  
* [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]]
33

edits

Navigation menu