Difference between revisions of "Handling.dat"

From GTAMods Wiki
Jump to navigation Jump to search
m ((Wc|) m_fTractionCurveLongitudinal)
((Ms) m_fSeatOffsetDist)
 
Line 138: Line 138:
  
 
=== (Ms) m_fSeatOffsetDist ===
 
=== (Ms) m_fSeatOffsetDist ===
 +
The distance from the door to the car seat.
  
 
=== (Mv) m_nMonetaryValue ===
 
=== (Mv) m_nMonetaryValue ===

Latest revision as of 21:24, 24 February 2011

Contents

handling.dat file in GTA IV, like in previous versions of the game, controls the physics and animations of vehicles in-game. This file is found found in ..\common\data and can be edited with any text editor (after removing the read-only attribute).

Parameters

There are 37 parameters in 6 groups.

Physical Attributes

These seven values represent the vehicle's physical proportions within the game:

(A) vehicle identifier

This is used by the vehicles.ide file to identify the handling line of the vehicle.

Value: Any text string no more than 14 characters. By default, the vehicle identifier consists of uppercase letters and numbers (TURISMO, E109, etc.)

(B) fMass

This is the weight of the vehicle in kilograms. Only used when the vehicle collides with another vehicle or non-static object.

Value: 0.0 - 10000.0 and above.

(C) fDragMult

This value describes the wind resistance of a vehicle. As with other parameters, the value is a multiplier, meaning it takes what the game has calculated for wind resistance and multiplies it against this number.

Value: 0.0 - 2.0 and above. 1.0 means that the game will use what it has already calculated. 0.01 - 0.99 will reduce wind resistance; 1.01 - 1.99 will increase wind resistance.

(D) nPercentSubmerged

A percentage of vehicle height in the water before vehicle "floats". So as the vehicle falls into the water, at 85% vehicle height (seemingly the default for road vehicles) it will stop sinking to float for a moment before it sinks (boats excluded).

Value: any percentage expressed as a decimal (eg., 85% = 0.85). An invalid number will cause the vehicle to sink without the driver drowning, eventually teleporting the vehicle to the surface.

(E) CentreOfMass.x

This value shifts the center of gravity in meters from side to side (when in vehicle looking forward).

Value: < -10.0 to > 10.0. 0.0 means that the center of gravity will be in the center of the vehicle.

(F) CentreOfMass.y

This value shifts the center of gravity in meters from front to rear (when in vehicle looking forward).

Value: < -10.0 to > 10.0. 0.0 means that the center of gravity will be in the center of the vehicle.

(G) CentreOfMass.z

This value shifts the center of gravity in meters from top to bottom (when in vehicle looking forward).

Value: < -10.0 to > 10.0. 0.0 means that the center of gravity will be in the center of the vehicle. Changing this value to great negative quantities (E.G. -10 or greater) will cause the vehicle to behave erratically, moving many feet per frame.

Transmission Attributes

These values describe the vehicle's straight line performance. Rate of acceleration is determined by (Tt), (Tg), (Tf), (Ti), and (Tv). Rate of deceleration is determined by (Tb) and (Tbb). (Ts) m_fSteeringLock can be thought of as a measure of sideways acceleration.

(Tt) m_nDriveBias

This value is used to determine whether a vehicle is front, rear, or four wheel drive.

Value: 0.0 is rear wheel drive, 1.0 is front wheel drive, and any value between 0.01 and 0.99 is four wheel drive (0.5 give both front and rear axles equal force, being perfect 4WD.)

(Tg) m_nDriveGears

How many forward speeds a transmission contains.

Value: 1-16 or more.

(Tf) m_fDriveForce

This multiplier modifies the game's calculation of drive force (from the output of the transmission).

  • Drive force formula TBD
Value: 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 and values greater than 1.0 will produce more drive force. Most cars have between 0.10 and 0.25.

(Ti) m_fDriveInertia

Describes how fast an engine will rev. For example an engine with a long stroke crank and heavy flywheel will take longer to redline than an engine with a short stroke and light flywheel.

  • Drive inertia formula TBD
Value: 0.01 - 2.0. Default value is 1.0, or no modification of drive intertia.

(Tv) m_fV

The theoretical top speed of the vehicle in kilometers per hour (km/H). Setting this value does not guarantee the vehicle will reach this speed.

Value: 0.00 - 500.0 and above.

(Tb) m_fBrakeForce

Multiplies the game's calculation of deceleration.

  • Brake Force formula TBD
Value: 0.01 - 2.0 and above. 1.0 uses brake force calculation unmodified.

(Tbb) m_fBrakeBias

This controls the distribution of braking force between the front and rear axles.

Value: 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. A value between 0.01 and 0.49 means the rear axle will receive more brake force than the front and a value between .051 and 0.99 means the front axles will receive more brake force than the rear. In real life, normal vehicles usually have more front braking force than the rear (eg., 0.65).

(Thb)

This value is present in the data, but not in the comments.

(Ts) m_fSteeringLock

This value is a multiplier of the game's calculation of the angle a steer wheel will turn while at full turn. Steering lock is directly related to over or understeer / turning radius.

  • Steering lock formula TBD
Value: 0.01 - 2.0 and above. Values around 0.1 - 0.2 will simulate a long wheelbase. Whereas a value of around 0.75 and above will turn extremely fast. To high of a value here will cause the vehicle to spin out too easily.

Wheel Traction Attributes

The following attributes describe how the vehicle will behave dynamically, from negotiating corners to acceleration and deceleration. This section has been updated from previous game versions.

(Wc+) m_fTractionCurveMax

(formerly fTractionMult)

Cornering grip of the vehicle as a multiplier of the tire surface friction.

(Wc-) m_fTractionCurveMin

(formerly fTractionLoss)

Accelerating/braking grip of the vehicle as a multiplier of the tire surface friction.

(Wc-) m_fTractionCurveLateral

Shape of lateral traction curve (peak traction position in degrees).

(Wc|) m_fTractionCurveLongitudinal

Shape of longituduinal traction curve (peak traction position in degrees). This attribute is present in the comments, but not actually in the data.

(Ws+) m_fTractionSpringDeltaMax

This value denotes at what distance above the ground the car will lose traction.

(Wh) m_fTractionBias

Determines the distribution of traction from front to rear.

Value: 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 (the tires actually fail to spawn), while entering a value outside of specified range causes the car to move irrationally whenever the wheels are touching the ground.

Suspension Attributes

(Sf) m_fSuspensionForce

(Scd) m_fSuspensionCompDamp

(Srd) m_fSuspensionReboundDamp

(Su) m_fSuspensionUpperLimit

(Sl) m_fSuspensionLowerLimit

(Sr) m_fSuspensionRaise

The amount that the suspension raises the body off the wheels.

(Sb) m_fSuspensionBias

Damage Attributes

The following attributes dictate how the vehicle will react to damaging effects.

(Dc) m_fCollisionDamageMult

Multiplies the game's calculation of damage to the vehicle through collision.

Value: 0.0 - 10.0. 0.0 = no damage through collision. 10.0 = Ten times damage through collision.

(Dw) m_fWeaponDamageMult

Multiplies the game's calculation of damage to the vehicle through weapon damage.

Value: 0.0 - 10.0. 0.0 = no damage through weapons. 10.0 = Ten times damage through weapons.

(Dd) m_fDeformationDamageMult

Multiplies the game's calculation of deformation-causing damage.

Value: 0.0 - 10.0. 0.0 = no deformation through damage is possible. 10.0 = Ten times deformation-causing damage.

(De) m_fEngineDamageMult

Multiplies the game's calculation of damage to the engine, causing explosion or engine failure.

Value: 0.0 - 10.0. 0.0 = no damage to the engine. 10.0 = Ten times damage to the engine.

Miscellaneous Attributes

(Ms) m_fSeatOffsetDist

The distance from the door to the car seat.

(Mv) m_nMonetaryValue

Amount paid when sold to Stevie.

(Mmf) mFlags

(Mhf) hFlags

(Ma) m_nAnimGroup

Special Parameters

Extended Boat Data

This section contains additional boat handling attributes. Each entry is preceded by a % symbol that identifies this line as boat data for reading. Some of these attributes are the same as GTA SA.

ID

This should be the same as the main handling section ID.

BBoxFwd

BBoxBack

BBoxSide

SampleTop

SampleBottom

AqPlaneForce

AqPlaneWfMult

AqPlaneWfCap

AqPlaneWfApp

RudderF

RudderOSet

WaveAudioMult

MoveResXY

MoveResZUp

MoveResZDown

TurnResX

TurnResY

TurnResZ

Look_L_R_BehindCamHeight

Extended Bike Data

(A) ID

This should be the same as the main handling section ID.

(B) LeanFwdCOM

(C) LeanFwdForce

(D) LeanBakCOM

(E) LeanBackForce

(F) MaxLean

(G) FullAnimLean

(H) DesLean

(I) StickLean

(J) BrakeStabil

(K) InAirSteer

(L) WheelieAng

(M) StoppieAng

(N) WheelieSteer

(O) WheelieStabMult

(P) StoppieStabMult

Extended Aircraft Data

(A) ID

This should be the same as the main handling section ID.

(B) Thrust

(C) ThrustFallOff

(D) ThrustVec

(E) Yaw

(F) YawStab

(G) SideSlip

(H) Roll

(I) RollStab

(J) Pitch

(K) PitchStab

(L) FormLift

(M) AttackLift

(N) GearUpR

(O) GearDownL

(P) WindMult

(Q) MoveRes

(R) TurnRes.x

(S) TurnRes.y

(T) TurnRes.z

(U) SpeedRes.x

(V) SpeedRes.y

(W) SpeedRes.z

Animation Group Data

(A) Group ID

This identifies the line, so it can be used by the main handling section ( (Ma) m_nAnimGroup ).

(B) Enter1

(C) Enter2

(D) Jack1

(E) Jack2

(F) Drive1

(G) Drive2

(H) JumpOutTime

(I) GetInTime

(J) GetOutTime

(K) JkdOutTime

(L) FallTime

(M) OpenOutStart

(N) OpenOutStop

(O) CloseInStart

(P) CloseInStop

(Q) OpenInStart

(R) OpenInStop

(S) CloseOutStart

(T) CloseOutStop

(U) SpecialFlag