Zum Inhalt springen

Fahrzeug-Handling-Editor

Bearbeite 45 gängige CHandlingData-Felder plus die Flags mit Slidern und Live-Erklärungen. Importier eine bestehende handling.meta, pass sie an und exportier sie als handling.meta XML oder als Runtime-Lua mit SetVehicleHandlingFloat.

Dieses Tool und seine Hinweise sind vorerst auf Englisch.

Config & CodeFahrzeuge, DownloadZur Doku

Body & mass

fMasskg

Weight in kg. Affects collisions with other vehicles and how much force is needed to move it.

fInitialDragCoeff

Air drag. Higher values lower the real top speed and pull the car back when coasting.

fPercentSubmerged%

How far the vehicle sinks in water before it floats (percent of its height).

vecCentreOfMassOffsetm

Shifts the centre of mass (x = right, y = forward, z = up). Negative z makes it harder to roll over.

x
y
z
vecInertiaMultiplier

Rotational inertia per axis. Higher values make the car slower to pitch, roll or yaw.

x
y
z

Engine & gearbox

fDriveBiasFront

0.0 = rear wheel drive, 1.0 = front wheel drive, anything between is AWD with that share going to the front.

nInitialDriveGears

Number of forward gears.

fInitialDriveForce

Engine power multiplier at the wheels. The main acceleration value.

fDriveInertia

How fast the engine revs up. Higher revs faster.

fClutchChangeRateScaleUpShift

Up-shift speed multiplier. Higher shifts faster.

fClutchChangeRateScaleDownShift

Down-shift speed multiplier. Higher shifts faster.

fInitialDriveMaxFlatVelkm/h

Gearing top speed on flat ground, roughly in km/h. Drag decides where the car actually tops out.

Brakes & steering

fBrakeForce

Brake strength. Around 1.0 is a strong sports car brake.

fBrakeBiasFront

Share of brake force on the front axle. 0.5 is even, higher is more front biased.

fHandBrakeForce

Handbrake strength. Higher values lock the rear quicker.

fSteeringLockdeg

Maximum steering angle of the front wheels in degrees.

Traction

fTractionCurveMax

Peak grip when cornering. The main grip value.

fTractionCurveMin

Grip when sliding. Lower than max makes the car easier to break loose.

fTractionCurveLateraldeg

Slip angle (degrees) where peak grip is reached. Higher is more forgiving but less precise.

fTractionSpringDeltaMaxm

How far the tyre can flex before it loses grip, in metres.

fLowSpeedTractionLossMult

Wheelspin at launch. 0 = none, higher = more burnouts.

fCamberStiffnesss

Grip gained or lost from body roll when cornering. Usually 0. (Three s's is the real field name.)

fTractionBiasFront

Grip distribution. Below 0.5 gives the rear more grip (understeer), above gives the front more (oversteer).

fTractionLossMult

Grip loss on loose surfaces like dirt and grass. Lower keeps road grip off-road.

Suspension

fSuspensionForce

Spring stiffness. Higher is stiffer.

fSuspensionCompDamp

Damping when the spring compresses. Higher is stiffer.

fSuspensionReboundDamp

Damping when the spring extends. Higher is stiffer.

fSuspensionUpperLimitm

How far the wheel can move up from its rest position, in metres.

fSuspensionLowerLimitm

How far the wheel can drop from its rest position. Negative values.

fSuspensionRaisem

Ride height offset. Negative lowers the car.

fSuspensionBiasFront

Spring force distribution. Above 0.5 makes the front stiffer.

fAntiRollBarForce

Anti-roll bar strength. Higher reduces body roll.

fAntiRollBarBiasFront

Anti-roll bar distribution. Above 0.5 is stiffer at the front.

fRollCentreHeightFrontm

Front roll centre height. Higher reduces roll but can make the car tip.

fRollCentreHeightRearm

Rear roll centre height.

Damage & fluids

fCollisionDamageMult

Damage from collisions.

fWeaponDamageMult

Damage from weapons.

fDeformationDamageMult

Visual body deformation. 0 keeps the body straight.

fEngineDamageMult

Engine damage taken from hits.

fPetrolTankVolumeL

Fuel tank size. Mostly used for fuel leaking when shot. Fuel scripts often read it too.

fOilVolumeL

Oil volume. Affects how long the engine smokes before it dies.

Seat, value & AI

fSeatOffsetDistXm

Moves the driver seat position sideways.

fSeatOffsetDistYm

Moves the driver seat position forward or back.

fSeatOffsetDistZm

Moves the driver seat position up or down.

nMonetaryValue

Base value, used for things like insurance and sell price in GTA Online logic.

Driving profile

estimates
Top speed (est.)
198 km/h
123 mph, gearing limit
Drivetrain
RWD
6 gears
Force per tonne
0.214
drive force / mass
Weight
1400 kg
drag 8
Brake bias
45% front
force 1
Grip
2.45 / 2.25
bias 48% front
handling.meta
<?xml version="1.0" encoding="UTF-8"?>
<CHandlingDataMgr>
  <HandlingData>
    <Item type="CHandlingData">
      <handlingName>MYCAR</handlingName>
      <fMass value="1400.000000" />
      <fInitialDragCoeff value="8.000000" />
      <fPercentSubmerged value="85.000000" />
      <vecCentreOfMassOffset x="0.000000" y="0.000000" z="0.000000" />
      <vecInertiaMultiplier x="1.000000" y="1.000000" z="1.000000" />
      <fDriveBiasFront value="0.000000" />
      <nInitialDriveGears value="6" />
      <fInitialDriveForce value="0.300000" />
      <fDriveInertia value="1.000000" />
      <fClutchChangeRateScaleUpShift value="5.000000" />
      <fClutchChangeRateScaleDownShift value="5.000000" />
      <fInitialDriveMaxFlatVel value="150.000000" />
      <fBrakeForce value="1.000000" />
      <fBrakeBiasFront value="0.450000" />
      <fHandBrakeForce value="0.700000" />
      <fSteeringLock value="40.000000" />
      <fTractionCurveMax value="2.450000" />
      <fTractionCurveMin value="2.250000" />
      <fTractionCurveLateral value="21.000000" />
      <fTractionSpringDeltaMax value="0.150000" />
      <fLowSpeedTractionLossMult value="1.000000" />
      <fCamberStiffnesss value="0.000000" />
      <fTractionBiasFront value="0.480000" />
      <fTractionLossMult value="0.900000" />
      <fSuspensionForce value="2.500000" />
      <fSuspensionCompDamp value="1.400000" />
      <fSuspensionReboundDamp value="2.200000" />
      <fSuspensionUpperLimit value="0.080000" />
      <fSuspensionLowerLimit value="-0.120000" />
      <fSuspensionRaise value="0.000000" />
      <fSuspensionBiasFront value="0.500000" />
      <fAntiRollBarForce value="0.800000" />
      <fAntiRollBarBiasFront value="0.600000" />
      <fRollCentreHeightFront value="0.200000" />
      <fRollCentreHeightRear value="0.200000" />
      <fCollisionDamageMult value="1.000000" />
      <fWeaponDamageMult value="1.000000" />
      <fDeformationDamageMult value="0.700000" />
      <fEngineDamageMult value="1.500000" />
      <fPetrolTankVolume value="65.000000" />
      <fOilVolume value="5.000000" />
      <fSeatOffsetDistX value="0.000000" />
      <fSeatOffsetDistY value="0.000000" />
      <fSeatOffsetDistZ value="0.000000" />
      <nMonetaryValue value="100000" />
      <strModelFlags>440010</strModelFlags>
      <strHandlingFlags>20000</strHandlingFlags>
      <strDamageFlags>0</strDamageFlags>
      <AIHandling>SPORTS_CAR</AIHandling>
      <SubHandlingData>
        <Item type="NULL" />
        <Item type="NULL" />
        <Item type="NULL" />
      </SubHandlingData>
    </Item>
  </HandlingData>
</CHandlingDataMgr>

How to use it

  1. Pick a template or import your vehicle's existing handling.meta (paste it or open the file).
  2. Set handlingName so it matches <handlingId> in the vehicle's vehicles.meta.
  3. Tune the values. A yellow dot marks fields you changed; the reset link puts one field back.
  4. Download handling.meta and restart the resource, or copy the Lua for live testing in game.

The templates are generic starting points, not copies of base-game cars. If you want to start from a real vehicle, paste its <Item type="CHandlingData"> block from the game's handling.meta. Your work is saved in this browser.

Loading handling.meta in a resource

fx_version 'cerulean'
game 'gta5'

files {
    'data/handling.meta',
}

data_file 'HANDLING_FILE' 'data/handling.meta'

Restart the resource and respawn the vehicle. Handling is read when the vehicle is created, so a car that was already out keeps the old values.

Testing at runtime with Lua

The Lua export uses SetVehicleHandlingFloat, SetVehicleHandlingInt andSetVehicleHandlingVector with the 'CHandlingData' class. Run it on the client that owns the vehicle. FiveM converts values to the game's internal units for you (km/h to m/s, degrees to radians, bias values doubled), so you pass the same numbers you would write in handling.meta.

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveForce', 0.35)
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveMaxFlatVel', 165.0)
ModifyVehicleTopSpeed(vehicle, 1.0)

Always pass floats with a decimal point (165.0, not 165). Runtime changes only affect that vehicle instance and are gone when it is deleted, so ship the final values in handling.meta.

Gotchas

  • fCamberStiffnesss really has three s's. Spelling it "correctly" means the game ignores it.
  • The top speed number is an estimate from gearing. Drag and power decide where the car really tops out.
  • Flags are hex without a 0x prefix in handling.meta, for example <strModelFlags>440010</strModelFlags>.
  • Bikes, boats and planes also need their own SubHandlingData item (CBikeHandlingData, CBoatHandlingData, CFlyingHandlingData). Import keeps it untouched.
  • Mod kit ids must be unique across all vehicles on the server. A clash makes tuning menus show the wrong parts.