# What each kind of performance part does on a straight, with fixed inputs (no driver's judgement): Quick Race,
# Circuit, the first track, the first car; every part category stock, then category ${CAT} (0xffffffff: every one) at
# level ${LEVEL}; 5 s after GO (the AI cars gone) full throttle with nitrous (the pad's LB) held for ${PUSH} world ms, then
# full brakes to a stop.  The player's car's position and speed and the world clock every 3 frames.
# The categories (0x5A64A0's, by what they change in the car's info): 0 weight (+0x140), 1 gearbox (+0x1E8..),
# 2 nitrous (+0x2D0, +0x2DC), 3 engine, 4 turbo (+0x254 curve), 5 suspension (per wheel +0x48.., +0x1A0..), 6 brakes
# (+0x2A4..), 7 ECU (rpm +0x224/+0x228), 8 tyres (grip +0x10C/+0x110, +0x12C/+0x130: 1.45/1.2 -> 1.8/1.5), 9 +0x294..
# Repeatable to about 1 % (a stock Peugeot 206 on Resort Loop, 6 s at full throttle: 74 km/h; brakes 3: from there
# 14.6 m to a stop, not 16.6; tyres 3: 26 km/h at 2 s, not 23).  Nitrous added here does nothing: the car was built
# with none, and its tank is not refilled by the rebuild.  The game's AI drivers can't stand in for a player here: the
# autopilot and the opponents' AI lap a stock and a fully upgraded car within 1-3 % of each other.
#   run-suite --script carbal_straight.txt --env CAT=8 --env LEVEL=3 --env PUSH=6000 --env NFSU2_FIXED_DT=60 --env NFSU2_FPS=60
0       pad connect                                     # the synthetic pad: its LB is nitrous
0       waitfng UG_LS_Splash.fng 12000                  # title
+1000ms tapuntil RETURN MC_Background.fng 120 3000      # title -> profile prompt
+600ms  tapuntil RETURN GarageMain.fng 120 3000         # "No" -> main menu
+1500ms tapuntil RETURN UI_QRModeSelect.fng 240 3000    # Quick Race
+800ms  tapuntil RETURN UI_QRTrackSelect.fng 240 3000   # Circuit
+800ms  tapuntil RETURN UI_QRModeOptions.fng 240 3000   # the first track
+800ms  tapuntil RETURN UI_QRCarSelect.fng 240 3000     # options
+800ms  tapuntil RETURN GenericDialog_SMALL.fng 240 3000 # car -> transmission
+800ms  tapuntil RETURN PC_Loading.fng 240 3000         # transmission -> loading
+0    waitmem 0x8654a4 6 12000
+0    wzero
+0    log race_loaded
+60   call 0x5a64a0 ecx=*(*(*0x8900b4+4)+0x10)+0x2f0 0 0xffffffff
+0    call 0x5a64a0 ecx=*(*(*0x8900b4+4)+0x10)+0x2f0 ${LEVEL} ${CAT}
+0    call 0x5b4dc0 ecx=*(*(*0x8900b4+4)+0x10)+0x10 0 1 1
+10   log parts_set
+0    peekx *(*(*0x8900b4+4)+0x10)+0x10 3
+0    peekx *(*(*0x8900b4+4)+0x10)+0x150
+0    peekx *(*(*0x8900b4+4)+0x10)+0x2ec
+0    trace 3 x=[[0x8900b4]+4]+0x60 y=[[0x8900b4]+4]+0x64 v=[[0x8900b4]+4]+0x430 wt=i:0x86518c
14500wms log launch
+0    down UP
+0    pad LB down
+${PUSH}wms log brake
+0    up UP
+0    pad LB up
+0    down DOWN
+8000wms up DOWN
+0    log straight_end
+60   quit
