Difference between revisions of "Highscore file format"
From Stunts Wiki
(Links for stuntshs) |
(+category, plus minor copyediting. Thanks for the contribution :)) |
||
Line 1: | Line 1: | ||
− | This | + | This article describes the file format of the highscore files used by all versions of Stunts. |
− | Each | + | Each track has its own highscore table, stored in a file which shares the name of the track file; only with .HIG extension instead of .TRK . |
{| class="wikitable" | {| class="wikitable" | ||
Line 39: | Line 39: | ||
|} | |} | ||
− | The | + | The 4th field (Opponent) has the following structure: |
{| class="wikitable" | {| class="wikitable" | ||
|- class="hintergrundfarbe5" | |- class="hintergrundfarbe5" | ||
Line 73: | Line 73: | ||
|} | |} | ||
− | The | + | The size of an entry is 52 bytes. |
− | Every | + | Every highscore file contains exactly 7 Entries = 364 Bytes per File. |
− | The | + | The 5th field (Time) is expressed in Hundreds of a Second, and is calculated as follows: |
TIME = time [1] * 1280 + time [0] * 5 | TIME = time [1] * 1280 + time [0] * 5 | ||
− | To convert this time to normal min:sec: | + | To convert this time to normal min:sec:hundredths format, use the following calculations |
(hundr contains the time in hundreds): | (hundr contains the time in hundreds): | ||
hundreds = (hundr % 100) | hundreds = (hundr % 100) | ||
Line 87: | Line 87: | ||
== Weblinks == | == Weblinks == | ||
* [http://marm.homepage.t-online.de/files/stuntshs.tar.gz Stuntshs: A Package for listing, adding and deletion of Entries of an Stunts Highscore File] | * [http://marm.homepage.t-online.de/files/stuntshs.tar.gz Stuntshs: A Package for listing, adding and deletion of Entries of an Stunts Highscore File] | ||
+ | |||
+ | [[Category:Modding]] |
Revision as of 21:32, 16 April 2011
This article describes the file format of the highscore files used by all versions of Stunts. Each track has its own highscore table, stored in a file which shares the name of the track file; only with .HIG extension instead of .TRK .
Offset | Data Type | Length | Field Name | Description |
---|---|---|---|---|
0 | CHAR[17] (ASCIIZ) | 17 | Name | Driver's Name, terminated with a NUL Character |
17 | CHAR[21] (ASCIIZ) | 21 | Car | Driver's Car, terminated with a NUL Character |
38 | CHAR[4] | 4 | Unknown | Unknown Data is stored Here |
42 | CHAR[8] (ASCIIZ) | 8 | Opponent | |
50 | UCHAR[2] | 2 | Time |
The 4th field (Opponent) has the following structure:
Offset | Data Type | Length | Field Name (or constant) | Description |
---|---|---|---|---|
0 | CHAR[2] | 2 | Opponent ID | |
2 | CHAR | 1 | Character '/' | |
3 | CHAR[4] | 4 | Opponent Car | |
7 | CHAR | 1 | NUL Character |
The size of an entry is 52 bytes. Every highscore file contains exactly 7 Entries = 364 Bytes per File. The 5th field (Time) is expressed in Hundreds of a Second, and is calculated as follows:
TIME = time [1] * 1280 + time [0] * 5
To convert this time to normal min:sec:hundredths format, use the following calculations (hundr contains the time in hundreds):
hundreds = (hundr % 100) hundr /= 100 sec = (hundr % 60) min = (hundr / 60)