Difference between revisions of "Modding Whiplash/Fatal Racing"

From The /ovg/ Wiki
Jump to navigation Jump to search
Line 54: Line 54:
 
|<br><code>int</code>
 
|<br><code>int</code>
 
|-
 
|-
|Surface type?<br><code>int</code>
+
|Left surface type<br><code>int</code>
|Surface type?<br><code>int</code>
+
|Center surface type<br><code>int</code>
|Surface type?<br><code>int</code>
+
|Right surface type<br><code>int</code>
 
|<br><code>int</code>
 
|<br><code>int</code>
 
|<br><code>int</code>
 
|<br><code>int</code>
Line 111: Line 111:
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
|-
 
|-
|Least significant bit||31||||||||||||||24||||||||||||||||16||||||||||||||||8||||||||||||||||0
+
|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 1||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
|Surface type||||||||||||||Pit||||||
|-
+
||Transparent<br>Requires no texture||||||||||
|Surface type 2||||||||||||||Pit||||||||||||||||||||||||||||||||||||||||||||||||||
+
||||||Flip horizontally||||||||Apply texture
|-
+
|colspan=8|Texture
|Surface type 3||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
 
|}
 
|}
 +
* Texture
 +
** Bit 0: some sort of offset?
 +
*** For normal textures, left index+1 right index-3
 +
*** For transparent, makes it darker?
 +
** Bits 1-7: pair index, first texture on left, second on right
 +
*** <code>00000010</code> is first pair, <code>00000100</code> is second pair, etc
 +
====Values====
 
* AI line
 
* AI line
 
** >0: left
 
** >0: left
Line 126: Line 132:
 
** 0: full grip
 
** 0: full grip
 
** 12: ice
 
** 12: ice
* Surface type?
+
* Surface type
 
** 524703 590082 590082 appears to define a moving ramp or at least a surface the car can fly off of vertically
 
** 524703 590082 590082 appears to define a moving ramp or at least a surface the car can fly off of vertically
 
===Tuples?===
 
===Tuples?===

Revision as of 03:07, 12 March 2024

TRK file structure

Definition

Geometry length
int
0 0 int
Empty line
Empty line
Geometry
Tuples?
Empty line
Stunts
Empty line
Textures
Empty line
Race info
Empty line

Geometry

Track geometry.

Left shoulder width
int
Left lane width
int
Right lane width
int
Right shoulder width
int

int

int

int
Yaw rotation, clockwise (°)
float
Pitch rotation, upwards (°)
float
Roll rotation, clockwise (°)
float
AI line
int
AI line
int
AI line
int
AI line
int
Track grip
int

int
Right shoulder? grip
int

int

int

int

int

int
Left surface type
int
Center surface type
int
Right surface type
int

int

int

int

int

int

int

int

int

int

int

int

int

float

float

float

int

int

int

int

int

int

int

int

int

int

int

int

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 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Surface type Pit Transparent
Requires no texture
Flip horizontally Apply texture Texture
  • Texture
    • Bit 0: some sort of offset?
      • For normal 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

Values

  • AI line
    • >0: left
    • 0: center
    • <0: right
  • Grip
    • 0: full grip
    • 12: ice
  • Surface type
    • 524703 590082 590082 appears to define a moving ramp or at least a surface the car can fly off of vertically

Tuples?

Empty on some tracks.

index?
int

int
...
-1 -1

Stunts

Controls geometry that moves and potrudes. Empty on some tracks.

Geometry index
int
Scale factor?
int
Angle?
int
?
int
Timing group
int
Height
int
Time bulging
int
Time flat
int
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 file
TEX:<DRH file>
Building texture file
BLD:<DRH file>
BACKS:

int

int
...
-1

Race info

Not present on some tracks.

Track number
int
Impossible laps
int
Hard laps
int
Tricky laps
int
Medium laps
int
Easy laps
int
Girlie laps
int
Track map size, smaller is larger
float
Track map fidelity, smaller is more accurate
int

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