ArmanCan Posted January 24, 2022 Share Posted January 24, 2022 Hello Guys.. I'm trying to increase seats for ambulance so i/we can complete "Paramedic" easily.. Actually there is a similar idea/work in this forum but it's not completed.. And there is a youtube video about it but the author of this project didn't add "Ambulance" init and his project is much more advanced.. i'm looking for to create a simple script.. Stay Safe and Healthy Link to comment Share on other sites More sharing options...
OrionSR Posted January 25, 2022 Share Posted January 25, 2022 2 hours ago, ArmanCan said: i'm looking for to create a simple script.. A custom mission might suit your purpose. I don't have any practical experience with modeling in GTA, but based on posts I've read, in order to properly add more seats to a vehicle would require re-rigging the 3D model with addition dummies. Basically, a 3D body is rigged with bones that define attach points for passengers, doors, wheels, etc. Data files (vehicle.ide, handling.cfg?) would need to be modified in order to implement these changes in the game. Lot's a people enjoy modeling and working with custom vehicles. It might be a fun skill to learn, but isn't what you asked for. Returning to my comfort zone... Given a properly implemented 6 seat ambulance (ie, you could easily fill it with recruited gang members) there's still a pretty good chance that it won't work properly in the ambulance mission. It might work, or not (haven't looked to make a prediction) depending on how it was coded, but they weren't expecting more than 4 seats and may have hard coded some limits. If necessary, you could edit the mission in main.scm - simple mission edits don't effect save compatibility. But it's also pretty easy to cut the mission out of main.scm and paste it into a cleo custom mission script, and put together a simple sniffer/test-cheat script to active it for testing. Once testing is complete, tricking the game into running your custom mission instead of the standard mission is a fairly minor technical challenge that can be put off until later. More in line with what you asked for... A custom/edited mission strategy could implement the extra passengers without re-rigging the ambulance using the strategy posted at your link. You would need to identify appropriate seat positions, maybe implement animation, and handle the exceptions for a full vehicle within the script. Tricky business, but not an impossible task. Here's an idea, and a good way to ease into modifying a custom mission: What would happen if you changed the mission to work with a Coach that already has 6 seats? If you decide to give it a try, I think all you need to do is paste the mission into a Sanny file and add {cleo .cm} in the header. You already know how to write a test-cheat script - execute the mission with; 00BA: show_text_styled GXT 'AMBUL_M' time 6000 style 5 // PARAMEDIC 0001: wait 0 ms //0417: start_mission 122 // Paramedic Sub-Mission 0A94: start_custom_mission "missions\CustomMission1" Link to comment Share on other sites More sharing options...
ArmanCan Posted January 25, 2022 Author Share Posted January 25, 2022 hello OrionSR I'm not sure about the cutting the mod that i posted a youtube video about it but i'm going to do anyway.. The author of this project used "ini" and his script together and now i'm gonna give a small piece of this "ini".. I would like to copy some of the codes from the script but it's too long.. even longer than my previous armory work Spoiler #====================================================================== # CUSTOM ANIMATIONS # Pre-adapted vehicle models do not support custom animation #====================================================================== # IFP - limitation, maximum 7 characters # ANM - limitation, maximum 15 characters #====================================================================== [ANM_5] IFP = STRIP ANM = STR_Loop_B [ANM_22] IFP = OTB ANM = wtchrace_cmon #====================================================================== # VEHICLES #====================================================================== # MODEL # NUM = OffSetX \ OffSetY \ OffSetZ \ Face \ Animation # # Face: # 0 = FORWARD # 1 = LEFT # 2 = BACK # 3 = RIGHT # # Animation: # 0 = PED - SEAT_idle # 1 = FOOD - SHP_Tray_Pose ( stand ) # 2 = MISC - Seat_talk_01 # 3 = DEALER DEALER_IDLE ( stand ) # 4 = CAMERA - camcrch_idleloop # 4 > CUSTOM ANIMATIONS #====================================================================== [422] 0 = 0.47 -0.88 0.65 0 1 1 = -0.47 -0.88 0.65 0 1 2 = -0.15 -1.10 0.60 3 2 3 = -0.15 -1.90 0.60 3 2 4 = 0.15 -1.10 0.60 1 2 5 = 0.15 -1.90 0.60 1 2 You can also download the whole project from here.. https://www.mixmods.com.br/2020/08/gang-rider-v2-carregar-mais-gangue/ According to my research i need to locate/determine new seat points (Offset X-Y-Z) (BONES) with angle and bind with "Animation ID" right? How can i determine these? I've also cut the whole Paramedic from main.scm.. This time it will be much easier than monitoring.. Link to comment Share on other sites More sharing options...
OrionSR Posted January 25, 2022 Share Posted January 25, 2022 18 minutes ago, ArmanCan said: According to my research i need to locate/determine new seat points (Offset X-Y-Z) (BONES) with angle and bind with "Animation ID" right? How can i determine these? Ideally, you would learn enough about rigging to determine the default seat positions, then add(?) a little to the Y coord of the rear seats to estimate center seat positions. Alternatively, you could experiment with attaching objects to a vehicle with offsets; I think there's an opcode for that. Then play around with the numbers until it looks mostly correct. And finally test with actors to fine tune the Z coords. I have found chipstacks to be useful objects for mapping things in game. I would expect the center Z of the object to be at the approximate seat height. Try placing objects using the coords for the vehicles with INI definitions in those vehicles to get a feel for how your coords tests align with the mod. Link to comment Share on other sites More sharing options...
OrionSR Posted January 25, 2022 Share Posted January 25, 2022 (edited) 8 hours ago, ArmanCan said: I've also cut the whole Paramedic from main.scm. Well that was fun. I couldn't resist the urge to try paramedic with a coach and made a few modifications to the custom mission to make it work. Mostly just changing #AMBULAN to #COACH, but also tweaking [email protected] and $Paramedic_Mission_Level to 6 so I could start at a high level. Everything seemed to work as expected, with a few minor notes: The custom mission crashed when Sanny's Add extra SCM Info option was enabled. If you can reproduce the error on a modern version of SB and Cleo4 then we should probably report the error to Seemann. The mission start includes commands to kick out any existing passengers in seats 1 - 3 only. I didn't test how an over full vehicle at the start effects the mission. In limited testing, it seemed like the mission did not progress to patients at farther destinations until higher levels. Starting in Montgomery, patients didn't spawn any farther than Hampton Barns until level 7 or 8 in a 9 seat Coach - CJ in seat 0 plus 8 passengers. Based on these observations, I suspect that the mission will work properly if you can figure out how to add extra seats to an Ambulance. Levels 4 and 5 might have an imbalance of mission time; close patients don't offer much of a time bonus. An extra sniffer script could clear out seats 4 and 5 when it detects that the ambulan mission has started. Edited January 25, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 25, 2022 Author Share Posted January 25, 2022 (edited) On 1/25/2022 at 10:11 AM, OrionSR said: Well that was fun. I couldn't resist the urge to try paramedic with a coach and made a few modifications to the custom mission to make it work. Mostly just changing #AMBULAN to #COACH, but also tweaking [email protected] and $Paramedic_Mission_Level to 6 so I could start at a high level. Everything seemed to work as expected, with a few minor notes: The custom mission crashed when Sanny's Add extra SCM Info option was enabled. If you can reproduce the error on a modern version of SB and Cleo4 then we should probably report the error to Seemann. The mission start includes commands to kick out any existing passengers in seats 1 - 3 only. I didn't test how an over full vehicle at the start effects the mission. In limited testing, it seemed like the mission did not progress to patients at farther destinations until higher levels. Starting in Montgomery, patients didn't spawn any farther than Hampton Barns until level 7 or 8 in a 9 seat Coach - CJ in seat 0 plus 8 passengers. Based on these observations, I suspect that the mission will work properly if you can figure out how to add extra seats to an Ambulance. Levels 4 and 5 might have an imbalance of mission time; close patients don't offer much of a time bonus. An extra sniffer script could clear out seats 4 and 5 when it detects that the ambulan mission has started. It seems you've already tested this really well but i couldn't because sanny gave me an error "Label "BACKON" not found." I tried to pinpoint these locations and if the coordinates from "Zmodeler" are correct than we can easily proceed just look to the down right and you can see it.. Spoiler Edited January 27, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 25, 2022 Share Posted January 25, 2022 (edited) 6 hours ago, ArmanCan said: It seems you've already tested this really well but i couldn't because sanny gave me an error "Label "BACKON" not found." Whoops. Obviously I forgot an important step. In order to launch threads or to call common subroutines in main.scm from a cleo script or custom mission you need to replace the label with a "global" offset. Note that these offsets are usually different between v1 and v2; this example is from v1. Since I regularly need to re-launch threads in glitch fix scripts, or want to launch threads early in CG saves or for testing, I keep an unmodified main.scm decompiled with the Format Option to show Thread+Global Offset around as my most common reference. //004F: create_thread @BACKON_98073 004F: create_thread 98073 // launch with cleo, PCv1 main.scm What you've shown in ZModeler looks like you are on the right track but I haven't been following along with these steps. Minor notes: {$CLEO .cm} ^Cleo directive for custom mission at the top. //0A94: start_custom_mission "missions\CustomMission1" 0A94: start_custom_mission "CustomMission1" ^For the launching script, Sanny doesn't automatically copy custom missions to a cleo\missions folder. Edited January 25, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 26, 2022 Author Share Posted January 26, 2022 21 hours ago, OrionSR said: What you've shown in ZModeler looks like you are on the right track but I haven't been following along with these steps. I may on the right track but i'm progressing at turtle speed according to this 5 years old request i may give up this idea because it's possible to do but people didn't continue somehow (Maybe some opcodes were missing and needs to be coded by experts).. Actually there is a similar opcodes in Sanny but it's useless for me Anyway.. I tried to gather some infos from internet and this Author - I'm getting the coords from the "ZModeler". I tried to observe the patients sitting position during Paramedic and it's obvious that they are not sitting face to face.. - If we are on the right track.. than we are going to decide the seating angle by looking at "ZModeler".. - Talking about animations.. i found some names (Just like GXT) from the Seeman. I think we can use them by follwing Sanny Builder's instructions.. - I tried to play with this mod but i couldn't figure it out One thing is also confusing me.. If these 3 seats are already coded by Rockstar Developers am i going to define 2 more seats or start from the stratch? Link to comment Share on other sites More sharing options...
OrionSR Posted January 27, 2022 Share Posted January 27, 2022 7 hours ago, ArmanCan said: they are not sitting face to face. I was expecting this to be controlled by the Face parameter of the INI entry for that seat. 7 hours ago, ArmanCan said: If these 3 seats are already coded by Rockstar Developers am i going to define 2 more seats or start from the stratch? Don't forget about seat 0, the drivers seat. Judging by the image shown by the video and Bobcat example from the INI snippet, you will need to define all 6 seat positions. There's a reasonably good chance that the rigging data (seat positions) is not part of the 3D model. If you want to learn more about modeling you could purse this line of investigation. I'll make a quick search to see if I can find seat positions in memory, but otherwise I doubt I'll be of any help with modeling questions. And for just one vehicle, I don't think a full understanding is completely necessary. It should be possible to estimate reasonably close X and Y offsets using the ZModeler tool. For the Z offset, find a good height for CJ as driver and use that for seats 0 and 1. Make 4 good guesses for the rear seats, and refine the closest guess while you fiddle with final X and Y offsets. Recruit homies to help with testing. There are opcodes that can pop the doors off your vehicle so you can see things more clearly. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 27, 2022 Author Share Posted January 27, 2022 14 minutes ago, OrionSR said: you will need to define all 6 seat positions. Ok.. i got it I've also digged Sanny Builder's Opcode Library "SASCM" but i couldn't find any suitable opcode. If you can find it we can start to code this.. Link to comment Share on other sites More sharing options...
OrionSR Posted January 27, 2022 Share Posted January 27, 2022 1 minute ago, ArmanCan said: If you can find it we can start to code this.. I don't understand which opcodes you need. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 27, 2022 Author Share Posted January 27, 2022 (edited) 4 minutes ago, OrionSR said: I don't understand which opcodes you need. For entering the offset values and angle... and adding the animation name/id off course anyway.. it's too late for now.. i'll continue tomorrow.. Edited January 27, 2022 by ArmanCan Link to comment Share on other sites More sharing options...
OrionSR Posted January 27, 2022 Share Posted January 27, 2022 @ArmanCan I took a closer look at that Gang Ride mod and it doesn't work the way I thought. It is a rather elaborate example of placing gang members into various "turret" positions on a vehicle. It looks like the proper way to enter offsets is to use the included RideEditor tool. I would expect a properly installed Gang Ride mod, at best, would allow you to attempt the Paramedic mission with a normal number of passengers while homies are hanging off the side of the ambulance or sitting on the roof. The Gang Ride mod does not appear to alter the in-game number of passengers and max passengers in any way. This distinction is important; if the vehicle was properly modified the paramedic mission wouldn't need to be modified. I'm not expecting to find any established method for properly adding extra seats with cleo. Making a custom mission that manages the passengers, seats, turrets, animations and values displayed on screen is still a possibility. Is that what you really want to do? FYI: It's not something I want to do. Link to comment Share on other sites More sharing options...
ArmanCan Posted January 27, 2022 Author Share Posted January 27, 2022 OrionSR this is the "ZModeler" result.. Seat Number (0) : 0.4 -0.97 -0.1 Seat Number (1) : -0.4 -0.97 -0.1 Seat Number (2) : 0.92 0.8 -0.1 Seat Number (3) : -0.92 1.6 -0.1 Seat Number (4) : 0.92 2.4 -0.1 Seat Number (5) : -0.92 3.2 -0.1 Link to comment Share on other sites More sharing options...
OrionSR Posted January 28, 2022 Share Posted January 28, 2022 @ArmanCan I dug though some old posts from when SA was still fairly new and all reports suggest that properly adding more seats to a 4 seat vehicle is basically impossible. The standard operation of the seats and passengers is buried too deep in the game engine to be modified. If you wanted to purse the idea of picking up more than 3 patients per trip during the Paramedic mission you could rewrite the mission to do something like; as the ambulance fills up, remove the rear passengers and place them on a turret a little deeper into the vehicle to free up more seat space, coordinate how they disembark at the drop off location, and alter how the mission displays information on available seats. If I understood the guide on dummies correctly, that green dot at approximately -0.85, 2.72 is probably the rear seat dummy. The game would reflected this dummy to the other side of the vehicle for the other rear seat. Since the separation between the two front seats appears to be about 0.8, moving the patients to a Y position of 1.92 using a change seat animation (CJ entering as passenger, Michelle during She-Drives dates) would probably look appropriate. The missing data is the Z offset of rear seat dummy. This strategy would require a lot of coding and testing, but there is lots of room to be creative. For example, the 4th patient could be animated to open the rear door and sit on the bumper when there are no seats free. A 5th patient could possibly be animated to leap for, catch and hang onto the back of the ambulance (Sweet in EoL part 3) while the 4th passenger tries to kick him off. I would expect that customizing the paramedic mission would be a moderately difficult task. I don't have much experience with ped animations and turret positions but the game is designed to manage this sort of thing. I'm trying to sound supportive of your idea but... This seems like a lot of work for not much improvement in the fun factor of the mission. And why make the mission easier? Have you tried Montgomery? Angel Pine is suppose to be even easier but I learned the Badlands really well working on complex rally challenges with a buddy back-in-the-day and since then I've never had any problems running the paramedic mission in that area. If I wanted to rework a standard mission, I'd finish the project I started way-back-when to convert the Kickstart mission to be stretched between Palomino Creek and the Santa Maria Pier with the orbs placed over the river marking natural stunt jump locations. The goal is to collect as many points as possible and arrive at the pier before time runs out on a glorious, orange-purple sunset. Moving even further from your original idea... Have you tried Paramedic in a coach? I didn't really give the full mission a fair shot; I made a cheat script that added extra time at the start of each level so I wouldn't need to pull out my joypad. Anyway, uh... Got any interest in learning how to customize a Variation for a coach or bus? Variations allow for vehicles to be slightly different, like numbers on the side of a Hotring, or adverts on the sides of trailers and vans. Or maybe a custom paintjob? I'm not sure how either of these are implemented. I also found hundreds of bus mods for San Andreas, but nothing that seem to fit the bill of a medical ambulance bus. Some of the buses were similar in size to the tourist vans from GTA V, which might offer better handling properties. Then again, a standard coach or bus could probably have it's properties boosted for the mission. Another thoughts: Since the changes required to make a coach work in the paramedic mission are so minor, I might be able to change the mission as it's loaded to accept any vehicle CJ is driving. How about taking the easy path to implement a coach in the standard mission and wrap the mission with a script that has an earthquake storyline enhanced by a riot environment? Link to comment Share on other sites More sharing options...
ArmanCan Posted January 28, 2022 Author Share Posted January 28, 2022 12 minutes ago, OrionSR said: @ArmanCan I dug though some old posts from when SA was still fairly new and all reports suggest that properly adding more seats to a 4 seat vehicle is basically impossible. The standard operation of the seats and passengers is buried too deep in the game engine to be modified. I thought so it was already a crazy idea but off course i've also learned something from this 13 minutes ago, OrionSR said: I would expect that customizing the paramedic mission would be a moderately difficult task. It's allright Actually i have another simple question for you.. Spoiler //RBR/CG37: ------------------ All Clothes in Wardrobe ------------------------:CG_AllClothes// Flags for owned clothes are at mem addresses 0xa9734c to 0xa97442 - set 1 to own0006: [email protected] = 0xA9734C // start of shopping clothes data:CG_AllClothes_SetFlags00D6: if002B: 0xA97442 >= [email protected] // end of shopping clothes data004D: jump_if_false @CG_AllClothes_Specials0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0000A: [email protected] += 10002: jump @CG_AllClothes_SetFlags:CG_AllClothes_Specials// Make all specials available// Setting these globals seems to be enough. Ski Mask is not accessible through wardrobe.0004: $Gimp_Suit_Available = 10004: $Valet_Uniform_Available = 10004: $Rural_Clothes_Available = 10004: $Croupier_Uniform_Available = 10004: $Cop_Uniform_Available = 10004: $Pimp_Suit_Available = 10004: $Racing_Suit_Available = 10004: $Medic_Uniform_Available = 1// Make all stores selectable in wardrobe0004: $2549 = 1 // Binco0004: $2550 = 1 // Pro-Laps0004: $2551 = 1 // Sub Urban0004: $2552 = 1 // Zip0004: $2553 = 1 // Victim0004: $2554 = 1 // Didier Sachs//RBR/CG37: PDE's budget - keep for reference//062A: change_float_stat 14 to 108039.0 // fashion budget (approx)//062A: change_float_stat 62 to 108039.0 // total shopping budget:CG_AllClothes_End0051: return This is your 10 years old "All Clothes in Wardrobe" script but it needs to be sorted out/edit.. Can you just do this for me? Thanks Link to comment Share on other sites More sharing options...
OrionSR Posted January 28, 2022 Share Posted January 28, 2022 (edited) 8 minutes ago, ArmanCan said: This is your 10 years old "All Clothes in Wardrobe" script but it needs to be sorted out/edit.. Can you just do this for me? What's the link? I'll fix the code tags there too. Spoiler //RBR/CG37: ------------------ All Clothes in Wardrobe ------------------------ :CG_AllClothes // Flags for owned clothes are at mem addresses 0xa9734c to 0xa97442 - set 1 to own // These 247 flags are presumably: 249 total clothes items (without the specials) // - 3 default skins (default torso, legs, shoes) // + 1 ski mask (listed as special; not available through wardrobe) // these three lines by OrionSR surely beat my lengthy code { for [email protected] = 0xa9734c to 0xa97442 step 1 // 0001: wait 0 ms //OSR/CG37: causing lag 0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0 end } //RBR/CG37: slightly reworked for better readability //OSR/CG37: reworked to avoid waits in a for/end loop 0006: [email protected] = 0xA9734C // start of shopping clothes data :CG_AllClothes_SetFlags 00D6: if 002B: 0xA97442 >= [email protected] // end of shopping clothes data 004D: jump_if_false @CG_AllClothes_Specials 0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0 000A: [email protected] += 1 0002: jump @CG_AllClothes_SetFlags :CG_AllClothes_Specials // Make all specials available // Setting these globals seems to be enough. Ski Mask is not accessible through wardrobe. 0004: $Gimp_Suit_Available = 1 0004: $Valet_Uniform_Available = 1 0004: $Rural_Clothes_Available = 1 0004: $Croupier_Uniform_Available = 1 0004: $Cop_Uniform_Available = 1 0004: $Pimp_Suit_Available = 1 0004: $Racing_Suit_Available = 1 0004: $Medic_Uniform_Available = 1 // Make all stores selectable in wardrobe 0004: $2549 = 1 // Binco 0004: $2550 = 1 // Pro-Laps 0004: $2551 = 1 // Sub Urban 0004: $2552 = 1 // Zip 0004: $2553 = 1 // Victim 0004: $2554 = 1 // Didier Sachs //RBR/CG37: PDE's budget - keep for reference //062A: change_float_stat 14 to 108039.0 // fashion budget (approx) //062A: change_float_stat 62 to 108039.0 // total shopping budget :CG_AllClothes_End 0051: return If you aren't using this snippet in a subroutine then comment out the return command at the end. Are you abandoning the project? Don't care for the coach ideas? I couldn't bait you with the stunting mission? I got it as far as proof of concept, but it needs a lot of polish. Edited January 28, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 28, 2022 Author Share Posted January 28, 2022 Thanks for your editing That was your comment.. 21 minutes ago, OrionSR said: Don't care for the coach ideas? As you know, if OrionSR says "Difficult Task" than it's impossible for me BUT if we manage to change the whole Paramedic "safely" i think it will be a great and interesting experiment for us.. and a little bit fun too Link to comment Share on other sites More sharing options...
OrionSR Posted January 28, 2022 Share Posted January 28, 2022 (edited) 13 minutes ago, ArmanCan said: BUT if we manage to change the whole Paramedic "safely" i think it will be a great and interesting experiment for us.. and a little bit fun too Please be more specific. Which part sounds interesting? Edited January 28, 2022 by OrionSR Link to comment Share on other sites More sharing options...
ArmanCan Posted January 28, 2022 Author Share Posted January 28, 2022 1 hour ago, OrionSR said: This strategy would require a lot of coding and testing, but there is lots of room to be creative. For example, the 4th patient could be animated to open the rear door and sit on the bumper when there are no seats free. A 5th patient could possibly be animated to leap for, catch and hang onto the back of the ambulance (Sweet in EoL part 3) while the 4th passenger tries to kick him off. this one because your "Coach" script was fun but most of coaches must be spawned near all the hospitals and it would be awkward.. i can determine coordinates from "ZModeler" and maybe write a "turret opcode" (just like Ryder at Catalyst without weapons) but can you adapt these codes to original side mission? Link to comment Share on other sites More sharing options...
OrionSR Posted January 29, 2022 Share Posted January 29, 2022 22 hours ago, ArmanCan said: can you adapt these codes to original side mission? If you want to purse this project the you'll need to code it yourself. It's my understanding that the DE release included original scripts and source files that may include the names of global and local variables in missions that might describe the purpose of these variables more clearly. This type of information would make modifying the standard mission much easier. Link to comment Share on other sites More sharing options...