Vehicle Handling Editor
Tune CHandlingData with sliders, import an existing handling.meta, toggle flag bits, and export handling.meta, runtime Lua or a carcols.meta mod kit.
Diese Doku ist vorerst auf Englisch.
The Vehicle Handling Editor lets you tune a vehicle’s CHandlingData block with sliders and a one line explanation per field. You can start from a template or import your own handling.meta, flip handling, model and damage flag bits, and export a clean handling.meta, a runtime Lua script for live testing, or a carcols.meta mod kit for add-on cars.
What it is for
Handling work is a loop: change a value, restart the resource, respawn the car, drive, repeat. The editor shortens that loop. You see every field with its unit and meaning, you see what you changed against the loaded values, and you can copy a Lua snippet that applies the new values to the car you are sitting in without a restart. When the car feels right, you download the final handling.meta.
It is also the quickest way to give an add-on car a mod kit, so it can take engine, brake, gearbox, suspension and armour upgrades.
Quick start
- Pick a template under Start from template, or click Import handling.meta and paste the file (or use Open file), then Parse.
- Set handlingName so it matches
<handlingId>in the car’svehicles.meta. - On the Physics tab, tune the values. A field you changed gets an amber dot and a Reset link that puts that one field back.
- Switch to Flags for handling, model and damage flags, and to Mod kit if the car needs a
carcols.metakit. - Watch the Driving profile tiles on the right to see what the change does to top speed, drivetrain and grip.
- Pick an output tab (handling.meta, Lua or carcols.meta), then copy or download it.
Undo N changes in the top bar puts every field back to the loaded template or import. Your work is saved in this browser.
Templates
The templates are generic, hand-tuned starting points, not copies of base game cars.
| Template | Drive | Notes |
|---|---|---|
| Sports car (RWD) | RWD | 1400 kg, 6 gears, drive force 0.30, flat vel 150 |
| Supercar (AWD) | AWD 30/70 | 1500 kg, 7 gears, drive force 0.36, flat vel 160, more grip |
| Compact (FWD) | FWD | 1100 kg, 5 gears, drive force 0.20, softer brakes and grip, AI AVERAGE |
| Sedan (RWD) | RWD | 1600 kg, 5 gears, soft suspension, AI AVERAGE |
| Muscle (RWD) | RWD | 1600 kg, drive force 0.32, extra wheelspin at launch, weak brakes |
| Off-road SUV (AWD) | AWD 50/50 | 2200 kg, long suspension travel, low off-road grip loss, off-road handling flag |
| Drift setup (RWD) | RWD | Sports car base with 55 degree steering lock, lower grip, stronger handbrake |
Loading a template keeps your current handlingName.
Importing a handling.meta
Paste a whole handling.meta or a single <Item type="CHandlingData"> block. If the file holds several vehicles, the editor lists them as chips (“N vehicles found, pick one”) and you choose which one to load. Fields the editor does not have sliders for (for example fDownforceModifier) and the SubHandlingData block are kept and written back on export, so bikes, boats and planes keep their CBikeHandlingData, CBoatHandlingData or CFlyingHandlingData item untouched.
If you want to start from a real game vehicle, copy its <Item type="CHandlingData"> block from the game’s handling.meta and import that.
Fields
The Physics tab has section chips (All, Body & mass, Engine & gearbox, Brakes & steering, Traction, Suspension, Damage & fluids, Seat, value & AI). Each field has a slider and a number box. The number box accepts values outside the slider range, which matters for imports that go past it.
Body and mass
| Field | What it does | Slider range |
|---|---|---|
fMass |
Weight in kg. Affects collisions and how much force is needed to move the car. | 50 to 30000 |
fInitialDragCoeff |
Air drag. Higher lowers the real top speed and slows the car when coasting. | 0 to 50 |
fPercentSubmerged |
How far it sinks in water before it floats, percent of height. | 0 to 100 |
vecCentreOfMassOffset |
x = right, y = forward, z = up, in metres. Negative z makes it harder to roll. | -2 to 2 per axis |
vecInertiaMultiplier |
Rotational inertia per axis. Higher is slower to pitch, roll or yaw. | 0 to 5 per axis |
Engine and gearbox
| Field | What it does | Slider range |
|---|---|---|
fDriveBiasFront |
0.0 is RWD, 1.0 is FWD, anything between is AWD with that share at the front. | 0 to 1 |
nInitialDriveGears |
Number of forward gears. | 1 to 10 |
fInitialDriveForce |
Engine power at the wheels. The main acceleration value. | 0.01 to 2 |
fDriveInertia |
How fast the engine revs up. | 0.01 to 2 |
fClutchChangeRateScaleUpShift |
Up-shift speed. Higher shifts faster. | 0.1 to 15 |
fClutchChangeRateScaleDownShift |
Down-shift speed. | 0.1 to 15 |
fInitialDriveMaxFlatVel |
Gearing top speed on flat ground, roughly km/h. Drag decides the real top speed. | 0 to 500 |
Brakes and steering
| Field | What it does | Slider range |
|---|---|---|
fBrakeForce |
Brake strength. Around 1.0 is a strong sports car brake. | 0.01 to 5 |
fBrakeBiasFront |
Share of brake force on the front axle. 0.5 is even. | 0 to 1 |
fHandBrakeForce |
Handbrake strength. Higher locks the rear quicker. | 0 to 5 |
fSteeringLock |
Maximum steering angle in degrees. | 1 to 90 |
Traction
| Field | What it does | Slider range |
|---|---|---|
fTractionCurveMax |
Peak cornering grip. The main grip value. | 0 to 5 |
fTractionCurveMin |
Grip when sliding. Lower than max makes the car easier to break loose. | 0 to 5 |
fTractionCurveLateral |
Slip angle in degrees where peak grip is reached. | 0 to 45 |
fTractionSpringDeltaMax |
How far the tyre can flex before it loses grip, in metres. | 0 to 1 |
fLowSpeedTractionLossMult |
Wheelspin at launch. 0 is none. | 0 to 3 |
fCamberStiffnesss |
Grip from body roll when cornering, usually 0. | -1 to 1 |
fTractionBiasFront |
Grip distribution. Below 0.5 gives the rear more grip. | 0 to 1 |
fTractionLossMult |
Grip loss on dirt and grass. Lower keeps road grip off-road. | 0 to 3 |
Suspension
| Field | What it does | Slider range |
|---|---|---|
fSuspensionForce |
Spring stiffness. | 0 to 10 |
fSuspensionCompDamp |
Damping when the spring compresses. | 0 to 5 |
fSuspensionReboundDamp |
Damping when the spring extends. | 0 to 5 |
fSuspensionUpperLimit |
How far the wheel moves up from rest, metres. | -0.5 to 0.5 |
fSuspensionLowerLimit |
How far the wheel drops from rest, negative values. | -0.5 to 0.5 |
fSuspensionRaise |
Ride height offset. Negative lowers the car. | -0.3 to 0.3 |
fSuspensionBiasFront |
Spring force distribution. Above 0.5 is stiffer at the front. | 0 to 1 |
fAntiRollBarForce |
Anti-roll bar strength. Higher reduces body roll. | 0 to 3 |
fAntiRollBarBiasFront |
Anti-roll bar distribution. | 0 to 1 |
fRollCentreHeightFront / fRollCentreHeightRear |
Roll centre heights. Higher reduces roll but can tip the car. | -0.5 to 1 |
Damage and fluids
| Field | What it does | Slider range |
|---|---|---|
fCollisionDamageMult |
Damage from collisions. | 0 to 5 |
fWeaponDamageMult |
Damage from weapons. | 0 to 5 |
fDeformationDamageMult |
Visual body deformation. 0 keeps the body straight. | 0 to 5 |
fEngineDamageMult |
Engine damage from hits. | 0 to 5 |
fPetrolTankVolume |
Tank size in litres. Fuel scripts often read it. | 0 to 200 |
fOilVolume |
Oil volume. Affects how long the engine smokes before it dies. | 0 to 20 |
Seat, value and AI
fSeatOffsetDistX, fSeatOffsetDistY and fSeatOffsetDistZ move the driver seat position (-1 to 1 m). nMonetaryValue is the base value used for things like insurance and sell price. AIHandling picks how AI drivers handle the car: AVERAGE, SPORTS_CAR, TRUCK or CRAP (an imported value that is not in this list is kept as an extra option).
Flags
The Flags tab has three panels: Handling flags (strHandlingFlags), Model flags (strModelFlags) and Damage flags (strDamageFlags). Click a bit to toggle it, or type the hex value in the box at the top right of the panel. Each bit shows its name, a short description and its hex mask.
Some common ones:
| Flag | Mask | What it does |
|---|---|---|
HF_HAS_RALLY_TYRES |
0x8 |
Better grip on loose surfaces |
HF_NO_HANDBRAKE |
0x10 |
Handbrake disabled |
HF_CVT |
0x1000 |
No gear shifts |
HF_OFFROAD_ABILITIES |
0x100000 |
Better off-road grip |
HF_FORCE_NO_TC_OR_SC |
0x2000000 |
Disables traction and stability control |
MF_ABS_STD |
0x10 |
ABS fitted as standard |
MF_NO_WHEEL_BURST |
0x2000000 |
Bulletproof tyres |
DF_BONNET |
0x10 |
Bonnet cannot break off |
Model flag changes usually need the vehicle to be respawned.
Mod kit
The Mod kit tab builds a carcols.meta with one kit. An add-on vehicle needs a kit before it can take performance upgrades or show up properly in tuning menus.
| Option | What it does | Default |
|---|---|---|
| Kit id | Must be unique across every vehicle on the server. | 1450 |
| Kit type | MKT_STANDARD, MKT_SPECIAL, MKT_SPORT or MKT_SUV |
MKT_STANDARD |
| Kit name | Empty uses <id>_<handlingname>_modkit, for example 1450_mycar_modkit. |
Empty |
| Stat mods | A toggle per upgrade with comma separated modifier values, one per level. | Engine 25, 50, 75, 100, Brakes 25, 50, 100, Transmission 25, 50, 100, Suspension 25, 50, 75, 100, Armour 20, 40, 60, 80, 100 |
Picking the Mod kit tab switches the output to carcols.meta.
Driving profile
The tiles on the right are estimates from the current values:
| Tile | What it shows |
|---|---|
| Top speed (est.) | Gearing limit from fInitialDriveMaxFlatVel, in km/h and mph. Drag and power decide where the car really tops out. |
| Drivetrain | RWD, FWD or AWD with the front/rear split, plus the gear count. |
| Force per tonne | Drive force relative to mass, for comparing cars. |
| Weight | Mass and drag. |
| Brake bias | Front brake share and brake force. |
| Grip | Max and min traction, plus the front grip bias. |
Output
handling.meta
The handling.meta tab gives a complete file with one item. Floats are written with six decimals and flags as hex without 0x. If the loaded handling had no SubHandlingData, three NULL items are added.
<?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" />
<!-- ...every other field in the same style... -->
<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>Load it in a resource like this:
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.
Lua
The Lua tab writes a client script that applies the values with SetVehicleHandlingFloat, SetVehicleHandlingInt and SetVehicleHandlingVector on the 'CHandlingData' class, then calls ModifyVehicleTopSpeed(vehicle, 1.0) so drive force and top speed changes apply right away.
| Option | What it does |
|---|---|
| Command / Function | Command adds a RegisterCommand that applies the handling to the vehicle you sit in. The box next to it sets the command name (default handling). Function returns just the ApplyHandling(vehicle) function. |
| Only changed fields | Emit natives only for values that differ from the loaded template or import. |
With Only changed fields on and two values changed:
-- Runtime handling for MYCAR (client side).
-- Values use handling.meta units: FiveM converts km/h, degrees and bias values itself.
-- Changes apply to this vehicle only and are lost when it is deleted or respawned.
local function ApplyHandling(vehicle)
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveForce', 0.35)
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveMaxFlatVel', 165.0)
-- Commonly needed so drive force and top speed changes take effect right away.
ModifyVehicleTopSpeed(vehicle, 1.0)
end
RegisterCommand('handling', function()
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if vehicle == 0 then
print('You need to be in a vehicle')
return
end
ApplyHandling(vehicle)
print('Applied MYCAR handling')
end, false)Run it on the client that owns the vehicle. You pass the same numbers you would write in handling.meta, FiveM converts them to the game’s internal units. Floats always carry a decimal point (165.0, not 165). The Lua output does not include AIHandling.
carcols.meta
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfoVarGlobal>
<Kits>
<Item>
<kitName>1450_mycar_modkit</kitName>
<id value="1450" />
<kitType>MKT_STANDARD</kitType>
<visibleMods />
<linkMods />
<statMods>
<Item>
<identifier />
<modifier value="25" />
<audioApply value="1.000000" />
<weight value="20" />
<type>VMT_ENGINE</type>
</Item>
<!-- one Item per level and upgrade -->
</statMods>
<slotNames />
<liveryNames />
</Item>
</Kits>
<Lights />
</CVehicleModelInfoVarGlobal>Then reference the kit in the car’s vehicles.meta item and register the file:
<kits>
<Item>1450_mycar_modkit</Item>
</kits>data_file 'CARCOLS_FILE' 'data/carcols.meta'Common mistakes
- handlingName does not match. The value must equal
<handlingId>invehicles.meta, or the car keeps its old handling. - Fixing the spelling of
fCamberStiffnesss. It really has three s’s. Spelling it “correctly” means the game ignores it. - Testing on a car that was already spawned. Respawn after restarting the resource.
- Flags with
0x. In handling.meta flags are hex without a prefix, for example<strModelFlags>440010</strModelFlags>. - Duplicate mod kit ids. Two cars with the same kit id make tuning menus show the wrong parts.
- Shipping only the Lua. Runtime changes only affect that one vehicle and are gone when it is deleted. Ship the final values in handling.meta.
Tip
Tune with the Lua command first: sit in the car, change a slider, copy the Lua, run it, drive. When it feels right, download handling.meta once.
Limitations
The editor has sliders for 45 common CHandlingData fields plus the three flag sets and AIHandling. Other fields from an import are kept as they are but cannot be edited here. The driving profile numbers are estimates, not a physics simulation. Everything runs in your browser and nothing is uploaded.
