Difference between revisions of "Modding Whiplash/Fatal Racing"
Jump to navigation
Jump to search
Aspirations (talk | contribs) |
Aspirations (talk | contribs) |
||
Line 138: | Line 138: | ||
!Value!!Name!!Description!!Requires apply bit?!!Texturing | !Value!!Name!!Description!!Requires apply bit?!!Texturing | ||
|- | |- | ||
− | |0||TOWER||tall box||Yes|| | + | |0||TOWER||tall box||Yes||Index |
|- | |- | ||
− | |1||TOWER 2||tall box, different texture|| | + | |1||TOWER 2||tall box, different texture||No||Fixed (22) |
|- | |- | ||
− | |2||SIGN 1||small, back upside down, on one leg||Yes, but not for legs|| | + | |2||SIGN 1||small, back upside down, on one leg||Yes, but not for legs||Index, but not for legs (20) |
|- | |- | ||
− | |3||SIGN 2||small, back upside down, on two legs||Yes, but not for legs|| | + | |3||SIGN 2||small, back upside down, on two legs||Yes, but not for legs||Index, but not for legs (21) |
|- | |- | ||
|4||BUILD||complex building, drawn differently, different texture||No||Fixed (20, 21) | |4||BUILD||complex building, drawn differently, different texture||No||Fixed (20, 21) | ||
|- | |- | ||
− | |5||BUILD 1||giant tall folded boxes, different texture||No||Fixed ( | + | |5||BUILD 1||giant tall folded boxes, different texture||No||Fixed (0) |
|- | |- | ||
|6||BUILD 2||more giant tall folded box, different texture||No||Fixed (20) | |6||BUILD 2||more giant tall folded box, different texture||No||Fixed (20) | ||
|- | |- | ||
− | |7||BUILD 3||WIDE short box||Yes|| | + | |7||BUILD 3||WIDE short box||Yes||Index |
|- | |- | ||
|8||HEELBAR||cube, different texture||No||Fixed (8) | |8||HEELBAR||cube, different texture||No||Fixed (8) | ||
|- | |- | ||
− | |9||BALLOON||flat square, always face camera||Yes|| | + | |9||BALLOON||flat square, always face camera||Yes||Index |
|- | |- | ||
− | |10||TREE||flat skinny rectangle, always face camera||No||Fixed ( | + | |10||TREE||flat skinny rectangle, always face camera||No||Fixed (1) |
|- | |- | ||
− | |11||ADVERT||flat small square, fixed, same back||Yes|| | + | |11||ADVERT||flat small square, fixed, same back||Yes||Index |
|- | |- | ||
− | |12||ADVERT 2||fixed flat square, back upside down||Yes|| | + | |12||ADVERT 2||fixed flat square, back upside down||Yes||Index |
|- | |- | ||
− | |13||QUAD BLD||4 tall skinny boxes|| | + | |13||QUAD BLD||4 tall skinny boxes||No||Fixed (23, 24, 25, 26) |
|- | |- | ||
− | |14||BLD 0||tall box with pyramid top, different texture||No||Fixed (20) | + | |14||BLD 0||tall box with pyramid top, different texture||No||Fixed (20, 21) |
|- | |- | ||
− | |15||BIG BALL||flat square, always face camera, larger than BALLOON||Yes|| | + | |15||BIG BALL||flat square, always face camera, larger than BALLOON||Yes||Index |
|- | |- | ||
− | |16||BIG AD||fixed flat square, back upside down, smaller than ADVERT 2||Yes|| | + | |16||BIG AD||fixed flat square, back upside down, smaller than ADVERT 2||Yes||Index |
|- | |- | ||
|>=256||no idea | |>=256||no idea | ||
|} | |} | ||
+ | Textures are determined by BLD file. | ||
+ | * Index: first 9 bits work just like road textures | ||
+ | * Fixed: Same texture is always applied (index in parentheses) | ||
====Shoulder height==== | ====Shoulder height==== | ||
* >0: up | * >0: up |
Revision as of 17:12, 23 March 2024
TRK file structure
The tracks.
Definition
Geometry lengthint |
0 | 0 | int
|
Empty line | |||
Empty line | |||
Geometry | |||
Signs | |||
Empty line | |||
Stunts | |||
Empty line | |||
Textures | |||
Empty line | |||
Race info | |||
Empty line |
//
denotes a single line comment- integer values are 32-bit signed integers
- floating point values are double precision
Geometry
Track geometry.
Left shoulder widthint
|
Left lane widthint
|
Right lane widthint
|
Right shoulder widthint
|
Left shoulder heightint
|
Right shoulder heightint
|
Lengthint
|
Yaw rotation, clockwise (°)float
|
Pitch rotation, upwards (°)float
|
Roll rotation, clockwise (°)float
|
AI lineint
|
AI lineint
|
AI lineint
|
AI lineint
|
Track gripint
|
Left shoulder gripint
|
Right shoulder gripint
|
int
|
int
|
int
|
int
|
int
| ||||||||
Left surface typeint
|
Center surface typeint
|
Right surface typeint
|
Left wall type?int
|
Right wall type?int
|
Roof type?int
|
int
|
Left outer extra wall type?int
|
int
|
Right outer extra wall type?int
|
int
|
Environment floor typeint
|
Sign type?int
|
int
|
int
|
float
|
float
|
float
| ||||||||||||
Left outer upper extra wall angle?int
|
Left outer lower extra wall angle?int
|
int
|
int
|
Right outer lower extra wall angle?int
|
Right outer upper extra wall angle?int
|
Left outer upper extra wall heightint
|
Left outer lower extra wall heightint
|
int
|
int
|
Right outer lower extra wall heightint
|
Right outer upper extra wall heightint
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
int
|
Empty line | |||||||||||||||||||||||||||||
... |
Surface type bit flags
Least significant bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Surface type | Pit | Wall between track and shoulder |
Transparent Requires no texture |
Non-magnetic | Flip vertically | Non-solid | Texture pair | Flip horizontally | Apply texture | Texture |
- Texture
- Bit 0: some sort of offset?
- For normal pair textures, left index+1 right index-3
- For transparent, makes it darker?
- Bits 1-7: pair index, first texture on left, second on right
00000010
is first pair,00000100
is second pair, etc
- Bit 0: some sort of offset?
Sign type
Value | Name | Description | Requires apply bit? | Texturing |
---|---|---|---|---|
0 | TOWER | tall box | Yes | Index |
1 | TOWER 2 | tall box, different texture | No | Fixed (22) |
2 | SIGN 1 | small, back upside down, on one leg | Yes, but not for legs | Index, but not for legs (20) |
3 | SIGN 2 | small, back upside down, on two legs | Yes, but not for legs | Index, but not for legs (21) |
4 | BUILD | complex building, drawn differently, different texture | No | Fixed (20, 21) |
5 | BUILD 1 | giant tall folded boxes, different texture | No | Fixed (0) |
6 | BUILD 2 | more giant tall folded box, different texture | No | Fixed (20) |
7 | BUILD 3 | WIDE short box | Yes | Index |
8 | HEELBAR | cube, different texture | No | Fixed (8) |
9 | BALLOON | flat square, always face camera | Yes | Index |
10 | TREE | flat skinny rectangle, always face camera | No | Fixed (1) |
11 | ADVERT | flat small square, fixed, same back | Yes | Index |
12 | ADVERT 2 | fixed flat square, back upside down | Yes | Index |
13 | QUAD BLD | 4 tall skinny boxes | No | Fixed (23, 24, 25, 26) |
14 | BLD 0 | tall box with pyramid top, different texture | No | Fixed (20, 21) |
15 | BIG BALL | flat square, always face camera, larger than BALLOON | Yes | Index |
16 | BIG AD | fixed flat square, back upside down, smaller than ADVERT 2 | Yes | Index |
>=256 | no idea |
Textures are determined by BLD file.
- Index: first 9 bits work just like road textures
- Fixed: Same texture is always applied (index in parentheses)
Shoulder height
- >0: up
- 0: flat
- <0: down
AI line
- >0: left
- 0: center
- <0: right
Grip
- 0: full grip
- 12: ice
Wall type?
- Left and right combine to determine ceiling
Outer lower/upper extra wall angle?
- Not the actual walls
- >0: outward
- 0: vertical
Third row
These properties only ever have these values over all 11018 geometry segments of the retail tracks.
Property index | Values |
---|---|
16 | 20,40,60 |
17 | 20,40,60,80 |
18 | 20,40 |
19 | 20 |
20 | 20 |
21 | 20,40,60,80 |
22 | 1 |
23 | 20 |
24 | 1,20,40 |
25 | 20 |
26 | 1 |
Signs
Empty on some tracks.
Signable geometry index?int |
Textureint
|
... | |
-1 | -1 |
- Texture
- Bit 0: unset is normal
- Bits 1-7: index in BLD texture file
- Bit 8: apply texture
Stunts
Controls geometry that moves and potrudes. Empty on some tracks.
Geometry indexint
|
Scale factor?int
|
Angle?int
|
?int
|
Timing groupint
|
Heightint
|
Time bulgingint
|
Time flatint
|
Smaller expands/larger contracts?int
|
Bulge?int
|
... | |||||||||
-1 |
- Scale factor?
- Increases the length and height of the "ramp"
- 1 is a bump, 4 starts breaking textures, 6 is huge vertical wall
- Angle?
- Lower is flatter, higher becomes trapezoid with longer top
- ?
- No clue
- Timing group
- With otherwise identical config, two bumps with same number move together, with 1 and 2 move oppositely
Textures
Texture fileTEX:<DRH file>
| |
Building texture fileBLD:<DRH file>
| |
BACKS:
| |
int |
int
|
... | |
-1 |
Race info
Not present on some tracks.
Track numberint
| |||||
Impossible lapsint |
Hard lapsint |
Tricky lapsint |
Medium lapsint |
Easy lapsint |
Girlie lapsint
|
Track map size, smaller is largerfloat |
Track map fidelity, smaller is more accurateint |
float
|
Effects
Bonus 7
- Swapping yaw and pitch: loop
- Swapping yaw and roll: twisting line
- Swapping yaw and pitch, roll 90.00000: vertical ring to the left
- Negative yaw: turnright
Length
Given Pulse at its maximum 193 mph on a modified Bonus 4 where all 494 sectors are 1200 long can complete at lap in 28.36 seconds and on the same track but with 50 flat sectors on each side shortened to 100 can complete a lap in 27.41 seconds, 1000 length units is equivalent to 13.45 ft or 4.10 m. Additionally, the rotated portions of the track contribute approximately 0.20 seconds extra compared to flat.