Tutorials

 Reply to this postStart new topic

Carrec Tutorial

Mora Hannover
post Jan 15 2015, 01:39 PM
Post #1


Ameteur Member

Posts: 42
Joined: 3-November 14



R3 Paths(Carrec) its files extension is .RRR cause SA is a 3D Game, if it is a 4D Game(which is not gonna happen) it would be .RRRR,
Rockstar Games used Carrec since San Andreas (so,it is not available for GTA1,GTA_London1969,GTA_London1961,GTA2,GTA3,GTA Vice City and GTA Advance)
While the car is going on a Carrec Path it is unaware of environment and will be very heavy(i don't mean indestructible but instoppable) only will be stopped destroying it
or releasing it from the path from the script
Carrec Coding is so hard but this tutorial how to make a carrec path in seconds using the Seemann's Carrec recorder and Sanchez RRR File editor.
Actually this tutorial is for SA.
the R3 Paths are stored in carrec.img in (your gta sa directory)/data/paths
a little more explanation
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, found by Seemann
(offsets are decimal)

CODE
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
32 end

(XYZ is the structure that store information about a 3D-object world position (+0x14 offset)).

now lets start,
First Download CLEO
and install the Carrec Recorder Script by Seemann
then also download the R3D File Editor by Sanchez
and then in game enter any car press Shift+R and start driving ,when you finish press Shift+R again. When you assign this path to another car it will drive the same path exactly you driven.
here is a video
https://www.youtube.com/watch?v=j2vpQfXzVHs...ayer_detailpage
after you finished you will find the rrr file in (Your Game Directory)/data/Paths with the name "carrec900.rrr"

now open R3D.exe as Administrator if using Windows Vista,7,8 or 8.1 .
select File > Open

and select carrec.img in your (Your Game Directory)/Paths

select any carrec file and right click then select Add

go to the carrec file at (Your Game Directory)/Paths and select the carrec file

and now click File > Save


and now in your script load the path using opcode 07C0 and check if it is available using opcode 07C1 and assign it to car using opcode 05EB and release it using 0873
here is a code of mine i use to assing a car to path.
CODE
:PHL1_LOAD
0247: load_model #COPCARLA
0247: load_model #LAPD1
07C0: load_path 900
038B: load_requested_models

:PHL1_CHECK
07C1:   path 900 available
0248:   model #COPCARLA available
0248:   model #LAPD1 available
jf @PHL1_CHECK
else_jump @PHL1_PLAY

:PHL1_PLAY
107@ = Car.Create(#COPCARLA, 2221.1501, -1714.2797, 13.0384)
108@ = Actor.CreateAsDriver(23,#LAPD1,107@)
05EB: assign_car 107@ to_path 900
0873: release_path 900


Hope I Helped

This post has been edited by Mora Hannover: Jan 15 2015, 01:41 PM


--------------------
Rest in Peace Yeardley Diamond (Dec. 21, 1985 - Aug. 20, 2014)
Rest in Peace Kitty0706 (1994 - Jan. 25, 2015)
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: