swapnil2809 Posted May 5, 2016 Share Posted May 5, 2016 I want to create spawn locations for some planes at the airports and for that I would need a cleaned up airport. How can the existing vehicle spawn locations be removed. Can all those Shamals, Nevadas, Dodos that spawn at the airports be deleted? Link to comment Share on other sites More sharing options...
Guest Posted May 5, 2016 Share Posted May 5, 2016 Some vehicles are spawned through script. (main.scm) That requires script rewriting and starting new game. Vehicles can also be spawned using IPL files. (Normal, human-readable IPL files and binary IPL files from gta3.img.) Link to comment Share on other sites More sharing options...
OrionSR Posted May 5, 2016 Share Posted May 5, 2016 (edited) Except for the AT-400 parked in the hangar at the LV airport, all of the other aircraft at the LS and LV airports are streamed in from binary ipl files stored in gta3.img. There are tools that can edit these files but I'm not sure how to use them. The AT-400 and aircraft at the SF airport are added when a new game starts and are included in the save data. You don't necessarily need to delete these vehicles unless you are adding large numbers of vehicles and are worried about clogging the gargen pool. Each vehicle is identified by a global variable handle and can be hidden or displayed with opcode 014C:. The SF aircraft are two sets of matching vehicles, one set is locked and displayed early in the game and another set is unlocked and hidden. During flight school the locked planes are hidden and the unlocked set is displayed. If you hide or delete these vehicles you'll also need to manage their global variables. These are manageable objectives. Deleting parked vehicles from an existing save is awkward, but possible. There aren't any standard commands for removing car generators but we know enough about managing SA memory to tweak the allocation byte and force the vehicle to be discard, either by editing the save with a hex editor or writing to memory with cleo scripts. Editing main.scm to modify how the cargens spawn is more trouble than it's worth. In the long run it's easier to let the scripts do their thing and then rebuilt the cargen pool and recreate the vehicles the way you want by extracting all the cargen codes from the main scripts and managing the codes in a custom script. Edited May 5, 2016 by OrionSR Silent 1 Link to comment Share on other sites More sharing options...
swapnil2809 Posted May 6, 2016 Author Share Posted May 6, 2016 Thanks for the info guys! All sounds a bit too complex for me, also, no point in starting a new game. Link to comment Share on other sites More sharing options...
gtafan2u Posted May 7, 2016 Share Posted May 7, 2016 You can also note down the global variables of the cars spawned by main.scm and then destroy them using a cleo script. Link to comment Share on other sites More sharing options...
OrionSR Posted May 7, 2016 Share Posted May 7, 2016 Cleo3 Example: // Test code that unallocates the East LS Clover so that it won't be saved.{$CLEO .cs}0000: while true wait 250 if 0AB0: key_pressed 0x77 // F8 then 0085: [email protected] = $2766 // index of the East LS Clover [email protected] *= 0x20 // cargen record size [email protected] += 0x00c27ad0 // start of cargen structure [email protected] += 0x1D // offset to allocation byte (save offset -2) 0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0 wait 250 00BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1 // Load Successful. endend SCM Function: :DeleteCarGenerator// Adapted from fastman92's DisableCarGeneratorFromBeingSaved function// Example: 0AB1: call_scm_func @DeleteCarGenerator 1 cargen_index [email protected]// Is invalid generator ID?if or -1 >= [email protected] [email protected] >= 500then 0AB2: ret 0end0A8D: [email protected] = read_memory 0x6F32AA size 1 virtual_protect false // CCarGenerator_size0AA7: call_function 0x479D60 num_params 1 pop 1 [email protected] store_result_to [email protected] // CCarGenerator* ptrif [email protected] >= 0x30 // is CCarGenerator_extended ?then [email protected] += 0x24 // *** untested *** 0A8C: write_memory [email protected] size 2 value 0x0 virtual_protect false // exIplFileelse [email protected] += 0x1D 0A8C: write_memory [email protected] size 1 value 0x0 virtual_protect false // iplFileend0AB2: ret 0 Link to comment Share on other sites More sharing options...
swapnil2809 Posted May 12, 2016 Author Share Posted May 12, 2016 (edited) Sorry for the late response guys but thanks, yes that works! Another issue that I have is, a bit offtopic though; I was using ya_4's park your car mod to park my newly added (not replaced) planes, but due to some other crashing mod, had to reinstall my SA. And now, that doesnt work for my added cars. No error or crashes, but the cars can't be parked. I tried spawning added cars using below script, but no success: //-------------MAIN---------------0A95: enable_thread_saving 014B: [email protected] = init_parked_car_generator #BT400 color 1 1 1 alarm 0 door_lock 0 0 10000 at -1303.948 -269.7776 17.1277 angle 168.8698 014C: set_parked_car_generator [email protected] cars_to_generate_to 101 0A93: end_custom_thread Any help? Edited May 12, 2016 by swapnil2809 Link to comment Share on other sites More sharing options...
Guest Posted May 12, 2016 Share Posted May 12, 2016 (edited) 014B: [email protected] = init_parked_car_generator #BT400 color 1 1 1 alarm 0 door_lock 0 0 10000 at -1303.948 -269.7776 17.1277 angle 168.8698 BT400? Did you mean BF400? Edited May 12, 2016 by Guest Link to comment Share on other sites More sharing options...
swapnil2809 Posted May 13, 2016 Author Share Posted May 13, 2016 No, I added (not replaced) a plane and named it BT400 and want to spawn/park it. Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2016 Share Posted May 13, 2016 Aha, so you want to make car generator for added cars. First thing I noticed is that you are compiling this as default script, not CLEO script. Add the following line on top of your script: {$CLEO .cs} If you try to compile it you will get the following error: That picture says everything, I don't need to explain. Btw, I'm not sure if opcode 014B works on added cars, you should ask somebody working on total conversions to see if its working. Link to comment Share on other sites More sharing options...
swapnil2809 Posted May 13, 2016 Author Share Posted May 13, 2016 Hi, I compiled the script as a Cleo script, sorry for the confusion caused due to me not copying {$CLEO .cs} in the post! & 014B worked I changed the vehicle id from 18631 to 612. Yet to add and check more vehicles! Link to comment Share on other sites More sharing options...
fastman92 Posted May 14, 2016 Share Posted May 14, 2016 (edited) Aha, so you want to make car generator for added cars. First thing I noticed is that you are compiling this as default script, not CLEO script. Add the following line on top of your script: {$CLEO .cs} If you try to compile it you will get the following error: That picture says everything, I don't need to explain. Btw, I'm not sure if opcode 014B works on added cars, you should ask somebody working on total conversions to see if its working. It might be trying 'fastman92 limit adjuster', which has option to make car generator with any vehicle ID. Edited May 14, 2016 by fastman92 Link to comment Share on other sites More sharing options...
juleswinnfield2517 Posted May 6, 2020 Share Posted May 6, 2020 Is there a simple mod around for un-parking, or removing generated parked vehicles due to park-anywhere mods? 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