| This page is unfinished and is being worked on
As someone else may be editing at the same time, watch out for conflicting edits. Also check the History and Talk Page.
The following article explains how the Grand Theft Auto IV handling.dat file works and how other in-game factors relate to it. The handling.dat in GTA IV encompasses not just handling, but power and other performance information.
Overview: GTA vs Real-Life
The way cars handle in GTA IV is based on a series of algorithms and equations rather than physics simulation. This is most likely due to the fact that a physics simulation would be too much for most computers to handle, especially with the amount of cars working at one time. In addition, fine-tuning handling and performance would be very difficult for both game developers and third-party modders.
The resulting handling feigns realism, but isn't realistic. With proper fine tuning, the handling in GTA IV can be made more realistic than its default state. Cars on the default handling are slower, have softer suspensions, and are more prone to understeer than their real-life counterparts (and don't properly emulate things like drive wheels and weight distribution).
If one wishes to make cars faster and more back-heavy to emulate realistic conditions, one thing that must be accounted for is that the car's default speeds are scaled down to match the city. Because of the sized-down nature of Liberty City, driving at a speed similar to real life will seem much faster in-game. In addition, the curves, inclines, and other road features don't emulate real-life dimensions, and can cause odd results when driving a realistically tuned car.
Another factor is damage - vehicles in-game are much more resistant to damage than anything in real life. While it seems like the natural course of action, scaling down a vehicle's resistance to damage doesn't always help realism. Scaling down damage too much causes for strange model deformation when crashing (as the crash deformation built into the game is designed to work with the ideal default settings). The game uses a rigid-body physics engine (as soft-body physics engines aren't optimized enough for most computers to run) and as a result, crashes can never really be simulated perfectly.
Most of a car's handling ability is determined by its values in the handling.dat, although there are some things that are controlled by the car's model (wheelbase, suspension, etc). See Car Model. The handling.dat is rather complicated and poorly organized, therefore it is suggested that the modder use a third-party program such as GTA IV Handling Editor. The download link has been removed due to spam detection.
Each value is catagorized based on its effects. It is shown with its label in the handling.dat, its proper name, and a brief description of what it does.
These are miscellaneous values that don't fit into another category. Things such as drown level, center of mass, and weight are defined here.
|A||Vehicle Label||A label used by the game to identify the vehicle. Edit with caution, bad edits can have severe effects.|
|B||Mass||Mass/Weight of the vehicle, rather self explanatory. Mass affects handling, speed, and most other behaviors. Vehicles with a large amount of mass are harder to get up to speed, but carry more momentum when ramming through traffic. This momentum also affects turning, making it more difficult to change the vehicle's direction. More massive vehicles put more weight on the suspension, causing bottom-outs to happen more often. The mass of the car does not follow real physics (Force = mass * acceleration)||Kg|
|C||Drag Multiplier||How aerodynamically efficient a car is (how much drag it produces). Higher numbers mean higher drag, and less aerodynamic efficiency. Aerodynamic efficiency affects how well a car gets up to its top speed, and causes the vehicle's actual top speed to be lower than the one specified in the handling.dat|
|D||Percent Submerged||How much the car needs to be submerged in water for the engine to cut out. Cars will also float at this height if suddenly plunged into water and rendered inoperable. (Drown Level)||%|
|E||Center of Mass (X)||The X (front-back) coordinate of the vehicle's center of mass, relative to the center of the car. Can be positive or negative.||m|
|F||Center of Mass (Y)||The Y (left-right) coordinate of the vehicle's center of mass, relative to the center of the car. Can be positive or negative.||m|
|G||Center of Mass (Z)||The Z (up-down) coordinate of the vehicle's center of mass, relative to the center of the car. Can be positive or negative.||m|
|Ts||Steering Lock||How far the wheels can turn to either side when stopped (aka steering lock). Slight adjustments in the steering lock can change the sensitivity of the steering and help fine tune handling. Setting this to a value about 0.9 (90o) can make a vehicle unstable, most vehicles will have a steering lock of about 0.5 (50o)||o|
|Ms||Seat Offset Distance||The distance (X+) from the vehicle's center which the player must be at to enter the vehicle.||m|
|Mv||Monetary Value||How much the vehicle is worth.||$|
|Mmf||Model Flags||See: model flags|
|Mhf||Handling Flags||See: handling flags|
|Ma||Animation Group||What animations group the vehicle uses. Edit with caution, bad edits can have severe effects.|
These are values related to the vehicle's engine, transmission, and drive train. Things like net power, gears, and drive wheels are defined here.
|Tt||Drive Bias||Defines how power is distributed between the wheels. This is a 0-1 value, 0.0 being 100% RWD (0/100) and 1.0 being 100% FWD (100/0). Anything between 1 or 0 is AWD (most real configurations use 0.6 (60/40) or 0.5 (50/50) distribution).||0-1|
|Tg||Drive Gears||How many gears the vehicle has. Unlike in previous games, the number of gears does affect how a car accelerates in GTA IV. The gear ratios are set by the game automatically, and are based upon how many gears there are (this value) and the top speed (see more on that below). Too few gears will cause the vehicle to accelerate slowly because of the low RPM's each gear starts at. Too many will cause loss of speed at higher speeds when the driver is constantly shifting. How many gears a vehicle has depends mostly on what kind of vehicle (sportscars can have 5-7, standard sedans usually have 4, some big rigs have more than 10, etc).|
|Tf||Drive Force||How much torque/power the engine puts out (thought not based on any sort of real-life measurement system). Naturally, more power means the car accelerates faster. More power also puts more pressure on the drive wheels, which affects launch speeds and handling. A vehicle with more power is more likely to spin it's drive wheels when the gas is applied, which can dramatically lower grip levels if the wheels spin unabated.|
|Ti||Drive Inertia||This value is not the actual drivetrain inertia value. Instead, the lowest set inertia value is 1.0, and anything below that greatly increases the inertia. Low drivetrain inertia allows for faster gear changes, and thus setting this value to 1.0 creates the quickest possible gear changes (though physically the gear changes could be faster, the value is still capped at 1.0). Slightly lower values greatly increase shift times, and are good for emulating the transmissions of large trucks and beater cars.||0-1|
|Tv||Max Velocity||This is the maximum velocity of the vehicle's transmission. This determines the length of the gears, which (along with number of gears and drive force) affects how fast the vehicle accelerates. The actual top speed is lower, and is affected by mass and drag.||km/h|
These values are related to the suspension of the vehicle. These can affect ride height, suspension travel, ride quality, and most other suspension-related variables.
Suspension tuning requires some basic knowledge of how a springs and shocks work (Hooke's Law and Spring Damping). Without knowing the basics of springs and shocks, suspension tuning is entirely guess-and-check. With proper knowledge, suspensions alone can be set up correctly after a few trials. Properly integrating them the game's complicated traction system makes the task much more difficult.
|Sf||Suspension Force||What this value does is somewhat unclear. It does have a visible affect on the suspension. Increasing the value makes the springs stiffer, and reducing it to 0 takes all stiffness out of the springs altogether. One conclusion is that this value may be some sort of a spring constant. In which case, the distance of the springs from their equilibrium (x) times this value (k) is how much force to apply to the springs and in what direction (before damping is taken into consideration). In such a case, this value would not be in N/m as 'k' normally would be.|
|Sb||Suspension Bias||How much to distribute suspension force between the front and the back. Setting this to 1.0 (100/0) gives all the force to the front suspension, whereas setting it to 0.0 (0/100) does the opposite. It's best to have this value close to 0.5 (50/50). This is helpful if you have the center of mass offset to the front or back and the suspension is sagging in one direction as a result.||0-1|
|Scd||Suspension Compression Damping||Damping during suspension compression (wheels moving up relative to the vehicle). In layman's terms, how much the suspension resists being quickly compressed. Higher (stiffer) values of compression damping makes the car nimble and responsive during cornering, but it also means the car will be jolted about on bumpy surfaces. Lower (relaxed) values allow the suspension to absorb bumps, but the relaxed compression makes the car "roll" in turns (which causes steering delay and increases the likeliness of a car to roll over).|
|Srd||Suspension Rebound Damping||Damping during suspension rebound (wheels moving down relative to the vehicle). In layman's terms, how much the suspension resists being quickly rebounded or decompressed. Higher (stiffer) values of rebound damping prevents the vehicle body from erratically moving back to place and keeps it stable in the corners, however over rough surfaces the suspension cannot react fast enough to conform to the shape of the surface. Lower (relaxed) values will cause the vehicle body to move more erratically during hard cornering, but it will also allow for the suspension to react fast enough to remain stable over potholes and dips.|
|Su||Suspension Upper Limit||How far the suspension can travel upward (Z value) relative to its equilibrium (where Z=0). The wheels are not allowed to move above this value. This is the point at which a car "bottoms out" and the wheels go as high as they can on the suspension. It's important to set this value correctly so that the wheels don't get pushed through he fenders during hard compression.||m|
|Sl||Suspension Lower Limit||How far the suspension can travel downward (Z value) relative to its equilibrium (where Z=0). The wheels are not allowed to move below this value. This value determines how much the suspension will "hang" when the vehicle goes airborne. This value should be proportionate to the upper limit so that the vehicle's suspension has a proper travel. This value must be negative, otherwise the lower limit will be upward.||m|
|Sr||Suspension Raise||How much the car body is raised/lowered relative to the suspension. Setting a value (positive or negative) for this will move the body of the vehicle (and the center of mass with it) up or down on the suspension. It's usually best to use this value for small tweaks only, as the suspensions are already well centered by default.||m|
These values are related to the tires and brakes on the vehicle. These affect stopping distance, cornering, and traction in general.
Braking-related values are rather self-explanatory, with only a few variables controlling their behavior.
Traction, on the other hand is much more complicated. GTA IV's traction system function is based only partly on actual physics. The system outputs how much traction each wheel gets based on conditions (speed, angle, surface) and set of multipliers each vehicle has in the handling.dat file. Because of this, the traction system is rather confusing and how it works is still not fully understood.
Balancing the multipliers is pivotal to making a specific vehicle handle a certain way. Due to its complexities and the lack of knowledge regarding how it works, adjusting these multipliers is a task that requires a considerable amount of play testing.
|Wc-||Traction Curve Min||The minimum value of the traction function. Increasing this increases the base value of traction a car has. Adjusting this value can help increase/decrease the overall grip of a car. When trying to be realistic, this value should be somewhat low. A high value might seem good for a maneuverable sportscar with low profile tires, but it will also cause the vehicle to grip unrealistically well off-road. Most modders do this anyway, as its much quicker and not nearly as difficult to create a responsive vehicle with the Curve Min as opposed to using the Curve Max and Curve Lateral.|
|Wc+||Traction Curve Max||The maximum value of the traction function. Increasing this increases the rate at which traction builds up. This is the peak traction value used when the tire is in ideal conditions. Setting a relatively low Curve Max and a relatively high Curve Min creates a vehicle that is very grippy relative to other cars at low speeds, but not very grippy relative to other cars at high speeds. This is good for creating offoraders, whereas a sportscar would have a lower Curve Min and much higher Curve Max. Getting the ideal balance between the two is very difficult, and many times it's nearly impossible to produce 100% realistic results.|
|Wc-||Traction Curve Lateral||The angle at which the tires produce the most grip. The value is a angle / 10 (1.0 is 10o, 0.9 is 9o, 1.2 is 12o, etc). A Curve Lateral set to 0.0 means the tires will produce the most grip when they are parallel with the direction they are moving, and 9.0 means the tires produce the most grip when they are perpendicular to the direction they are moving. When trying to be realistic, this value ought to be somewhere close to parallel (roughly 0.9). Setting it lower will make a vehicle enter corners very briskly, but then begin to understeer as the corner progresses. Setting it higher will do the opposite. This value has the same label as Curve Min in the handling.dat text and is placed right next to it. Curve Min is on the left, whereas Curve Lateral is on the right.|
|Wcl||Traction Curve Longitudinal||This value appears to be deprecated. It was most likely replaced by either a constant, or was integrated into the three main multipliers.|
|Ws+||Traction Spring Delta Max||This value defines how much the actual spring can move the tires downwards when jumping. Setting this value over 1 makes the car-springs pushing down the tires untill they touch each other.||0-1|
|Wh||Traction Bias||How the traction is distributed between the front and back. Setting it to 0.99 gives all the traction to the front tires, whereas setting it to 0.01 gives the traction to the rear wheels. More traction in the front creates oversteer, while more in the back creates understeer. Unlike most 0-1 values, this cannot be set outside the bounds of 0.01-0.99, otherwise the wheels of the side with no grip will disappear.||0-1|
|Tb||Brake Force||How much resistance the brakes create when fully depressed. What to set this value to depends on vehicle mass, potential speeds, and tire traction. If the brake force is too high, it can cause the tires to lock up and skid. This greatly increases stopping distance. Higher momentum (mass and velocity) and lower tire grip decrease the brake force required to lock up the vehicle's tires. One way to prevent lockup without sacrificing braking power is to turn on anti-lock brakes (ABS) in the handling flags.|
|Tbb||Brake Bias||How braking power is distributed between the front and back wheels. A value of 1.0 gives all braking power to the front wheels, whereas a value of 0.0 gives all the power to the back. Having brake power biased to the front helps when braking hard and entering corners, as it counters the understeer braking causes. Braking power biased to the rear makes a vehicle more stable when braking and helps it to stop in strait lines. Most cars use values within the range of 0.6-0.7.||0-1|
|Thb||Handbrake Force||How much resistance the rear brakes create when the handbrake is applied. The handbrake is used to get a vehicle around a tight turn by sliding the rear end. It is important that this value is high enough for the rear wheels to lock up when the handbrake is applied. This varies between vehicles though, as some slow vehicles with a lot of traction may not lock their rear brakes up.|
These values are related to the damage resistance of the vehicle. These affect deformation resistance, engine integrity, and damage resistance.
|Dc||Collision Damage Multiplier||How much to multiply collision-related damage by. Vehicles with a lower value can take more hits without breaking down, whereas vehicles with higher values are more prone to crash-related damage. Setting this value to 0.0 disables all collision-related damage, but not deformation as a result of it.|
|Dw||Weapon Damage Multiplier||How much to multiply weapon-related damage by. Vehicles with a lower value can be shot more often, and provide better protection in a firefight. Setting this value to 0.0 disables all weapon-related damage.|
|Dd||Deformation Damage Multiplier||How much to multiply deformation by. Vehicles with a lower value will bend and dent less than vehicles with a higher value. Collisions to a vehicle's quarter-panel areas can damage the suspension and affect handling. Setting this value to 0.0 disables all deformation, but not damage as the result of collisions or weapons. Tires can also be popped with deformation disabled.|
|De||Engine Damage Multiplier||How much to multiply engine damage by, on top of other multipliers. Bullet impacts and collisions near the engine bay cause engine damage. Most vehicles are front-engined, so this value greatly affects their ability as ramming implements. Mid engined cars such as the Turismo are exempt from this rule, as the front end collisions don't reach their engine bays. Setting this value to 0.0 disables all engine damage, however with collision and weapon damage disabled, it is not necessary.|
Model flags are several on/off flags that are determined by an 8-bit number for each vehicle (some examples are 00440800, 80220804, and 80440800). The table below numbers digits in the order they appear from left to right. The game, however, reads values backwards (from right to left). This means that values beginning in 0's can have their beginning zeros culled (for example, 00440080 becomes 440080). Each digit has 4 flags. A value of 1, 2, 4, or 8 determines which flag is enabled, while a value of 0 indicates that no flag for the digit has been enabled. The table below shows how certain numbers in certain digits check off certain flags.
|Value||1st Digit||2nd Digit||3rd Digit||4th Digit||5th Digit||6th Digit||7th Digit||8th Digit|
The table below explains what the values for each digit does. Any flag with an asterisk (*) next to it's name is deprecated. This means it has no observable effects and isn't used by any vehicles in the game.
|1||General vehicle body flags. These flags all appear to be deprecated and unused.|
|1||BOUNCE_PANELS*||Deprecated. This value may have been used in earlier versions of the game to create a bouncing effect on impacts (for vehicles like the dinghy).|
|2||DOUBLE_RWHEELS*||Deprecated. This value may have been used in earlier versions of the game to create independent skid marks for vehicles with doubled-up rear tires (typical on large trucks and buses). This is now determined in the vehicle model.|
|3||FORCE_GROUND_CLEARANCE*||What this flag does is unclear, thought it also appears to be deprecated. This flag is enabled on two cars (the Buccaneer and the Comet) as well as the Cable Car and Subway. It may be used to prevent a vehicle from bottoming out, though removing it from the soft-sprung Buccaneer doesn't produce any observable results.|
|4||IS_HATCHBACK*||Deprecated. This flag may been used to change how the trunk on hatchback vehicles opened.|
|2||General vehicle identifier flags.|
|1||IS_BIKE*||Deprecated. This flag may have been used for changing handling or spawning behavior for bikes.|
|2||IS_HELI||Used for helicopters. Enabling this flag on a car causes it's engine to not work, though the car can still be driven if pushed.|
(table is under construction)