Config = {
Precision = 10000.0,
Fields = {
{ name = "fMass", type = "float", description = [[
The weight of the vehicle. Values should be given in Kilograms.
- Used when the vehicle collides with another vehicle or a non-static object.
]] },
{ name = "fInitialDragCoeff", type = "float", description = [[
Sets the drag coefficient of the vehicle. Increase to simulate aerodynamic drag.
]] },
{ name = "fDownforceModifier", type = "float" },
{ name = "fPercentSubmerged", type = "float", description = [[
The percentage of the vehicle's "floating height" after it falls into the water, before sinking.
- Default - 85% for vanilla, land vehicles. The value will stop sinking the vehicle to float for a moment before sinking. Boats excluded.
- Value: Any percentage. Should be given in decimal. Example: 0.70 (70%)
- An invalid number will cause the vehicle to sink without the driver drowning.
]] },
{ name = "vecCentreOfMassOffset", type = "vector", description = [[
Shifts the center of gravity in meters from side to side.
Values (0 means that the center of gravity will be in the center of the vehicle):
- X: -10.0 to 10.0. Positive values move the center of gravity right.
- Y: -10.0 to 10.0. Positive values move the center of gravity forwards.
- Z: -10.0 to 10.0. Positive values move the center of gravity upwards.
]] },
{ name = "vecInertiaMultiplier", type = "vector" },
{ name = "fDriveBiasFront", type = "float", description = [[
This is used to determine whether a vehicle is front, rear, or four wheel drive.
Values:
- 0.0 means that the vehicle is rear wheel drive.
- 1.0 means that the vehicle is front wheel drive.
- Any value between 0.01 and 0.99 is four wheel drive.
- 0.5 give both front and rear axles equal force, being the perfect 4WD.
]] },
{ name = "nInitialDriveGears", type = "integer", description = [[
This line determines how many forward speeds/gears a vehicle's transmission contains.
Values: 1 or more.
]] },
{ name = "fInitialDriveForce", type = "float", description = [[
This modifies the game's calculation of drive force (from the output of the transmission).
Values (0.01 - 2.0 and above):
- 1.0 uses drive force calculation unmodified.
- Values less than 1.0 will in effect give the vehicle less drive force.
- Values greater than 1.0 will produce more drive force.
]] },
{ name = "fDriveInertia", type = "float", description = [[
Describes how fast an engine will rev.
Values (0.01 - 2.0):
- Default value is 1.0, (or no modification of drive intertia).
- Bigger values = quicker Redline (maximum engine speed)
]] },
{ name = "fClutchChangeRateScaleUpShift", type = "float", description = [[
Clutch speed multiplier on up shifts.
- Bigger numbers = faster shifts.
]] },
{ name = "fClutchChangeRateScaleDownShift", type = "float", description = [[
Clutch speed multiplier on down shifts.
- Bigger numbers = faster shifts.
]] },
{ name = "fInitialDriveMaxFlatVel", type = "float", description = [[
This determines the vehicle speed at redline in the top gear (not the show). Setting this value DOES NOT guarantee the vehicle will reach the given speed.
Values (0.00 and above):
- Multiply the number in the file by 0-82 to get the speed in mph.
- Multiply by 1.32 to get the speed in kph.
]] },
{ name = "fBrakeForce", type = "float", description = [[
Multiplies the game's calculation of deceleration.
Values (0.01 - 2.0 and above):
- Bigger numbers = harder braking.
- 1.0 uses brake force calculation unmodified.
]] },
{ name = "fBrakeBiasFront", type = "float", description = [[
This line controls the distribution of braking force between the front and rear axles.
Values:
- 0.0 means the rear axle only receives brake force.
- 1.0 means the front axle only receives brake force.
- 0.5 gives both axles equal brake force.
- Values between 0.01 and 0.49 means the rear axle will receive more brake force.
- Values between 0.51 and 0.99 means the front axles will receive more brake force than the rear.
]] },
{ name = "fHandBrakeForce", type = "float", description = [[
Braking power of the handbrake.
Values (0.0 and above):
- Bigger numbers = harder braking.
]] },
{ name = "fSteeringLock", type = "float", description = [[
This multiplies the game's calculation of the angle of the steer wheel will turn while at full turn. Steering lock is directly related to over/under-steer.
Values (0.0 and above):
- Values between 0.1 - 0.2 will simulate a long wheelbase.
- Values around 0.75 and above will turn extremely fast. Higher values will cause the vehicle to spin out easily.
]] },
{ name = "fTractionCurveMax", type = "float", description = [[
Cornering grip of the vehicle as a multiplier of the tire surface friction.
]] },
{ name = "fTractionCurveMin", type = "float", description = [[
Accelerating/braking grip of the vehicle as a multiplier of the tire surface friction.
]] },
{ name = "fTractionCurveLateral", type = "float", description = [[
Shape of lateral traction curve.
]] },
{ name = "fTractionSpringDeltaMax", type = "float", description = [[
This value determines at what distance above the ground the car will lose traction.
]] },
{ name = "fLowSpeedTractionLossMult", type = "float", description = [[
How much traction is reduced at low speed.
- 0.0 means normal traction. It affects mainly car burnout when pressing gas (W/UP).
- Decreasing value will cause less burnout, less sliding at start.
- Higher value will cause more burnout.
]] },
{ name = "fCamberStiffnesss", type = "float", description = [[
This value modify the grip of the car when you're drifting.
- More than 0 make the car sliding on the same angle you're drifting.
- Less than 0 make your car oversteer.
- Not recommended to modify it for grip.
]] },
{ name = "fTractionBiasFront", type = "float", description = [[
Determines the distribution of traction from front to rear.
Values (0.01 - 0.99):
- 0.01 = only rear axle has traction.
- 0.99 = only front axle has traction.
- 0.5 = both axles have equal traction.
- Entering a value of 0.0 or 1.0 causes the vehicle to have no traction.
]] },
{ name = "fTractionLossMult", type = "float", description = [[
Affects how much grip is changed when driving on asphalt and mud.
- Higher values make the car less responsive and prone to sliding.
]] },
{ name = "fSuspensionForce", type = "float", description = [[
Affects how strong suspension is.
- 1 / (Force * Wheels) = Lower limit for zero force at full extension.
]] },
{ name = "fSuspensionCompDamp", type = "float", description = [[
Damping during strut compression.
]] },
{ name = "fSuspensionReboundDamp", type = "float", description = [[
Damping during strut rebound.
]] },
{ name = "fSuspensionUpperLimit", type = "float", description = [[
Visual limit of how far can wheels move up / down from original position.
]] },
{ name = "fSuspensionLowerLimit", type = "float", description = [[
Visual limit of how far can wheels move up / down from original position.
]] },
{ name = "fSuspensionRaise", type = "float", description = [[
The amount that the suspension raises the body off the wheels.
]] },
{ name = "fSuspensionBiasFront", type = "float", description = [[
This value determines which suspension is stronger, front or rear.
- If value is above 0.50 then front is stiffer, when below, rear is stiffer.
]] },
{ name = "fAntiRollBarForce", type = "float", description = [[
Larger Numbers = less body roll.
]] },
{ name = "fAntiRollBarBiasFront", type = "float", description = [[
The bias between front and rear for the anti-roll bar.
]] },
{ name = "fRollCentreHeightFront", type = "float", description = [[
Values (Recommended -0.15 to 0.15):
- Larger Numbers = less rollovers.
]] },
{ name = "fRollCentreHeightRear", type = "float", description = [[
This value modify the weight transmission during an acceleration between the front and rear. high positive value can make your car able to do wheelies.
Values (Recommended -0.15 to 0.15):
- Larger Numbers = less rollovers.
]] },
{ name = "fCollisionDamageMult", type = "float", description = [[
Multiplies the game's calculation of damage to the vehicle by collision.
]] },
{ name = "fWeaponDamageMult", type = "float", description = [[
Multiplies the game's calculation of damage to the vehicle by weapons.
]] },
{ name = "fDeformationDamageMult", type = "float", description = [[
Multiplies the game's calculation of deformation damage.
]] },
{ name = "fEngineDamageMult", type = "float", description = [[
Multiplies the game's calculation of damage to the engine, causing explosion or engine failure.
]] },
{ name = "fPetrolTankVolume", type = "float", description = [[
Amount of petrol that will leak after damaging a vehicle's tank.
]] },
{ name = "fOilVolume", type = "float", description = [[
Amount of oil.
]] },
{ name = "fSeatOffsetDistX", type = "float", description = [[
Value: Driver > passenger
]] },
{ name = "fSeatOffsetDistY", type = "float", description = [[
Value: Trunk > hood
]] },
{ name = "fSeatOffsetDistZ", type = "float", description = [[
Value: Undercarriage > roof
]] },
{ name = "nMonetaryValue", type = "integer" },
},
Types = {
["float"] = {
getter = GetVehicleHandlingFloat,
setter = function(vehicle, _type, fieldName, value)
local value = tonumber(value)
if value == nil then error("value not number") end
SetVehicleHandlingFloat(vehicle, _type, fieldName, value + 0.0)
end,
},
["integer"] = {
getter = GetVehicleHandlingInt,
setter = function(vehicle, _type, fieldName, value)
local value = tonumber(value)
if value == nil then error("value not number") end
SetVehicleHandlingInt(vehicle, _type, fieldName, math.floor(value))
end,
},
["vector"] = {
getter = GetVehicleHandlingVector,
setter = function(vehicle, _type, fieldName, value)
local axes = 1
local vector = {}
for axis in value:gmatch("([^,]+)") do
vector[axes] = tonumber(axis)
axes = axes + 1
end
for i = 1, 3 do
if vector[i] == nil then
error("invalid vector", i)
end
end
SetVehicleHandlingVector(vehicle, _type, fieldName, vector3(vector[1], vector[2], vector[3]))
end,
},
},
}