handling.meta explained: fields, units and flags

By Nilo3D · Updated:

handling.meta defines how a vehicle drives in GTA V. Each entry sets mass, drive force, gears, top speed, brakes, steering, tire grip, suspension and damage multipliers, plus hex flags and optional sub-handling blocks for cars, bikes, boats and aircraft. A vehicle uses the entry whose handlingName equals its handlingId in vehicles.meta.

What is handling.meta?

handling.meta is an XML list of CHandlingData items. Each item is one physics profile, identified by handlingName. On FiveM it is loaded with data_file 'HANDLING_FILE'. The entry below is the stock Sultan with the name changed; the values in the tables on this page refer to it.

<?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.400000" z="1.600000" />
      <fDriveBiasFront value="0.400000" />
      <nInitialDriveGears value="5" />
      <fInitialDriveForce value="0.260000" />
      <fDriveInertia value="1.000000" />
      <fClutchChangeRateScaleUpShift value="1.800000" />
      <fClutchChangeRateScaleDownShift value="1.800000" />
      <fInitialDriveMaxFlatVel value="145.000000" />
      <fBrakeForce value="0.400000" />
      <fBrakeBiasFront value="0.650000" />
      <fHandBrakeForce value="0.700000" />
      <fSteeringLock value="35.000000" />
      <fTractionCurveMax value="2.350000" />
      <fTractionCurveMin value="1.950000" />
      <fTractionCurveLateral value="22.500000" />
      <fTractionSpringDeltaMax value="0.150000" />
      <fLowSpeedTractionLossMult value="1.400000" />
      <fCamberStiffnesss value="0.000000" />
      <fTractionBiasFront value="0.485000" />
      <fTractionLossMult value="1.000000" />
      <fSuspensionForce value="2.800000" />
      <fSuspensionCompDamp value="1.200000" />
      <fSuspensionReboundDamp value="2.100000" />
      <fSuspensionUpperLimit value="0.150000" />
      <fSuspensionLowerLimit value="-0.140000" />
      <fSuspensionRaise value="0.000000" />
      <fSuspensionBiasFront value="0.500000" />
      <fAntiRollBarForce value="0.300000" />
      <fAntiRollBarBiasFront value="0.530000" />
      <fRollCentreHeightFront value="0.240000" />
      <fRollCentreHeightRear value="0.250000" />
      <fCollisionDamageMult value="0.700000" />
      <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.050000" />
      <nMonetaryValue value="35000" />
      <strModelFlags>440010</strModelFlags>
      <strHandlingFlags>0</strHandlingFlags>
      <strDamageFlags>0</strDamageFlags>
      <AIHandling>AVERAGE</AIHandling>
      <SubHandlingData>
        <Item type="CCarHandlingData">
          <fBackEndPopUpCarImpulseMult value="0.100000" />
          <fBackEndPopUpBuildingImpulseMult value="0.030000" />
          <fBackEndPopUpMaxDeltaSpeed value="0.600000" />
        </Item>
        <Item type="NULL" />
        <Item type="NULL" />
      </SubHandlingData>
    </Item>
  </HandlingData>
</CHandlingDataMgr>

Every field has a minimum and maximum in the game's data schema. For most floats the range is 0 to 1000, fMass goes up to 100000, and the gear count is capped at 10. Values in the tables are what the game does with the number after loading, taken from the handling code.

What do fMass, drag and centre of mass do?

FieldUnitSultanWhat it does
fMasskg1400Vehicle mass. Used in every force and collision calculation.
fInitialDragCoeffmultiplied by 0.0001 on load8.0Air drag. Higher values slow the vehicle more at speed.
fPercentSubmerged%85How much of the vehicle sits under water when floating. The game derives its buoyancy constant as 100 divided by this value.
vecCentreOfMassOffsetmetres0, 0, 0Moves the centre of mass. y is front to back, z is up and down. A higher centre makes the vehicle roll over more easily.
vecInertiaMultipliermultiplier per axis1.0, 1.4, 1.6Rotational inertia. A lower value on an axis makes the vehicle rotate more easily around it.

Which fields set acceleration and top speed?

Top speed comes from fInitialDriveMaxFlatVel and acceleration from fInitialDriveForce. The game converts the velocity from km/h to m/s on load and then adds 20% to get the speed used for gearing, which is why vehicles go a little faster than the number in the file.

FieldUnitSultanWhat it does
fInitialDriveMaxFlatVelkm/h145Top speed reference on flat ground. Gearing uses this value times 1.2.
fInitialDriveForcescale0.26Engine drive force. Raises acceleration.
nInitialDriveGearscount5Number of forward gears. Anything above 10 is cut to 10.
fDriveInertiascale1.0How quickly the engine revs rise and fall.
fClutchChangeRateScaleUpShift, ...DownShiftscale1.8How fast the clutch re-engages after a shift. Higher is a quicker shift.
fDriveBiasFront0 to 10.4Share of drive on the front wheels. Below 0.1 the game treats it as pure rear-wheel drive, above 0.9 as pure front-wheel drive, anything between is all-wheel drive.

How do the brake and steering fields work?

FieldUnitSultanWhat it does
fBrakeForcescale0.4Overall braking strength.
fBrakeBiasFront0 to 10.65Share of braking on the front axle. The rear gets the rest.
fHandBrakeForcescale0.7Handbrake strength.
fSteeringLockdegrees35Maximum steering angle of the wheels. Converted to radians on load.

What is the traction curve?

The traction curve is the tire grip model. Grip is highest at a small slip angle (fTractionCurveMax) and falls toward fTractionCurveMin as the tire slides. Max must be greater than Min and above zero, or the loader warns about an invalid curve.

FieldUnitSultanWhat it does
fTractionCurveMaxgrip coefficient2.35Peak grip, before the tire starts sliding.
fTractionCurveMingrip coefficient1.95Grip once the tire is sliding.
fTractionCurveLateraldegrees22.5Slip angle range of the curve. A larger angle makes grip fall off more gradually, so slides are more forgiving.
fTractionSpringDeltaMaxlimit0.15Limit used by the sideways spring of the tire model.
fLowSpeedTractionLossMultmultiplier1.4Extra grip loss when pulling away from a stop. 0 turns the effect off; higher values mean more wheelspin off the line.
fCamberStiffnesssmultiplier0Side force from leaning; only does something above 0 and is mainly used by bikes. The tag really has three s.
fTractionBiasFront0 to 10.485Share of grip on the front axle. Lower values make the front slide first (understeer).
fTractionLossMultmultiplier1.0How strongly the surface under the wheels (grass, sand, mud) costs grip, adds drag and cuts top speed. 0 ignores the surface.

The handling flag HF_HAS_RALLY_TYRES (0x8) reverses the curve: grip rises toward Max as the tire slides instead of dropping.

What do the suspension fields do?

FieldSultanWhat it does
fSuspensionForce2.8Spring stiffness.
fSuspensionCompDamp, fSuspensionReboundDamp1.2, 2.1Damping while the spring compresses and while it extends. Both are multiplied by 0.1 on load. Low values bounce, high values feel planted.
fSuspensionUpperLimit, fSuspensionLowerLimit0.15, -0.14How far the wheel can travel up and down from rest, in metres.
fSuspensionRaise0Raises or lowers the body relative to the wheels, in metres.
fSuspensionBiasFront0.5Share of spring force on the front axle (0 to 1).
fAntiRollBarForce, fAntiRollBarBiasFront0.3, 0.53Anti-roll bar strength and its front share. More force means less body roll in corners.
fRollCentreHeightFront, fRollCentreHeightRear0.24, 0.25Roll centre heights in metres, used for weight transfer in corners.

A lowered car whose wheels pop through the arches usually has too much upper travel for the space in the wheel arch: reduce fSuspensionUpperLimit and raise the damping before touching the spring force.

What are the damage and misc fields?

  • fCollisionDamageMult, fWeaponDamageMult, fEngineDamageMult: multipliers for damage from crashes, from weapons and to the engine.
  • fDeformationDamageMult: how much the body visibly deforms.
  • fPetrolTankVolume, fOilVolume: tank and oil volume.
  • fSeatOffsetDistX/Y/Z: seat position offsets.
  • nMonetaryValue: base value of the vehicle, up to 1000000.
  • AIHandling: name of the AI driving profile, for example AVERAGE. It only affects computer-controlled drivers.
  • fDownforceModifier (0 to 100), fRocketBoostCapacity and fBoostMaxSpeed: newer optional fields for downforce and rocket boost.

How do strModelFlags and strHandlingFlags work?

The three flag fields are hexadecimal bitmasks written without the 0x prefix. To build one, add up the hex values of the flags you want. The Sultan's 440010 is three flags:

MF_ABS_STD           0x00000010
MF_AXLE_F_MCPHERSON  0x00040000
MF_AXLE_R_MCPHERSON  0x00400000
                     ----------
strModelFlags        0x00440010  ->  <strModelFlags>440010</strModelFlags>
FieldFlagHexEffect
strModelFlagsMF_IS_VAN0x1Van.
MF_ABS_STD0x10ABS as standard.
MF_NO_DOORS0x100The vehicle has no doors.
MF_NO_WHEEL_BURST0x2000000Tires cannot burst.
MF_IS_RC0x10000000Remote-controlled car.
strHandlingFlagsHF_HAS_RALLY_TYRES0x8Reverses the traction curve.
HF_NO_HANDBRAKE0x10No handbrake.
HF_STEER_REARWHEELS0x20Steers with the rear wheels.
HF_NO_REVERSE0x200Cannot reverse.
HF_CVT0x1000Continuously variable transmission.
HF_OFFROAD_ABILITIES0x100000Extra gravity for off-road grip.
HF_ARMOURED0x8000000Bullet proof.
strDamageFlagsDF_DRIVER_SIDE_FRONT_DOOR0x1Door damage flag for the driver door.
DF_BONNET, DF_BOOT0x10, 0x20Door damage flags for bonnet and boot.

What are SubHandlingData blocks?

SubHandlingData holds up to four extra blocks, each for one kind of vehicle. Add the block that matches the vehicle and leave the other slots as <Item type="NULL" />. The game ignores a block of the wrong kind.

Block typeForExamples of fields
CCarHandlingDataCarsfToeFront, fCamberFront, fCastor, fEngineResistance, strAdvancedFlags
CBikeHandlingDataMotorcycles and bicyclesfMaxBankAngle, fWheelieBalancePoint, fInAirSteerMult, fJumpForce
CFlyingHandlingDataPlanes and helicoptersfThrust, fYawMult, fRollMult, fPitchMult, fFormLiftMult
CBoatHandlingDataBoatsfBoxFrontMult, fAquaplaneForce, fRudderForce
CSpecialFlightHandlingDataHover and flying modes on ground vehiclesmode, fMaxThrust, vecAngularDamping, strFlags
CSubmarineHandlingData, CTrailerHandlingData, CSeaPlaneHandlingData, CVehicleWeaponHandlingDataSubmarines, trailers, seaplanes, weaponized vehiclesDive speed, attach limits, pontoons, turret limits

The flight handling of the Nilo3D hoverboards is done this way, in the handling file with no script. In the bike block, the lean and balance angles are written in degrees and converted to radians on load.

The other files a board needs are listed in how a FiveM hoverboard works without a script.

How do I test handling changes?

Change one value at a time, restart the resource and drive the same stretch of road before changing the next one. Keep a copy of the last version that felt right. The stock entry of a similar vehicle is the best reference for whether a value is in a normal range: the game's own handling.meta has an entry for every stock vehicle.

Handling only takes effect when the entry is linked correctly: handlingName here, handlingId in vehicles.meta, and a HANDLING_FILE line in the manifest, as shown in how to add an add-on vehicle to FiveM. If the vehicle does not react to your edits at all, see the handling section of the troubleshooting guide.

Frequently asked questions

How do I increase top speed in handling.meta?
Raise fInitialDriveMaxFlatVel, which is in km/h. The game uses that value times 1.2 for gearing. If the vehicle stops accelerating before it gets there, raise fInitialDriveForce or lower fInitialDragCoeff.
What unit is fInitialDriveMaxFlatVel in?
Kilometres per hour. On load the game multiplies it by 1000/3600 to get metres per second.
How do I make a car all-wheel drive?
Set fDriveBiasFront between 0.1 and 0.9. 0.5 splits drive evenly. Below 0.1 the game treats the car as rear-wheel drive and above 0.9 as front-wheel drive.
Why does my handling.meta change nothing?
Either the handlingName does not match the handlingId in vehicles.meta, the file is not loaded with a HANDLING_FILE data_file line, or another resource defines the same handlingName. Give each add-on vehicle a unique handling name.
How do I write handling flags?
Add the hexadecimal values of the flags you want and write the sum without 0x. For example 0x10 + 0x40000 + 0x400000 is written as 440010.

Sources

Products from this guide

All guides