Seemann Posted October 11, 2007 Share Posted October 11, 2007 (edited) Main Article: wiki:CarrecThe 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) CODE 00 dword time04 word velocity in direction X * 16383.506 word velocity in direction Y * 16383.508 word velocity in direction Z * 16383.510 byte XYZ.right.x * 127.011 byte XYZ.right.y * 127.012 byte XYZ.right.z * 127.013 byte XYZ.top.x * 127.014 byte XYZ.top.y * 127.015 byte XYZ.top.z * 127.016 byte Steering Angle * 20.017 byte Gas Pedal Power * 100.018 byte Break Pedal Power * 100.019 byte Handbrake used flag20 float XYZ.pos.x24 float XYZ.pos.y28 float XYZ.pos.z32 end (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://sannybuilder.com/dev/carrec.txt (source)http://cleo.sannybuilder.com/scripts/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:http://sannybuilder.com/files/R3D.rarExamples of new RRR paths made with the script are downloadable here:http://sannybuilder.com/dev/temp/carrec900.rrrhttp://sannybuilder.com/dev/temp/carrec998.rrrPay 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.Original source:http://sannybuilder.com/forums/viewtopic.php?id=107Enjoy. Edited February 4, 2014 by Seemann RyanDri3957V, CowBoy69, KaizerHind and 1 other 4 Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site Link to comment Share on other sites More sharing options...
Beep Posted October 11, 2007 Share Posted October 11, 2007 Good work Seemann! Keep it up ! Link to comment Share on other sites More sharing options...
Midnightz Posted November 5, 2007 Share Posted November 5, 2007 Wow, that was helpful! Now I understand some of the issues I was having when writing a mod - thank you very much. Worthy of a PIN, IMHO. I look forward to utilizing CLEO and the recorder function! Link to comment Share on other sites More sharing options...
ZAZ Posted December 8, 2007 Share Posted December 8, 2007 Excellent Thats what we need to let car drives safe on their route Please correct 2 details in your post When a vehicle is assigned to such a path with opcode 05BE or 05BE is 05BE: AS_kill_actor @54 you mean 05EB: assign_car [email protected] to_path 706 and the your carrec.sc stores the carrec.rrr in in GTASA\data\Paths I made a exemble script. press key 11// YES-key, in any state It teleport the player to SF Airport on motorbike and spawns an actor on motorbike to drive around the airport terminal click to get the necessary carrec.rrr 004F: create_thread @Drive_1 :Drive_1////------------------sannybuilder code03A4: name_thread 'DRIV' :DRIV_110001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @DRIV_11 077E: get_active_interior_to $ACTIVE_INTERIOR 00D6: if and0038: $ACTIVE_INTERIOR == 0 00E1: player 0 pressed_key 11//<<<<<-------------press YES-key in any state 004D: jump_if_false @DRIV_11 016A: fade 0 time 250 0001: wait 250 ms 01B4: set_player $PLAYER_CHAR can_move 0 0362: remove_actor $PLAYER_ACTOR from_car_and_place_at -1338.5 -408.1 14.1 0173: set_actor $PLAYER_ACTOR Z_angle_to 90.8 0001: wait 500 ms 0247: load_model #NRG500 0247: load_model #MAFFA 07C0: load_path 840 :DRIV_1280001: wait 0 ms 00D6: if and0248: model #NRG500 available 0248: model #MAFFA available 07C1: path 840 available 004D: jump_if_false @DRIV_128 00A5: [email protected] = create_car #NRG500 at -1333.5 -408.1 14.1 0175: set_car [email protected] Z_angle_to 280.0 0224: set_car [email protected] health_to 2000 00A5: [email protected] = create_car #NRG500 at -1354.5 -419.1 14.1 0175: set_car [email protected] Z_angle_to 280.0 0224: set_car [email protected] health_to 2000 020A: set_car [email protected] door_status_to 4 02AC: set_car [email protected] immunities BP 1 FP 1 EP 1 CP 1 MP 1 01EC: make_car [email protected] very_heavy 1 0129: [email protected] = create_actor_pedtype 24 model #MAFFA in_car [email protected] driverseat 0223: set_actor [email protected] health_to 3000 04E4: unknown_refresh_game_renderer_at -1333.5 -408.1 03CB: set_rendering_origin_at -1333.5 -408.1 14.1 029B: [email protected] = init_object #AD_JUMP at -1576.02 -202.34 13.76 0177: set_object [email protected] Z_angle_to 270.0 01C7: remove_object_from_mission_cleanup_list [email protected] 0382: set_object [email protected] collision_detection 1 029B: [email protected] = init_object #AD_JUMP at -1597.9 -506.5 21.7 0177: set_object [email protected] Z_angle_to 270.0 01C7: remove_object_from_mission_cleanup_list [email protected] 0382: set_object [email protected] collision_detection 1 029B: [email protected] = init_object #AD_JUMP at -1375.9 -581.5 13.69 0177: set_object [email protected] Z_angle_to 270.0 01C7: remove_object_from_mission_cleanup_list [email protected] 0382: set_object [email protected] collision_detection 1 029B: [email protected] = init_object #AD_JUMP at -1374.9 -585.5 13.69 0177: set_object [email protected] Z_angle_to 270.0 01C7: remove_object_from_mission_cleanup_list [email protected] 0382: set_object [email protected] collision_detection 1 0177: set_object [email protected] Z_angle_to 135.0 0177: set_object [email protected] Z_angle_to 225.0 0177: set_object [email protected] Z_angle_to 280.0 0177: set_object [email protected] Z_angle_to 280.0 0249: release_model #NRG500 0249: release_model #MAFFA 0001: wait 250 ms 036A: put_actor $PLAYER_ACTOR in_car [email protected] 0001: wait 250 ms 016A: fade 1 time 1000 0001: wait 1000 ms 0373: set_camera_directly_behind_player 02EB: restore_camera_with_jumpcut 01B4: set_player $PLAYER_CHAR can_move 1 085E: assign_car [email protected] to_looped_path 840//<<---vehicle repeat the course again and again//0705: car [email protected] assign_to_path 840 and_drive_normal//<<---vehicle stops after one round06FD: set_car [email protected] speed_on_path_to 0.95 :DRIV_6010001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @DRIV_601 00D6: if and8119: not car [email protected] wrecked 8119: not car [email protected] wrecked 8118: not actor [email protected] dead 004D: jump_if_false @DRIV_601 00D6: if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -1333.5 -408.1 14.1 radius 650.5 650.5 50.5 004D: jump_if_false @DRIV_702 0002: jump @DRIV_601 :DRIV_7020873: release_path 840 01C3: remove_references_to_car [email protected] // Like turning a car into any random car 01C3: remove_references_to_car [email protected] // Like turning a car into any random car 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0108: destroy_object [email protected] 0108: destroy_object [email protected] 0108: destroy_object [email protected] 0108: destroy_object [email protected] 0002: jump @DRIV_11 RyanDri3957V 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
scarface1994 Posted August 7, 2008 Share Posted August 7, 2008 The RRR file editor made by Sanchez (updated): http://foolroot.nm.ru/R3D.rar please reestablish the link. thanks Link to comment Share on other sites More sharing options...
atfburner Posted August 7, 2008 Share Posted August 7, 2008 R3D.rar Link to comment Share on other sites More sharing options...
dtd mods Posted January 12, 2009 Share Posted January 12, 2009 (edited) 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 32 end (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://sannybuilder.com/dev/carrec.txt (source) http://cleo.sannybuilder.com/scripts/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 (updated): http://foolroot.nm.ru/R3D.rar Examples of new RRR paths made with the script are downloadable here: http://sannybuilder.com/dev/temp/carrec900.rrr http://sannybuilder.com/dev/temp/carrec998.rrr 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. Original source: http://sannybuilder.com/forums/viewtopic.php?id=107 Enjoy. With what opcode can i move the vehicle along the path but to have the game physics and environment like the other cars and damage as well. Edited January 21, 2009 by dtd mods Link to comment Share on other sites More sharing options...
DvD463 Posted February 19, 2009 Share Posted February 19, 2009 PLEASE PLEASE PLEASE How can i create my own cleo script?????? RyanDri3957V 1 Link to comment Share on other sites More sharing options...
coin-god Posted February 19, 2009 Share Posted February 19, 2009 PLEASE PLEASE PLEASE How can i create my own cleo script?????? Read tutorials about SA Coding. Dont ask offtopic questions please. RyanDri3957V 1 Link to comment Share on other sites More sharing options...
-ATP- Posted July 18, 2010 Share Posted July 18, 2010 Hi, I found a bug in the R3D tool, I cuts up the number of path point if it has more than 3 character, like here: I tried to expand this column, but it doesn´t work. Is there any solution? Link to comment Share on other sites More sharing options...
Joints Posted July 19, 2010 Share Posted July 19, 2010 nice work. although i dont think i will never need to use this Link to comment Share on other sites More sharing options...
klm889 Posted December 11, 2010 Share Posted December 11, 2010 Will the car stop at the stops if I stop and stand near the bus stop 10 seconds. or need to write code "...car stopped at point... radius 10 10 10 ? Link to comment Share on other sites More sharing options...
coin-god Posted December 11, 2010 Share Posted December 11, 2010 Will the car stop at the stops if I stop and stand near the bus stop 10 seconds. or need to write code "...car stopped at point... radius 10 10 10 ? The car will do the exact same thing you did. If you stopped it will stop, if you did not it wont. Link to comment Share on other sites More sharing options...
ThePlayaJam765 Posted August 26, 2016 Share Posted August 26, 2016 (edited) I know I am extremely late to the party but Here's a short script i wrote that will playback rrr paths that you've made. Just change 381 into the number of your path then press TAB+P in-game while in the appropiate vehicle type to watch it. {$CLEO .cs}//-------------MAIN---------------thread 'CARPATH':CARPATH_01wait 0if and0AB0: key_pressed 90AB0: key_pressed 80Actor.Driving($PLAYER_ACTOR)else_jump @CARPATH_01jump @CARPATH_02:CARPATH_0207C0: load_path [email protected] = Actor.CurrentCar($PLAYER_ACTOR)jump @CARPATH_03:CARPATH_03wait 1000if860E: not car [email protected] assigned_to_pathelse_jump @CARPATH_0105EB: assign_car [email protected] to path 38106FD: set_car [email protected] speed_on_path_to 1.0jump @CARPATH_01 Edited August 26, 2016 by ThePlayaJam765 Link to comment Share on other sites More sharing options...
gettgettGTA Posted January 16, 2017 Share Posted January 16, 2017 R3D how use ? what is it? who show me please Link to comment Share on other sites More sharing options...
ZAZ Posted January 17, 2017 Share Posted January 17, 2017 R3D how use ? what is it? who show me please forget it simply use the rrr script: source text cleoscript file CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
skatefilter5 Posted September 26, 2017 Share Posted September 26, 2017 it's sucks that i have to completely close the game when I add it carrec.img, if the game runs, it won't let me open or save, with carrec.rrr902 by itself, the car just teleport to san ferrio's car practice area then I record the path and I got it working but the car is invisible and driving up-side then blows up, it glitchly Link to comment Share on other sites More sharing options...
deltaCJ Posted September 27, 2017 Share Posted September 27, 2017 it's sucks that i have to completely close the game when I add it carrec.img, if the game runs, it won't let me open or save, with carrec.rrr902 by itself, the car just teleport to san ferrio's car practice area then I record the path and I got it working but the car is invisible and driving up-side then blows up, it glitchly Sorry, but you can't replace anything in the games original .IMG without closing the game. That's pretty obvious. Also, make sure to run your IMG editor in Administrator mode because the same happened to me. You have to make sure you actually import the car path. It's not glitchy at all. You're just bad at coding. Link to comment Share on other sites More sharing options...
TheEstPlays Posted October 5, 2017 Share Posted October 5, 2017 Path recorder works fine, although It doesn't show Started Recording/Ended recording(?). But, I recorded the path, put it into IMG and when I try to run it in SAMP, my game just freezes. Anyone knows how to fix this or It just doesn't work in SAMP? RyanDri3957V 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now