XXgtassholeXX Posted May 3, 2017 Share Posted May 3, 2017 Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health? Link to comment Share on other sites More sharing options...
Mysterdogg Posted May 3, 2017 Share Posted May 3, 2017 (edited) Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health? Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file. You're not the first or last one asking this. Edited May 3, 2017 by Mysterdogg XXgtassholeXX 1 Link to comment Share on other sites More sharing options...
XXgtassholeXX Posted May 4, 2017 Author Share Posted May 4, 2017 Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health? Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file. You're not the first or last one asking this. Thanks but from what I have seen, it only increases vehicle collision health (i.e. when colliding with surface). when I shoot the vehicle with a shotgun, it still blows up after several shots. Link to comment Share on other sites More sharing options...
Mysterdogg Posted May 5, 2017 Share Posted May 5, 2017 Cars in gta sa are quite fragile. In real life you don't make cars explode just by shooting them with a pistol a few times. Is there any way to increase the vehicle health? Hello, check this link http://projectcerbera.com/gta/sa/tutorials/handling or by simply doing this: decrease the "vehicle damage multiplier flag" value in handling.cfg file. You're not the first or last one asking this. Thanks but from what I have seen, it only increases vehicle collision health (i.e. when colliding with surface). when I shoot the vehicle with a shotgun, it still blows up after several shots. Maybe this could be useful: http://www.mixmods.com.br/2016/02/vehicle-immunities-corrigir-trailers.html Link to comment Share on other sites More sharing options...
Jack Posted May 6, 2017 Share Posted May 6, 2017 (edited) Hardcoded vehicle health could also be altered through this code: {$CLEO}0000:REPEAT wait 250UNTIL 0256: player $PLAYER_CHAR definedCONST VEHICLE_HEALTH = 1000.0 // default vehicle valueENDVAR VEHICLE_HEALTH: floatEND0AC6: [email protected] = label @VehicleHealth offset0085: [email protected] = [email protected]: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect [email protected] += 40A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect [email protected] = 0WHILE 2000 >= [email protected] wait 0 0AC6: [email protected] = label @VehicleHealth offset 0085: [email protected] = [email protected] [email protected] += 8 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8C: write_memory [email protected] size 4 value VEHICLE_HEALTH virtual_protect 0 END0A93: end_custom_thread:VehicleHealthHEX 47 A0 47 00 8A AF 44 00 41 60 6D 00 END Edited May 6, 2017 by Jack Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
XXgtassholeXX Posted May 7, 2017 Author Share Posted May 7, 2017 Thanks you all. I have made it work!! Link to comment Share on other sites More sharing options...
Zul5437 Posted July 13, 2017 Share Posted July 13, 2017 How to use that hardcoded? Link to comment Share on other sites More sharing options...
kkjj Posted July 13, 2017 Share Posted July 13, 2017 Use Mixsets... And increase the vehicle health. Link to comment Share on other sites More sharing options...
Zul5437 Posted July 19, 2017 Share Posted July 19, 2017 If i install mixset,does it crash my game when i've add new car using limitadjuster? Link to comment Share on other sites More sharing options...
kkjj Posted July 19, 2017 Share Posted July 19, 2017 No. . Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 (edited) Sorry for bumping this, I hope it's ok. I too wish to be able to increase vehicles health, and Hardcoded vehicle health could also be altered through this code: this code worked for me, thank you very much. But ideally I wish to be able to differentiate between different vehicles types, so that, for example, bikes and trucks have less and more health than normal cars, respectively. Is there any way to check against the vehicle id in this code? Edited December 22, 2017 by psychedelist Link to comment Share on other sites More sharing options...
Jack Posted December 22, 2017 Share Posted December 22, 2017 Sorry for bumping this, I hope it's ok. I too wish to be able to increase vehicles health, and this code worked for me, thank you very much. But ideally I wish to be able to differentiate between different vehicles types, so that, for example, bikes and trucks have less and more health than normal cars, respectively. Is there any way to check against the vehicle id in this code? Use the ini file from Junior_Djjr's mod. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 Use the ini file from Junior_Djjr's mod. I had a look at Mix Sets, there seems to be health option for all vehicles (not by types or ids). Did you mean a different mod? Link to comment Share on other sites More sharing options...
Jack Posted December 22, 2017 Share Posted December 22, 2017 (edited) I had a look at Mix Sets, there seems to be health option for all vehicles (not by types or ids). Did you mean a different mod? Using vehicle IDs to set the health: VehicleImmunities_2.cs: {$CLEO}0000://---------------Vehicle Health-----------------------repeat wait 250until 0256: player $PLAYER_CHAR defined while true wait 0 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if 0AE2: [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 750.0 find_next 0 pass_wrecked 1 then repeat 0A97: [email protected] = car [email protected] struct [email protected] += 0x4ED // possibly not used data? 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if [email protected] <> 1 then 0A97: [email protected] = car [email protected] struct [email protected] += 0x4ED // possibly not used data? 0A8C: write_memory [email protected] size 4 value 1 virtual_protect 0 0441: [email protected] = car [email protected] model 0ADB: [email protected] = car_model [email protected] name 0AD3: string_format [email protected] format "%s%s" 'MODEL_' [email protected] 0AF0: [email protected] = get_int_from_ini_file "cleo\VehicleImmunities_2.ini" section "VehicleHealth" key [email protected] if [email protected] <> -0x80000000 then 0224: set_car [email protected] health_to [email protected] end end until 8AE2: NOT [email protected] = random_vehicle_near_point [email protected] [email protected] [email protected] in_radius 750.0 find_next 1 pass_wrecked 1 end end // while VehicleImmunities_2.ini: [VehicleHealth] MODEL_LANDSTK = 1000 MODEL_BRAVURA = 1000 MODEL_BUFFALO = 1000 MODEL_LINERUN = 1000 MODEL_PEREN = 1000 MODEL_SENTINL = 1000 MODEL_DUMPER = 1000 MODEL_FIRETRK = 1000 MODEL_TRASHM = 1000 MODEL_STRETCH = 1000 MODEL_MANANA = 1000 MODEL_INFERNU = 1000 MODEL_VOODOO = 1000 MODEL_PONY = 1000 MODEL_MULE = 1000 MODEL_CHEETAH = 1000 MODEL_AMBULAN = 1000 MODEL_LEVIATH = 1000 MODEL_MOONBM = 1000 MODEL_ESPERAN = 1000 MODEL_TAXI = 1000 MODEL_WASHING = 1000 MODEL_BOBCAT = 1000 MODEL_WHOOPEE = 1000 MODEL_BFINJC = 1000 MODEL_HUNTER = 1000 MODEL_PREMIER = 1000 MODEL_ENFORCR = 1000 MODEL_SECURI = 1000 MODEL_BANSHEE = 1000 MODEL_PREDATR = 1000 MODEL_BUS = 1000 MODEL_RHINO = 1000 MODEL_BARRCKS = 1000 MODEL_HOTKNIF = 1000 MODEL_ARTICT1 = 1000 MODEL_PREVION = 1000 MODEL_COACH = 1000 MODEL_CABBIE = 1000 MODEL_STALION = 1000 MODEL_RUMPO = 1000 MODEL_RCBANDT = 1000 MODEL_ROMERO = 1000 MODEL_PACKER = 1000 MODEL_MONSTER = 1000 MODEL_ADMIRAL = 1000 MODEL_SQUALO = 1000 MODEL_SEASPAR = 1000 MODEL_PIZZABO = 1000 MODEL_TRAM = 1000 MODEL_ARTICT2 = 1000 MODEL_TURISMO = 1000 MODEL_SPEEDER = 1000 MODEL_REEFER = 1000 MODEL_TROPIC = 1000 MODEL_FLATBED = 1000 MODEL_YANKEE = 1000 MODEL_CADDY = 1000 MODEL_SOLAIR = 1000 MODEL_TOPFUN = 1000 MODEL_SKIMMER = 1000 MODEL_PCJ600 = 1000 MODEL_FAGGIO = 1000 MODEL_FREEWAY = 1000 MODEL_RCBARON = 1000 MODEL_RCRAIDE = 1000 MODEL_GLENDAL = 1000 MODEL_OCEANIC = 1000 MODEL_SANCHEZ = 1000 MODEL_SPARROW = 1000 MODEL_PATRIOT = 1000 MODEL_QUAD = 1000 MODEL_COASTG = 1000 MODEL_DINGHY = 1000 MODEL_HERMES = 1000 MODEL_SABRE = 1000 MODEL_RUSTLER = 1000 MODEL_ZR350 = 1000 MODEL_WALTON = 1000 MODEL_REGINA = 1000 MODEL_COMET = 1000 MODEL_BMX = 1000 MODEL_BURRITO = 1000 MODEL_CAMPER = 1000 MODEL_MARQUIS = 1000 MODEL_BAGGAGE = 1000 MODEL_DOZER = 1000 MODEL_MAVERIC = 1000 MODEL_SANMAV = 1000 MODEL_RANCHER = 1000 MODEL_FBIRANC = 1000 MODEL_VIRGO = 1000 MODEL_GREENWO = 1000 MODEL_JETMAX = 1000 MODEL_HOTRING = 1000 MODEL_SANDKIN = 1000 MODEL_BLISTAC = 1000 MODEL_POLMAV = 1000 MODEL_BOXVILL = 1000 MODEL_BENSON = 1000 MODEL_MESAA = 1000 MODEL_RCGOBLI = 1000 MODEL_HOTRINA = 1000 MODEL_HOTRINB = 1000 MODEL_BLOODRA = 1000 MODEL_RANCHER = 1000 MODEL_SUPERGT = 1000 MODEL_ELEGANT = 1000 MODEL_JOURNEY = 1000 MODEL_BIKE = 1000 MODEL_MTBIKE = 1000 MODEL_BEAGLE = 1000 MODEL_CROPDST = 1000 MODEL_STUNT = 1000 MODEL_PETROL = 1000 MODEL_RDTRAIN = 1000 MODEL_NEBULA = 1000 MODEL_MAJESTC = 1000 MODEL_BUCCANE = 1000 MODEL_SHAMAL = 1000 MODEL_HYDRA = 1000 MODEL_FCR900 = 1000 MODEL_NRG500 = 1000 MODEL_HPV1000 = 1000 MODEL_CEMENT = 1000 MODEL_TOWTRUK = 1000 MODEL_FORTUNE = 1000 MODEL_CADRONA = 1000 MODEL_FBITRUK = 1000 MODEL_WILLARD = 1000 MODEL_FORKLFT = 1000 MODEL_TRACTOR = 1000 MODEL_COMBINE = 1000 MODEL_FELTZER = 1000 MODEL_REMING = 1000 MODEL_SLAMVAN = 1000 MODEL_BLADE = 1000 MODEL_FREIGHT = 1000 MODEL_STREAK = 1000 MODEL_VORTEX = 1000 MODEL_VINCENT = 1000 MODEL_BULLET = 1000 MODEL_CLOVER = 1000 MODEL_SADLER = 1000 MODEL_FIRELA = 1000 MODEL_HUSTLER = 1000 MODEL_INTRUDR = 1000 MODEL_PRIMO = 1000 MODEL_CARGOBB = 1000 MODEL_TAMPA = 1000 MODEL_SUNRISE = 1000 MODEL_MERIT = 1000 MODEL_UTILITY = 1000 MODEL_NEVADA = 1000 MODEL_YOSEMIT = 1000 MODEL_WINDSOR = 1000 MODEL_MONSTA = 1000 MODEL_MONSTB = 1000 MODEL_URANUS = 1000 MODEL_JESTER = 1000 MODEL_SULTAN = 1000 MODEL_STRATUM = 1000 MODEL_ELEGY = 1000 MODEL_RAINDNC = 1000 MODEL_RCTIGER = 1000 MODEL_FLASH = 1000 MODEL_TAHOMA = 1000 MODEL_SAVANNA = 1000 MODEL_BANDITO = 1000 MODEL_FRFLAT = 1000 MODEL_STREAKC = 1000 MODEL_KART = 1000 MODEL_MOWER = 1000 MODEL_DUNE = 1000 MODEL_SWEEPER = 1000 MODEL_BROADWY = 1000 MODEL_TORNADO = 1000 MODEL_AT400 = 1000 MODEL_DFT30 = 1000 MODEL_HUNTLEY = 1000 MODEL_STAFFRD = 1000 MODEL_BF400 = 1000 MODEL_NEWSVAN = 1000 MODEL_TUG = 1000 MODEL_PETROTR = 1000 MODEL_EMPEROR = 1000 MODEL_WAYFARE = 1000 MODEL_EUROS = 1000 MODEL_HOTDOG = 1000 MODEL_CLUB = 1000 MODEL_FRBOX = 1000 MODEL_ARTICT3 = 1000 MODEL_ANDROM = 1000 MODEL_DODO = 1000 MODEL_RCCAM = 1000 MODEL_LAUNCH = 1000 MODEL_POLICAR = 1000 MODEL_POLICAR = 1000 MODEL_POLICAR = 1000 MODEL_RANGER = 1000 MODEL_PICADOR = 1000 MODEL_SWATVAN = 1000 MODEL_ALPHA = 1000 MODEL_PHOENIX = 1000 MODEL_GLENSHI = 1000 MODEL_SADLSHI = 1000 MODEL_BAGBOXA = 1000 MODEL_BAGBOXB = 1000 MODEL_TUGSTAI = 1000 MODEL_BOXBURG = 1000 MODEL_FARMTR1 = 1000 MODEL_UTILTR1 = 1000 Edited December 22, 2017 by Jack Vills SkyTerror 1 Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 (edited) Using vehicle IDs to set the health: VehicleImmunities_2.cs: That looks awesome, thank you very much. Unfortunately my game crashes when I start new game. I'm not sure what i could try now. My setup is 1.0 game version, latest cleo version (4.3.16), Silent Patch, modified main.scm (but crash occurs with original one as well), modified .dat files (including handling.dat) and several self-made cleo scripts that don't do anything with cars. Is the script dependent on a specific gta_sa.exe version? Edit: I replaced lines reading the ini file with setting to a constant and it doesn't crash now. There must be something wrong with how i save the ini file. Edited December 22, 2017 by psychedelist Link to comment Share on other sites More sharing options...
Jack Posted December 22, 2017 Share Posted December 22, 2017 Edit: I replaced lines reading the ini file with setting to a constant and it doesn't crash now. There must be something wrong with how i save the ini file. The name of the ini file must be the same as in the code (in this case "VehicleImmunities_2.ini"). Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 The name of the ini file must be the same as in the code (in this case "VehicleImmunities_2.ini"). Thanks, I verified that. I just found out that it's this line that causes the crash for me: 0AD3: string_format [email protected] format "%s%s" 'MODEL_' [email protected] It's like if [email protected] value ends up invalid for some reason, at least at start of new game. I'm currently trying to find a way to check if a variable isn't undefined (I'm new to cleo). Link to comment Share on other sites More sharing options...
Jack Posted December 22, 2017 Share Posted December 22, 2017 (edited) The latest cleo version is not 4.3.16. It's 4.3.22:http://cleo.li/ Edited December 22, 2017 by Jack Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
DragonSC7601 Posted December 22, 2017 Share Posted December 22, 2017 Also install this mod if you don't want vehicle explodes when it flipped: http://gtaforums.com/topic/527345-iiivcsa-flipped-cars-dont-burn/ Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 The latest cleo version is not 4.3.16. It's 4.3.22: http://cleo.li/ I'm sorry, i had updated it using sanny builder, it wasn't a good idea to rely on that. Anyway, i keep crashing on the string_format opcode even using the latest cleo version, no idea what could be wrong with it. I removed that line, as well as "model_" prefixes from the ini file, and now the mod works, thank you very much once again, now i should be able to balance things the way i wanted. If one day I'll feel like releasing what i'm doing, will it be fine to do so if I credit you and put a link to this thread? Also install this mod if you don't want vehicle explodes when it flipped: http://gtaforums.com/topic/527345-iiivcsa-flipped-cars-dont-burn/ Thanks, I was aware of that one. Link to comment Share on other sites More sharing options...
Jack Posted December 22, 2017 Share Posted December 22, 2017 I'm sorry, i had updated it using sanny builder, it wasn't a good idea to rely on that. Anyway, i keep crashing on the string_format opcode even using the latest cleo version, no idea what could be wrong with it. I removed that line, as well as "model_" prefixes from the ini file, and now the mod works, thank you very much once again, now i should be able to balance things the way i wanted. If you remove "model_" the code won't work (unleass you remove inside the ini as well). Instead, you shoud configure your Sanny Builder -> Tools -> Options -> Formats -> (Case converting, set to As is). Then compile the code again (run->compile). If one day I'll feel like releasing what i'm doing, will it be fine to do so if I credit you and put a link to this thread? That's not a very good idea. Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
psychedelist Posted December 22, 2017 Share Posted December 22, 2017 (edited) If you remove "model_" the code won't work (unleass you remove inside the ini as well). Instead, you shoud configure your Sanny Builder -> Tools -> Options -> Formats -> (Case converting, set to As is). Then compile the code again (run->compile). That's not a very good idea. I did remove the "model_" prefixes in ini, but thanks for the setting tip, i'll try that as well. I assume you mean that if I publish something, it shouldn't include your code at all, rather than including it w/o credit. I understand, but i really hope you'll release this excellent piece of code in some form, then i'd include only the ini file and refer to your mod as a recommended download. Edit: I noticed that the mod works when you load game for first time (or start new game, in my case), but if you start new game from menu after that, it won't work anymore (until quitting the game completely). Edit2: Happens after walking inside and outside of an interior too (no game saving or loading). I also noticed that if you load a game, then the code will continue to work only near the place where you were before loading, it's like player actor position gets stuck there. Edited December 23, 2017 by psychedelist Link to comment Share on other sites More sharing options...
Jack Posted December 23, 2017 Share Posted December 23, 2017 Try now (Case converting, set to As is): VehicleImmunities_2VehicleImmunities_2.ini Tank Fire [SA] New Police Helicopter [VC & III] My YouTube Channel Link to comment Share on other sites More sharing options...
psychedelist Posted December 23, 2017 Share Posted December 23, 2017 Try now (Case converting, set to As is): VehicleImmunities_2 VehicleImmunities_2.ini Thanks a lot, I wasn't passing the first check (which is surprising, I have 1.0, but maybe there's more to it) but the read/write_memory value changes made a difference, now it works after game load/save etc. 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