VehicleDeformation - Get/Set and sync Vehicle Deformations!

Showcase Video

:information_source: Note:

Damage application seen in the video is not representative of what it looks like today. Comparison screenshots for v3.0.0 and above below!

Screenshots


:fireworks: VehicleDeformation

This is a small resource that allows saving and reapplying of vehicle bodywork deformation. It also
features full synchronization of the damage between all players. No more weird situations where
other players cannot see the damage on your vehicle!

:floppy_disk: Download

Requirements

  • OneSync

:clipboard: Features

  • Functions for getting/setting vehicle bodywork deformation.
  • Included exports:
    • Getting deformation
    • Setting deformation
    • Fixing deformation
    • Checking if two deformations are equal
    • Checking if one deformation is worse than the other one.
  • Uses entity state bags for full synchronization of bodywork deformation to all players.

:fire: Performance

  • Client Side: idle: 0.00ms; while applying deformation: 0.01ms
  • Server Side: 0.00ms

Installation instructions

  1. Extract the downloaded folder into your resources.
  2. Start the resource in your server.cfg:
    ensure VehicleDeformation
    
  3. Repair the deformation using the FixVehicleDeformation export (more below).

:page_facing_up: Documentation

:coffee: Support me

If you want to further support my work, consider taking a look at my Tebex store . Maybe you can find something you would like :smiling_face_with_three_hearts:

24 Likes

I’m totally going to try this, thank you !

1 Like

Thank you so much to share it!

1 Like

thank you so much bro

1 Like

Awesome share I was searching how to save this a few days ago but now see you done it :smiley:

2 Likes

It was great brother

thank you :heartpulse:

1 Like

so how to repair the car ? xD

amazing btw

1 Like

Hotfix v1.0.1:

  • Fixed FixVehicleDeformation export from the example not syncing to every client properly.

You need to call the FixVehicleDeformation export. Check the readme on how to use it.

And thanks :slight_smile:

Hey !
I’m using your script and i just noticed that if you apply the deformation on the vehicle, even when you repair the car between applying the damages. Is it normal ?

Check the readme for the fix export :slight_smile:

Absolute legend, thanks so much for sharing

2 Likes

Is not working with t20, zentornos etc… Only with sedans any solution?

When did it ever work with those vehicles?

Rockstar never implemented a proper deformation model for most super cars.

And the tiny dents don’t get detected by this script to save performance.

(Also there is an update coming up soon™)

2 Likes

Major update!

I just saw that the vehicle deforms more than normal, when it regenerates the deformity, it applies a little more than it was before and accumulates, which causes the vehicle to be damaged more and more so you don’t crash

This mostly happens to a small percentage of vanilla vehicles. Sadly many modded vehicles don’t have a proper collision/deformation model.

This system works by basically getting the “amount” of deformation at a specific point on the vehicle. Do this multiple times and you get all/most of the dents.
However applying this damage is way different. Imagine throwing a wrecking ball with a specific size and force at the vehicle to try and recreate the previous damage.

That’s why it sometimes can create more damage than before. But again, this is something that happens mostly for modded vehicles. I’ve tried to balance it on vanilla vehicles, especially the FUTO since it has a pretty good deformation model.

Sorry if it is not understood but I am using a translator, I will try to see how I can get a more exact value and I will tell you if I can do it

:fireworks: VehicleDeformation v2.1.0

  • Now uses use_experimental_fxv2_oal and lua54.
  • Performance improvements.
  • Formatting changes.
  • State bag update now happens on entity damage instead of every five seconds.
    • Now also works when no player is sitting inside the vehicle.
  • Added version checker.
  • Updated to new license.
  • Updated to new readme.

[Direct download] - [Release page] - [New license]

:fireworks: VehicleDeformation v3.0.0

  • Added type, model and plate blacklists.
  • Entire rewrite of GetVehicleDeformation and SetVehicleDeformation.
  • Added export for getting deformation offsets (GetDeformationOffsets).
  • Fixed deformation offset calculation.

Note: Old data is not compatible with the new SetVehicleDeformation function and calling it with old data will result in no damage application.

[Direct download] - [Release page]

2 Likes