Quantcast

Jump to content

» «
Photo

[DOC|SA] User Tracks Information File Format

No replies to this topic
AuahDark
  • AuahDark

    Walking in the shadow of darkness

  • New Members
  • Joined: 20 Dec 2015
  • Indonesia

#1

Posted 20 December 2015 - 12:29 PM

San Andreas User Tracks information file format.

 

The user tracks information consist of 2 files, sa-ufiles.dat and sa-utrax.dat

 

sa-ufiles.dat contains all file names (including the path) of the user tracks stored in GTA San Andreas User Files\User Tracks. The start of the basename is noted with 2 backslashes

Please note that there's no NULL-terminator string in that file, so sa-utrax.dat is used to index those file paths. Example: <file1> is "C:\Windows\test.mp3" and <file2> is "D:\test.mp3". The contents of sa-ufiles.dat would be "C:\Windows\\test.mp3D:\\test.mp3" (notice those 2 backslashes)

 

sa-utrax.dat is used to index the paths in the sa-ufiles.dat. It has following format:

 

4 bytes - file path start in sa-ufiles.dat

4 bytes - string length

4 bytes - audio type, where 1 = OGG, 2 = WAV, 3 = MP3, 4 = AAC/M4A (maybe 4 = Codec from system?)

 

All values are in little-endian.

 

There's no value that determines "how much" user tracks that available in the User Tracks folder. Instead, the game just keep reading this file until it reaches End-Of-File. Actually, there's a way to know how much user tracks available, by dividing this file size by 12.

 

 

Based from information above, it's possible to "actually" tell the game to load tracks from another path. I've been made such program and I'll share it later.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users