Main Article: wiki:Carrec
The RRR files (R3 files) are stored in the archive carrec.img. These files contain information about predefined paths used in missions of GTA:SA. When a vehicle is assigned to such a path with opcode 05EB or 085E, it is moving along the path without taking into account game physics and environment (traffic cars). Also it does not damage when collided. Opcode 0706 moves the vehicle to the next point along the path. 06FD sets a multiplier for the vehicle’s speed.
The R3 files structure is very simple. It’s a binary file being just a set of structures, without header. Each structure has a size of 32 bytes. A path point structure described below:
(offsets are decimal)
00 dword time
04 word velocity in direction X * 16383.5
06 word velocity in direction Y * 16383.5
08 word velocity in direction Z * 16383.5
10 byte XYZ.right.x * 127.0
11 byte XYZ.right.y * 127.0
12 byte XYZ.right.z * 127.0
13 byte XYZ.top.x * 127.0
14 byte XYZ.top.y * 127.0
15 byte XYZ.top.z * 127.0
16 byte Steering Angle * 20.0
17 byte Gas Pedal Power * 100.0
18 byte Break Pedal Power * 100.0
19 byte Handbrake used flag
20 float XYZ.pos.x
24 float XYZ.pos.y
28 float XYZ.pos.z
(XYZ is the structure that store information about a 3D-object world position (+0x14 offset)).
There’s a way to create new R3 path and use it in the script. I wrote a CLEO script which allows to record a vehicle movement data in-game and write it to a custom RRR file. This file is need to be added to the carrec.img then using any IMG archive editor and it’s ready to be used.
http://cleo.sannybui...ipts/carrec.rar (compiled CLEO script)
To get it work, you need to install CLEO 3 Library, put the carrec.cs to the "game\CLEO" folder, and start the game. Take any vehicle, press Shift+R (you should get a message box) to start recording. Then drive you vehicle along the path you want to create. When you finish, press Shift+R again to stop recording. The new RRR path is stored at the data\paths\carrec900.rrr file (by default; it could be changed in script).
The RRR file editor made by Sanchez:
Examples of new RRR paths made with the script are downloadable here:
Pay attention, that the game can only operate maximum with 475 RRR paths. The original installation has 426 of them, so the number of paths to add safely is 49.