[Release] Realistic Vehicle Failure

vehicle
realistic

#21

Interesting. If the vehicle is relatively undamaged and unoccupied it should behave just like without the script. I only prevent explosions for a vehicle while you’re in it.

However, if the vehicle is heavily damaged or someone else is in the car, it would explode way too easily. At least that’s what I have been able to replicate from your description.

I have been wondering why Rockstar stopped fuel tank health degradation when it dropped below ~700. Now I understand :slight_smile:

I have a theory on how to solve it. I’ll be back.


#22

Great job on this, we tested it last night.

We were using other sources but this one seems more stable and the settings are pretty much perfect.

The only thing i would like is better car deformation when crashing, can you tweak this within the script? Or is there another script that we can use along side that will not effect yours?


#23

Awesome release, realistic things like this are really required for servers (specially RP modes)


#24

I believe I have found a useful solution to the explosion problem. It required a complete rethinking and rewriting of the algorithm. That means that it may not be quite as refined as the first version, but at least the damaged cars don’t blow up with three bullets to the fuel tank now.

I’m too tired to test and tweak the algorithm thoroughly right now, but for those interested the current development branch is available here: https://github.com/iEns/RealisticVehicleFailure/archive/develop.zip
Let me know if you find problems.

I’m currently working on refining the balance between cascading failures and instant failures. I haven’t tested planes, boats, trucks and special vehicles yet.

I found a bug that sometimes prevented a repair at the mechanic. Same bug also prevented fix through trainer or other fix-scripts. Fix is currently available for testing in the development branch linked above.


#25

My script has very little effect on the visual damage. I do multiply the vehicle body damage value, but there’s not much difference. If I take a clean healthy vehicle and simply change the body damage value to max damage, it just pops a light or two on some vehicles. Thats all.

There are a few promising API function that I will explore at a later time. Can’t promise anything though.


#26

doesn’t work with fuel script… my players are aying they refuel the tank, then get out of car and ge back in and fuel is again empty.


#27

Yeah I do not use trainers on my server, so its like a global setting.


#28

I am unable to replicate the problem. What fuel script are you using?

I have a theory on why that problem might happen, and I would guess that the current development test version of my script would solve that problem. Feel free to test, but beware that I haven’t yet balanced the damage algorithm in that version.


#29

Gonna do some testing later with my staff. Thanks for taking a look into it!


#30

I use this one https://github.com/TanguyOrtegat/esx_AdvancedFuel

thanks for having a look


#31

Just updated the development branch on GitHub with lots of fixes and refinements.

Added lots of comments in the code, and cleaned it up quite a bit, to make it easier to understand.

Also added more configuration options in the client.lua file, with explanations.


#32

Thanks, I will install and see if I can replicate the problem.


#33

I installed the mod and removed the check for money. Did not want to install a ton of dependencies and databases and whatnot.

I am able to fuel the car no problem, both with my previous release and the newest test version.
I can get out and in, no difference in fuel level. At the station or away from the station.
The car is just as drivable after fuelling as before.
I also looked through the fuelmod source code, and see no conflicting problems.

If there is a compatibility issue, it must be with another mod. Can you confirm that the problem is still present with the newest development branch?

Anyone else having problems with fuel mods and my script?


#34

I also use the fuel mod (essentialmode version) and have none of these issues. That fuel mod itself sometimes resets the fuel level, it’s a known bug. nothing to do with your script.


#35

New version released.

Version 0.3 should fix all problems discussed above.

The algorithm has been changed a lot to compensate for the problems encountered. It will not behave exactly as in the previous versions, but it’s close. The car will smoke and sputter slightly less, but thats the price for avoiding explosions from just a couple of gunshots to the engine or fuel tank.

Some observations:

Explosions will normally not happen from collisions or landing on the roof, but a car without a ped in it can burn or explode from shots. A disabled car should be able to take 3-4 gunshots to the engine and ~9 to the fuel tank.
Getting into a car that’s on fire will suppress the fire. That’s a side effect from my algorithm.

Degradation will happen after the vehicle sustains ~20% damage (configurable). This is not fatal. The degradation in vehicle health stops when the car begins to smoke. Another minor collision at that point will trigger cascading failure where the health of the engine quickly degrades and finally dies.

Strong Cars: There’s not really much I can do about that. A few cars simply doesn’t get damaged at all from even moderate to slightly heavy collisions. If GTA doesn’t register any damage, there’s nothing I can multiply from that. The Jobuilt Phantom Custom is surprisingly strong. It takes some strong collisions to register any damage.
The type of object you hit has a lot to say about damage. Lightpoles often does more damage than frontal collisions.
On the other hand you may be surprised at how little it takes to damage the Rhino. That’s GTA-Logic for you.

Leaky fuel tanks: On rare occasions I have encountered a leaking fuel tank on a bike or a car in GTA. This is probably not possible anymore with this mod in its current state.

Motorcycle damage: If you have a heavy collision on a motorcycle, you are normally thrown off the bike. When that happens, you are not on/in a vehicle when it’s time to multiply the damage. The bike will get the normal GTA amount of damage in that case.

Get it at GitHub using the link in the original post. Let me know if you find any problems.

Enjoy!


#36

Nice mod. I’m going to try it tonight and get back to you. Thanks!


#37

New version released

Version 0.4 adds a lot more visual damage (10x) and fixes a problem with weapons damage while someone is in the car.

Both the visual damage and the weapons damage are configurable at the top of client.lua.
As a default, I have increased visual damage by a factor of 10, and decreased weapons damage by a factor of 100.

When time permits I will work on fixing a problem with too little damage on some strangely tough cars like for example the Cheval Fugitive.

Get it at GitHub using the link in the original post. Let me know if you find any problems or have other suggestions.

Enjoy!


#38

This is some really nice work dude !


#39

We absolutely love this script, using this on our server FuseRP with the handling file we implemented gives a real change on driving especially with the snow at the moment which also effects driving.

+100 good job :wink:


#40

Does anybody have an issue with people locking and unlocking motorcycle will break it? Could be something in my custom handling file messing with it?