guferr Posted September 24, 2014 Share Posted September 24, 2014 (edited) So, some time ago i downloaded this mod: It's a mod the let you record the vehicle and then play the recorded path.But there's interesting things about it.First: It creates an file very similar to the RRR files on carrec.img, but somehow it can play the path from this file without using the built-in paths system. It's divided into two .cs files, a recorder script, and a driver script.There's no source code, and Sanny fails to decompile the driver script, but the recorder script decompiles fine, and it's very similar to the ones that create RRR files.I created a RRR file creator by myself (i borrowed the memory reading routine from other code, but mostly it was built by me) just to learn how it worked. It works fine, i can post here if anyone wants, i have a commented source code.But i didn't find any way or opcode that would let me play a path recorded on a file, the opcodes can only read paths from carrec.img, and if i tried to use another opcodes, i would probably fail, because i can't set every properties i can record using get car struct opcode, and it's even incomplete for that use.I can't find out how that driver script works, and i can't decompile it.Also, i observed that it behaves in a diferent way:The car doesn't collide with other cars on the way, it just pass through them without interaction.The normal behaviour when assigned to paths is different, the car does collide with everything, though it's not affected at all.So, any ideas?Thanks Edited September 24, 2014 by guferr Link to comment Share on other sites More sharing options...
turbocoder32 Posted September 25, 2014 Share Posted September 25, 2014 HiI havent worked with paths but i have a bit of opcodes.I am sure that if you couldnt figure it out or anyone else, after you check these out that i could do it in my spare time. I hope this helps. 07C0: load_path 7060873: release_path 201if///07C1: path 201 available060E: car [email protected] assigned_to_path860E: not car [email protected] assigned_to_path87C1: not path 706 available///////////////////////////////05EB: assign_car [email protected] to_path 706085E: assign_car [email protected] to_looped_path 34705EC: release_car [email protected] from_path06C5: release_car [email protected] from_path05ED: freeze_car [email protected] while_on_path05EE: unfreeze_car [email protected] while_on_path0705: car [email protected] assign_to_path 342 and_drive_normal0706: advance_car [email protected] further_along_path 1.006FD: set_car [email protected] speed_on_path_to 1.004E0: car [email protected] abandon_path_radius 30/////////////////////////////////////////////////////////////////099B: unknown_enable_car [email protected] collision_on_path// this opcode he probably didnt use or know of during the coding// reason there is no collision with anything.072F: enable_car [email protected] stuck_check_distance 1.0 time 2000 and_restore_if stuck 1 flipped 1 unk_place_on_road_properly 1 to_path -1 // extended 03CC Link to comment Share on other sites More sharing options...
guferr Posted September 25, 2014 Author Share Posted September 25, 2014 Hi I havent worked with paths but i have a bit of opcodes. I am sure that if you couldnt figure it out or anyone else, after you check these out that i could do it in my spare time. I hope this helps. Yes, i know these opcodes. But the question is that they only use the carrecxxx.rrr files on carrec.img, they don't let you load your own file instead, or anything other than the pre-defined paths on carrec.img. That mod records an file with the same structures or an RRR file, but it don't add it to carrec.img or make any change to it (even why, a script can't modify .img files, and even if it could, it would be very difficult) and then it can play the recorded path some how. If at least i could decompile the .cs file, but i can't, and there's no source code too. Link to comment Share on other sites More sharing options...
Silent Posted September 25, 2014 Share Posted September 25, 2014 (edited) Years ago @Deji made a code snippet to do such. You'll need to search through his website. EDIT: Got it. http://gtag.gtagaming.com/forums/index.php?showtopic=140&st=40&p=1604&&do=findComment&comment=1604 Edited September 25, 2014 by Silent Link to comment Share on other sites More sharing options...
guferr Posted September 26, 2014 Author Share Posted September 26, 2014 (edited) The link is broken. Can i still find it on his website? Edited September 26, 2014 by guferr Link to comment Share on other sites More sharing options...
turbocoder32 Posted September 26, 2014 Share Posted September 26, 2014 (edited) Maybe of use. http://waterviper.forumtwilight.com/t46-carrecimg-file I know it uses .img file but still , with what i scripted in the other post for you , it will work. Edited September 26, 2014 by turbocoder32 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