Changes

Jump to navigation Jump to search
9,018 bytes added ,  12:48, 17 April 2022
→‎CGameCtnCollector (03 01A 000): WebP format for Item and Block icons
Line 396: Line 396:  
       uint32 compressedSize
 
       uint32 compressedSize
 
       byte compressedData[compressedSize] // ZLIB compressed lightmap cache node
 
       byte compressedData[compressedSize] // ZLIB compressed lightmap cache node
 +
 +
'''03043040''' (skippable) ''"items"''
 +
 +
''Note:'' This chunk resets the lookback string state.
 +
 +
uint32 version
 +
if version != 0:
 +
  uint32
 +
  uint32 size
 +
  uint32 (10)
 +
  uint32 numItems
 +
  for each item:
 +
    noderef item (CGameCtnAnchoredObject)
 +
  uint32
    
'''03043044''' (skippable)
 
'''03043044''' (skippable)
Line 509: Line 523:  
  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 573: Line 590:  
  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 662: Line 679:     
'''0305B00D'''
 
'''0305B00D'''
  uint32 (-1?)
+
  noderef raceValidateGhost (CGameCtnGhost) (usually -1)
   −
'''0305B00E'''
+
'''0305B00E''' (skippable)
(skippable)
+
  string mapType
  uint32
+
  string mapStyle
  uint32
   
  uint32
 
  uint32
   Line 684: Line 700:  
  fileref packDesc
 
  fileref packDesc
 
  fileref parentPackDesc
 
  fileref parentPackDesc
 +
 +
'''03059003''' ''"TM2020"''
 +
uint32 version
 +
fileref secondaryPackDesc
    
===CGameWaypointSpecialProperty (03 13B 000) ===
 
===CGameWaypointSpecialProperty (03 13B 000) ===
Line 696: Line 716:  
     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 >= 4:
 +
  uint16 flags
 +
  if version >= 5:
 +
    vec3 pivotPosition
 +
    if version >= 6:
 +
      float scale
 +
      if version >= 8: // TM 2020
 +
        vec3
 +
        vec3
    
===CGameCtnReplayRecord (03 093 000)===
 
===CGameCtnReplayRecord (03 093 000)===
Line 790: Line 832:  
===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 804: Line 859:     
'''0309200B''' (skippable)
 
'''0309200B''' (skippable)
  uint32 num
+
  uint32 numCheckpoints
  uint64[num]
+
  for each checkpoint:
 +
    uint32 time
 +
    uint32 stuntsScore (usually 0 in TM2)
    
'''0309200C'''
 
'''0309200C'''
Line 843: Line 900:     
'''03092019'''
 
'''03092019'''
  uint32 eventsDuration
+
  uint32 eventsDuration (if 0 then stop reading this chunk)
 
  uint32 ignored
 
  uint32 ignored
 
  uint32 numControlNames
 
  uint32 numControlNames
Line 876: Line 933:  
     lookbackstring
 
     lookbackstring
 
  if version >= 3:
 
  if version >= 3:
     uint32 flags // Unused2:1; IsInternal:1; IsAdvanced:1; IconDesc:5; Unused:24;
+
     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 886: Line 950:  
  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 898: Line 968:  
  uint32
 
  uint32
 
  uint32
 
  uint32
 +
 +
'''0301A008'''
 +
byte
 +
string skinFile
    
'''0301A009'''
 
'''0301A009'''
Line 926: Line 1,000:     
'''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 1,078: Line 1,152:  
  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,106: Line 1,532:  
* [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]]

Navigation menu