TRK

From Niotso Wiki
Jump to: navigation, search

TRK is a CSV format that defines a HIT track, analogous to the HOT Track section in the The Sims 1. It may optionally be stored as a Pascal string with a 4-byte little-endian length; if so, it is preceded by the 4-byte magic number "2DKT".

Its fields are:

  • Magic number - The 4-byte string "TKDT"
  • Version - Must be 0, 1, or 2 (this is usually 0)
  • Track name - The name of this track (may be blank); this also makes for a good label for the subroutine that handles the kSndobPlay event for this track (exported in the HIT export table)
  • Sound ID - The File ID of the sound associated with this track (may be zero)
  • Track ID - The File ID of this track (sometimes does not match up, e.g. in sting_romance)
  • Arguments - One of the following constants (see HIT constants):
    • kArgsNormal=0
    • kArgsVolPan=1
    • kArgsIdVolPan=2
    • kArgsXYZ=3
  • Unknown - Always 32
  • Control group - One of the following constants (see HIT constants):
    • kGroupSfx=1
    • kGroupMusic=2
    • kGroupVox=3
  • Unknown - 0 or 1
  • (In version 2 only) Unknown - Zero
  • Unknown - Zero
  • Clsid - Either 0x8a11e3a3 (the clsid for cSemTso2D, according to EA-Land's RTTI) or 0
  • Ducking priority - Either 32, 5000, or one of the following constants (see HIT constants):
    • duckpri_always 0x0
    • duckpri_low 0xa
    • duckpri_normal 0x14
    • duckpri_high 0x1e
    • duckpri_higher 0x28
    • duckpri_evenhigher 0x32
    • duckpri_never 0x64
  • Looped - 1 if this track is looped, 0 otherwise
  • Volume - Always 1024
  • Unknown - Zero
  • Unknown - Zero
  • Unknown - Blank
  • Unknown - Blank
  • Footer - "ETKD", a CRLF newline, or blank

XML[edit]

Tracks are also described in the XML format used in the Play Test version of the game with the use of the track tag as follows:

<track> TrackName Track Looped Patch GeneralHitList FemaleHitlist MaleHitlist ChildHitlist Unknown1 Unknown2 Unknown3 Unknown4 Unknown5 Unknown6 Username Time Unknown7 Looped </track>
  • TrackName - The name of this track
  • Track - The File ID of the TRK file associated with this track
  • Looped - 1 if this track is looped, 0 otherwise
  • Patch - The name of the patch associated with this track
  • GeneralHitlist - The File ID of the general hitlist associated with this track
  • FemaleHitlist - The File ID of the female voice hitlist associated with this track
  • MaleHitlist - The File ID of the male voice hitlist associated with this track
  • ChildHitlist - The File ID of the child voice hitlist associated with this track (this field is sometimes blank, meaning, there are exactly two spaces between the previous and next fields)
  • Unknown1 - Zero
  • Unknown2 - Zero
  • Unknown3 - Zero
  • Unknown4 - 0 or 1
  • Unknown5 - 0 or 1
  • Unknown6 - Usually 1, except for the sting tracks in houseparty.xml where this field is 0
  • Username - The Perforce username of the person who created the event; always pwilkinson for Paul Wilkinson
  • Time - A Unix timestamp indicating when this object was committed to Perforce
  • Unknown7 - 0 or 1
  • Looped - 1 if this track is looped, 0 otherwise (yes, curiously, there are two looped fields)