The TD4 file stores track design information. The file is in compressed format
from a Run-Length-Encoding algorithm. The last four
bytes are a checksum. The term "RCT" is used
to refer to the original version of "Roller Coaster Tycoon" while the term
"AA/CF" is used to refer to the expansion pack titled "Added Attractions"
in most countries and "Corkscrew Follies" in the United States. Items listed
as ? have values in some files but I have not determined their meaning.
The color assignments are listed below. For original RCT, the decoded
file length is 8058 (decimal) bytes. For "AA/CF" and "Loopy Landscapes",
the decoded file length is 8198 (decimal) bytes.
The decoded format is as follows:
00 Ride type
01 Vehicle type (note: for mazes, the vehicle
type will be "00")
The next four bytes flag "special" track pieces. These pieces are not always
available to the user as they may not have been researched. These items
correspond to the Ride
Features table used within the game.
02 : bit 7 = vertical loop
03 : no bits are "researchable"
04 : bit 1=inline twist, bit 2=half loop, bit 3=corkscrew
05 : bit 3=water splash, bit 5=barrel roll, bit 6=launched lift hill, bit
7=large loop
06 Operating mode
07 Vehicle color scheme (scheme in bits 1
& 0; bit 2 indicates whether this file is in original RCT or the longer
AA/CF expansion format)
08 body color #1
09 trim color #1
0A body color #2
0B trim color #2
...
1E body color #12
1F trim color #12
20 track spine color (RCT only, ignored in AA/CF & LL)
21 track rail color (RCT only, ignored in AA/CF & LL)
22 support color (RCT only, ignored in AA/CF & LL)
23 departure control flags
24 number of trains
25 number of cars per train
26 minimum wait time in seconds
27 maximum wait time in seconds
28 speed (powered launch/chairlift/whoa belly) [1 bit = 3.616 km/hr = 2.25
mph] -or- number of laps for go-karts -or- maximum number of people (eg.
maze)
29 maximum speed of ride [1 bit = 3.616 km/hr = 2.25 mph]
2A average speed of ride [1 bit = 3.616 km/hr = 2.25 mph]
2B lower byte of ride length [meters]
2C upper byte of ride length [meters]
2D positive G-force [1 bit = 0.32g]
2E negative G-force [1 bit = 0.32g]
2F lateral G-force [1 bit = 0.32g]
30 number of inversions [lower 5 bits] - or- number of mini golf holes
31 number of drops [lower 6 bits]
32 highest drop [1 bit = 1/3 meter ~ 1 foot]
33 excitement [divide this by 10]
34 intensity [divide this by 10]
35 nausea [divide this by 10]
36 , 37? (this appears to be a two byte value related to the weight
of a coaster vehicle)
eg: monorail
8 cars: 46
7 cars: 44
6 cars: 42
5 cars: 40
4 cars: 3E
3 cars: 3C
2 cars: 3A
1 car: 38
38 beginning of track data in original RCT format.
The following applies to files saved from the AA/CF or LL expansion pack:
38 spine color 0
39 spine color 1
3A spine color 2
3B spine color 3
3C rail color 0
3D rail color 1
3E rail color 2
3F rail color 3
40 support color 0 [wall type for mazes: 0=brick, 1=hedge, 2=ice, 3=wooden]
41 support color 1
42 support color 2
43 support color 3
44 : ?: 02 = reverser track present in log flume
45 to C3 are reserved
C4 beginning of track data in AA/CF format.
There are two formats that I know of: one for mazes and one for everything else (coasters, trains, cars etc.) The "coaster" format is as follows:
Each track element has two bytes. The first byte indicates the type of track segment while the second byte is a qualifier. The track data concludes when a value of "FF" is encountered for the track segment. The remainder of the file is filled with 00's.
All numbers are in hex
Code | R |
G |
B |
|
00 | 2F | 40 | 3F | |
01 | 6F | 80 | 7F | |
02 | B0 | C0 | BF | |
03 | 70 | 77 | AF | |
04 | 80 | 50 | B0 | |
05 | 0F | 40 | B0 | |
06 | 3F | 87 | DF | |
07 | 20 | 90 | 8F | |
08 | 1F | 78 | 00 | |
09 | 4F | 87 | 5F | |
0A | 5F | 8F | 30 | |
0B | 40 | AF | 20 | |
0C | 80 | 9F | 5F | |
0D | 80 | 88 | 30 | |
0E | D0 | A7 | 0F | |
0F | 8F | 50 | 00 | |
10 | FF | 6F | 10 | |
11 | B0 | 47 | 00 | |
12 | AF | 80 | 3F | |
13 | 7F | 57 | 1F | |
14 | 70 | 67 | 40 | |
15 | CF | 80 | 5F | |
16 | 9F | 38 | 30 | |
17 | 8F | 00 | 00 | |
18 | 07 | 00 | DF | |
19 | D0 | 38 | 8F | |
1A | E0 | 9F | 9F | |
1B | 8F | 07 | 40 | |
1C | 3F | 40 | 70 | |
1D | 7F | CF | CF | |
1E | FF | E7 | 2F | |
1F | 8F | D0 | EF |