Vehicle Damage

{:links-list}

INSTALLATION

  1. Open the downloaded ZIP product file and drop the folder in it somewhere in your resources folder.
  2. Add your product key (get it here) to the settings.ini file
  3. Add start BigDaddy-VehicleDamage to your server.cfg.

DO NOT RENAME THE FOLDER.

If you change the name of the folder it will not function correctly so leave the name as it is.

{:is-danger}

WARNINGS

Hydroplaning/Sliding

When you are hydroplaning or sliding on the snow... your speedometer will go way up past where you think that vehicle can drive. You are NOT actually going faster. That is your wheels spinning because they have no traction. I mean it's like ZERO traction so your wheels start spinning like crazy. This is built into the game, I did not program that. YOU ARE NOT ACTUALLY GOING FASTER.

{:is-warning}

CONFLICT WARNING

Any other vehicle damage script you have running will compete with this one and they will cause your vehicle to go from full health to zero health with one tiny collision. If you tap a speed limit sign and your engine goes red immediately, you have another script running that deals with vehicle damage. You must remove anything else that tries to control engine health, unless it is a repair script only.

{:is-warning}

CONFIGURATION

SETTING DEFAULT DESCRIPTION
[licensing]
key1 none This is where you put your product key
[settings]
allowRepair false Whether vehicle repairs are allowed through the script
keepFuelLevelOnRepair true Whether repairing a vehicle preserves its current fuel level
permissionToRepair false Whether permissions are required to use repair functionality
acePermissionToRepair Command ACE permission required to repair vehicles
menukey 57 Default key used to open the menu
disableMenu false Whether the repair/configuration menu is disabled - NOTE this also has to be changed in the menu.ini to completely remove the menu
DesyncKey 777621053120 Internal synchronization key. Do not change this value
[damages] Best to leave these as is. These settings work very well.
deformationMultiplier -1 Controls how much visual deformation collisions cause. -1 disables modification
deformationExponent 0.4 Adjusts vehicle deformation toward a normalized value
collisionDamageExponent 0.6 Adjusts how collision damage scales between vehicles
damageFactorEngine 2.0 Multiplier for engine damage from impacts
damageFactorBody 3.0 Multiplier for body damage from impacts
damageFactorPetrolTank 50.0 Multiplier for fuel tank damage
engineDamageExponent 0.6 Adjusts how engine damage scales between vehicles
weaponsDamageMultiplier 2.0 Multiplier for weapon damage to vehicles
degradingHealthSpeedFactor 10 Speed at which damaged vehicles slowly continue degrading
cascadingFailureSpeedFactor 8.0 Speed of rapid engine failure once below the cascading threshold
degradingFailureThreshold 800.0 Vehicle health level where gradual degradation begins
cascadingFailureThreshold 360.0 Vehicle health level where rapid cascading failure begins
engineSafeGuard 100.0 Lowest engine health value allowed before total engine death
torqueMultiplierEnabled true Whether engine torque decreases as damage increases
limpMode true Prevents engines from failing completely
limpModeMultiplier 0.10 Torque multiplier applied while in limp mode
preventVehicleFlip true Prevents players from controlling overturned vehicles to flip them back over
compatibilityMode false Prevents other scripts from modifying fuel tank health
randomTireBlowOutInterval 5 Average minutes above 60 MPH before a random tire blowout can occur
allowEngineFires true Whether damaged and overheated engines can catch fire
fireChance 100 Chance that an overheated damaged engine catches fire
[damageClassMultiplier]
0 1.0 Damage multiplier for Compacts
1 1.0 Damage multiplier for Sedans
2 1.0 Damage multiplier for SUVs
3 1.0 Damage multiplier for Coupes
4 1.0 Damage multiplier for Muscle vehicles
5 1.0 Damage multiplier for Sports Classics
6 1.0 Damage multiplier for Sports vehicles
7 1.0 Damage multiplier for Super vehicles
8 0.25 Damage multiplier for Motorcycles
9 0.7 Damage multiplier for Off-road vehicles
10 0.25 Damage multiplier for Industrial vehicles
11 1.0 Damage multiplier for Utility vehicles
12 1.0 Damage multiplier for Vans
13 1.0 Damage multiplier for Cycles
14 0.5 Damage multiplier for Boats
15 1.0 Damage multiplier for Helicopters
16 1.0 Damage multiplier for Planes
17 1.0 Damage multiplier for Service vehicles
18 0.3 Damage multiplier for Emergency vehicles
19 0.75 Damage multiplier for Military vehicles
20 1.0 Damage multiplier for Commercial vehicles
21 1.0 Damage multiplier for Trains
[rollovers]
allowRollovers true Whether rollover physics and behavior are enabled
NPCBaseRolloverProbability 20 Base chance for NPC vehicles to roll over
PlayerBaseRolloverProbability 20 Base chance for player vehicles to roll over
ExplodeChance 5 Chance a vehicle explodes during a rollover
RolloverForceMultiplier 1.0 Force multiplier applied when initiating rollovers
RolloverForceMultiplierSuv 1.1 SUV-specific rollover force multiplier
RolloverForceMultiplierCom 1.2 Commercial truck rollover force multiplier
allowAIRollovers true Whether AI vehicles can experience rollovers
ExtendedRollovers false Enables larger and more dramatic rollovers
HydroplaningChance 50 Chance of hydroplaning when conditions are met
DirtSlide true Whether vehicles can slide on dirt surfaces
NoControlWhileAirborne true Prevents players from controlling vehicles while airborne
RolloverEjectionChance 50 Chance players are ejected during rollovers
[tiredamage]
damageChance 50 Chance tire damage occurs when landing hard or meeting damage conditions
airtimeMinimum 1.0 Minimum airborne time before landing damage can occur
suspensionCompressionMinimum 0.25 Minimum suspension compression required before tire damage can occur
runflat true Whether flat tires stay attached and remain drivable
randomflats true Whether random tire punctures can occur

COMMANDS

/repair repairs the vehicle you are driving (can be disabled in the settings.ini)

/setdamagen set the damagelevel on the vehicle you are driving - valid values for n are 0 - 100 (can be disabled in the settings.ini)

/tiredamage? set tire damage valid values for ? are all (all tires), rf (right front), lf (left front), rb (right rear), lb (left rear), f (all front), b (all rear), l (all left), r (all right), blank (fix all tires), wheel (to toggle wheel damage) (can be disabled in the settings.ini)

/rollovers will toggle vehicle rollovers on and off on the client. This command will only take effect when you get into a vehicle. So if you use it in the vehicle, you will need to get out and back in before it will change.

MENU

/vehicledamage brings up the menu or the key set in the config (unless disabled)

If you are in a vehicle and choose Repair Engine form the repair menu, it will be repaired immediately. If you are near a vehicle but not in it you will walk to the engine and open the "hood" and "fix" it.

Same with a flat tire if you choose Repair Closest Tire

Disabling the menu

Technically the menu is not meant to be disabled. If you absolutely don't want the menu (half of the functionality will be missing without it) edit the menu.ini and set menuDisabled to true and change the disableMenu option to true in the settings.ini.

{:is-danger}

EXPORTS

BigDaddy-VehicleDamage:repair repairs the vehicle you are driving. This is for other resources like garage/mechancic scripts to be able to use the repair command without conflict.

returns bool

LUA

exports['BigDaddy-VehicleDamage']:repair()

C#

Exports["BigDaddy-VehicleDamage"].repair();