Difference between revisions of "TRK"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Whatevermind
(Created page)
 
m (3 revisions imported)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{MTS2}}
 
{{MTS2}}
  
'''TRK''' files (Track Definitions) have been known so far simply as sound settings files. These are the files that other things in the game such as UIs, effects, and [[exemplar]]s link to. They contain direct properties for either a single sound or a [[HLS|Hitlist playlist]], and can link sounds together with a respective [[TLO|logic object]]. Most of their properties are unknown, however.
+
'''TRK''' files (Track Definitions) have been known so far simply as sound settings files.  They are also referred to as TKD files. These are the files that other things in the game such as UIs, effects, and [[exemplar]]s link to. They contain direct properties for either a single sound or a [[HLS|Hitlist playlist]], and can link sounds together with a respective [[TLO|logic object]]. Most of their properties are unknown, however.
  
 
The following is a partial specification:
 
The following is a partial specification:
  Identifier
+
DWORD Identifier
  SoF
+
DWORD SoF
Start Signature
+
  Data Block (Comma Separated)
  Data Block (Comma Seperated)
 
EoF
 
  
The '''identifier''' of a TRK file is often 2DKT. It can also be TKDT. This is always the first 4 bytes in any TKD file so its easy to identify them by. TRK files are never compressed.
+
The '''identifier''' of a TRK file is always 2DKT. This is always the first 4 bytes in any TRK file so its easy to identify them by. TRK files are never compressed.
  
'''SOF''' is the size of the file in bytes after this point. It is a DWORD so it is easy to calculate.
+
'''SoF''' is the size of the file in bytes after this point. It is a DWORD so it is easy to calculate.
  
'''Start Signature''' is the start of data for a TKD file. Always TKDT in plain text.
+
Some TRK files are missing the identifier and SoF fields, and begin with the data block. This is often seen in [[Rush Hour]] files.
  
'''Data Block:'''
+
===Data Block===
 +
The '''data block''' always begins with a '''Start Signature''', which is always TKDT in plain text.
  
The data block is the main settings area of the TKD file. It consists of 30 commas which which separate 29 areas that can hold various types of data. It is unknown exactly what each area represents however.
+
The data block is the main settings area of the TRK file. It consists of 30 commas which which separate 31 areas that can hold various types of data. It is unknown exactly what each area represents however.
  
A temporary key follows,(Number 2),,XA Instance ID,TLO Instance ID,(1 byte val),(2 byte val),,(1 byte val),,(val),(9 to 10 byte val),,(1 byte val),(val),HLS Instance ID,,,,(1 byte val),(val),(val),,,(5 byte val),(val),,,(1 byte val),(1 byte val),
+
{| width="40%" border="1" cellspacing="0" cellpadding="2"
 +
|-
 +
|'''Item'''
 +
|'''Name'''
 +
|'''Value'''
 +
|-
 +
|
 +
|Start Signature
 +
|TKDT
 +
|-
 +
|0
 +
|
 +
|2
 +
|-
 +
|1
 +
|''unknown''
 +
|
 +
|-
 +
|2
 +
|XA Instance ID
 +
|
 +
|-
 +
|3
 +
|TLO Instance ID
 +
|
 +
|-
 +
|4
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|5
 +
|''unknown''
 +
|(2 bytes)
 +
|-
 +
|6
 +
|''unknown''
 +
|
 +
|-
 +
|7
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|8
 +
|''unknown''
 +
|
 +
|-
 +
|9
 +
|''unknown''
 +
|(val)
 +
|-
 +
|10
 +
|''unknown''
 +
|(9 to 10 bytes)
 +
|-
 +
|11
 +
|''unknown''
 +
|
 +
|-
 +
|12
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|13
 +
|''unknown''
 +
|(val)
 +
|-
 +
|14
 +
|HLS Instance ID
 +
|
 +
|-
 +
|15
 +
|''unknown''
 +
|
 +
|-
 +
|16
 +
|''unknown''
 +
|
 +
|-
 +
|17
 +
|''unknown''
 +
|
 +
|-
 +
|18
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|19
 +
|''unknown''
 +
|(val)
 +
|-
 +
|20
 +
|''unknown''
 +
|(val)
 +
|-
 +
|21
 +
|''unknown''
 +
|
 +
|-
 +
|22
 +
|''unknown''
 +
|
 +
|-
 +
|23
 +
|''unknown''
 +
|(5 bytes)
 +
|-
 +
|24
 +
|''unknown''
 +
|(val)
 +
|-
 +
|25
 +
|''unknown''
 +
|
 +
|-
 +
|26
 +
|''unknown''
 +
|
 +
|-
 +
|27
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|28
 +
|''unknown''
 +
|(1 byte)
 +
|-
 +
|
 +
|EoF
 +
|ETKD
 +
|}
  
Val means just any value. Items simply called "val" above are between 1 and 4 bytes long. The 9-10 and 1 byte bits mean that's all that has been seen as its value. This is by no means supposed to be a complete list. Commas with nothing between them means nothing has been seen between them yet.
+
Val means just any value. Items simply called "val" above are between 1 and 4 bytes long. The 9-10 and 1 byte bits mean that's all that has been seen as its value. This is by no means supposed to be a complete list. Commas with nothing between them means nothing has been seen between them yet.  Note that this does not mean data exists and hasn't been deciphered, there is simply ''nothing'' between the commas.
  
 
'''EoF''' is the end of file signature which is always ETKD immediately after the last comma of the data block.
 
'''EoF''' is the end of file signature which is always ETKD immediately after the last comma of the data block.
  
  
A Full TKD file might look like this:
+
A Full TRK file might look like this:
  
 
2DKTJ...TKDT,2,,0xaa726b1d,0xe9233083,0,32,,1,,50,174302531,,0,1024,0xe9dc0f3e,,,,0,111,1000,,,11111,779,,,0,1,ETKD
 
2DKTJ...TKDT,2,,0xaa726b1d,0xe9233083,0,32,,1,,50,174302531,,0,1024,0xe9dc0f3e,,,,0,111,1000,,,11111,779,,,0,1,ETKD
  
While a Typical TKD looks like:
+
While a typical TRK looks like:
  
 
2DKTJ...TKDT,2,,,0xe9233083,,,,,,50,,,,1024,0xe9dc0f3e,,,,0,,1000,,,,779,,,0,,ETKD
 
2DKTJ...TKDT,2,,,0xe9233083,,,,,,50,,,,1024,0xe9dc0f3e,,,,0,,1000,,,,779,,,0,,ETKD
 
[[Rush Hour]] trackdefs can now just skip the beginning 8 bytes altogether, though this is not always done.
 
  
  

Latest revision as of 18:55, 8 August 2019


TRK files (Track Definitions) have been known so far simply as sound settings files. They are also referred to as TKD files. These are the files that other things in the game such as UIs, effects, and exemplars link to. They contain direct properties for either a single sound or a Hitlist playlist, and can link sounds together with a respective logic object. Most of their properties are unknown, however.

The following is a partial specification:

DWORD  Identifier
DWORD  SoF
Data Block (Comma Separated)

The identifier of a TRK file is always 2DKT. This is always the first 4 bytes in any TRK file so its easy to identify them by. TRK files are never compressed.

SoF is the size of the file in bytes after this point. It is a DWORD so it is easy to calculate.

Some TRK files are missing the identifier and SoF fields, and begin with the data block. This is often seen in Rush Hour files.

Data Block

The data block always begins with a Start Signature, which is always TKDT in plain text.

The data block is the main settings area of the TRK file. It consists of 30 commas which which separate 31 areas that can hold various types of data. It is unknown exactly what each area represents however.

Item Name Value
Start Signature TKDT
0 2
1 unknown
2 XA Instance ID
3 TLO Instance ID
4 unknown (1 byte)
5 unknown (2 bytes)
6 unknown
7 unknown (1 byte)
8 unknown
9 unknown (val)
10 unknown (9 to 10 bytes)
11 unknown
12 unknown (1 byte)
13 unknown (val)
14 HLS Instance ID
15 unknown
16 unknown
17 unknown
18 unknown (1 byte)
19 unknown (val)
20 unknown (val)
21 unknown
22 unknown
23 unknown (5 bytes)
24 unknown (val)
25 unknown
26 unknown
27 unknown (1 byte)
28 unknown (1 byte)
EoF ETKD

Val means just any value. Items simply called "val" above are between 1 and 4 bytes long. The 9-10 and 1 byte bits mean that's all that has been seen as its value. This is by no means supposed to be a complete list. Commas with nothing between them means nothing has been seen between them yet. Note that this does not mean data exists and hasn't been deciphered, there is simply nothing between the commas.

EoF is the end of file signature which is always ETKD immediately after the last comma of the data block.


A Full TRK file might look like this:

2DKTJ...TKDT,2,,0xaa726b1d,0xe9233083,0,32,,1,,50,174302531,,0,1024,0xe9dc0f3e,,,,0,111,1000,,,11111,779,,,0,1,ETKD

While a typical TRK looks like:

2DKTJ...TKDT,2,,,0xe9233083,,,,,,50,,,,1024,0xe9dc0f3e,,,,0,,1000,,,,779,,,0,,ETKD