vehicle#

Defines a vehicle.

Hierarchy#

Valid Parent Blocks:

Possible Child Blocks:

ID Properties#

This block should have an ID.

Parameters#

animalTrailerSize#

Type:

float

Sets the maximum total encumbrance from animals in the animal trailer. The horsebox and livestock trailers both use 500.

brakingForce#

Type:

Any

No description

carMechanicsOverlay#

Type:

string

No description

carModelName#

Type:

string

Set the translation key for the car name. The translation entry needs to be stored inside the IG_UI translation file and have IGUI_VehicleName as a prefix.

For example:

carModelName = YourCar,

With the translation entry inside IG_UI.json:

{
  "IGUI_VehicleNameYourCar": "Your car model"
}

centerOfMassOffset#

Type:

Any

No description

engineForce#

Type:

float

Default:

3000

engineForce is 10x what is displayed in the mechanics menu for horsepower.

engineIdleSpeed#

Type:

float

Default:

750.0

No description

engineLoudness#

Type:

integer

Default:

100

No description

engineQuality#

Type:

integer

Default:

100

No description

engineRepairLevel#

Type:

integer

Required mechanics skill level for repearing the vehicle’s engine.

engineRPMType#

Type:

string

Default:

jeep

Sets the engine to a RPM type (See vehicleEngineRPM block).

extents#

Type:

array (array of float, separator: ‘ ‘)

No description

extentsOffset#

Type:

array (array of float, separator: ‘ ‘)

No description

forcedColor#

Type:

array (array of float, separator: ‘ ‘)

Default:

-1 -1 -1

Sets a forced HSV color on the vehicle. The value needs to be of format hue sat val.

frontEndDurability#

Type:

integer

Default:

100

It is unclear what that parameter does but as of 42.16.3, the game uses frontEndHealth which is a mistake.

frontEndHealth#

Type:

Any

No description

Warning

Deprecated

Use frontEndDurability instead.

While that parameter is present in vanilla scripts as of 42.16.3, it actually does nothing because it is not parsed as frontEndHealth but as frontEndDurability.

gearRatio1#

Type:

float

Default:

6.44

See gearRatioCount for more details.

gearRatio2#

Type:

Any

Default:

4.1

See gearRatioCount for more details.

gearRatio3#

Type:

Any

Default:

2.29

See gearRatioCount for more details.

gearRatio4#

Type:

Any

Default:

1.47

See gearRatioCount for more details.

gearRatio5#

Type:

Any

Default:

1.0

See gearRatioCount for more details.

gearRatio6#

Type:

Any

See gearRatioCount for more details.

gearRatio7#

Type:

Any

See gearRatioCount for more details.

gearRatio8#

Type:

Any

See gearRatioCount for more details.

gearRatioCount#

Type:

integer

Default:

4

gearRatioCount will set the number of gear ratios the car can have. The vanilla cars use 4, while sport cars use 5.

A maximum of 9 ratios can be set with the parameters:

Those ratios take floats

gearRatioR#

Type:

float

Default:

7.09

See gearRatioCount for more details.

hasLighter#

Type:

boolean

Default:

True

Sets whenever this car has a lighter to light a cigarette.

hasSiren#

Type:

boolean

Attributes:

Useless

No description

isSmallVehicle#

Type:

boolean

Default:

True

No description

mass#

Type:

float

Default:

800

Sets the mass of the vehicle which will notably be used for various physic calculations.

By default is equal to 800. As a reference, a car has a mass of around 800, pickup trucks have around 1100, a simple trailer around 200, a burnt vehicle 400 or 500. See the game scripts for more examples. Values in excess of 1400 can cause vehicle wheels to start sinking into the ground and be unable to move.

maxSpeed#

Type:

float

Default:

20.0

No description

maxSpeedReverse#

Type:

float

Default:

40.0

No description

maxSuspensionTravelCm#

Type:

float

Default:

500.0

No description

mechanicType#

Type:

integer

Defines what class the vehicle is, that is 1 for standard, 2 for heavy-duty and 3 for performance.

Allowed values:

  • 1

  • 2

  • 3

neverSpawnKey#

Type:

boolean

Sets whenever this vehicle will never have a key spawning in buildings or on zombies spawning around the vehicle.

notKillCrops#

Type:

boolean

Sets whenever the vehicle will destroy crops it is driving on.

offRoadEfficiency#

Type:

float

Default:

1.0

Affects horsepower reduction when offroad (Higher = less horsepower reduction when offroad.)

physicsChassisShape#

Type:

array (array of float, separator: ‘ ‘)

Defines the hitbox of the vehicle. The value should be three numbers defining the dimensions of a box:

physicsChassisShape = height width length,

For example:

physicsChassisShape = height width length,

When setting useChassisPhysicsCollision to false, it will instead use physics for the hitbox of the vehicle.

playerDamageProtection#

Type:

float

Multiplier applied to the amount of damage the player takes when crashing in the car. A value of 1 doesn’t change the damage, but a lower value reduces it and a higher value increases it.

rearEndDurability#

Type:

integer

Default:

100

It is unclear what that parameter does but as of 42.16.3, the game uses rearEndHealth which is a mistake.

rearEndHealth#

Type:

Any

No description

Warning

Deprecated

Use rearEndDurability instead.

While that parameter is present in vanilla scripts as of 42.16.3, it actually does nothing because it is not parsed as rearEndHealth but as rearEndDurability.

rollInfluence#

Type:

float

Default:

0.1

No description

seats#

Type:

integer

Default:

2

Sets the number of seats this vehicle can have. A seat part needs to be created which will hold a container block with a parameter seat

shadowExtents#

Type:

array (array of float, separator: ‘ ‘)

No description

shadowOffset#

Type:

array (array of float, separator: ‘ ‘)

No description

specialKeyRing#

Type:

array (array of string, separator: ‘;’)

specialKeyRing needs to reference a keyring item to spawn. specialKeyRingChance is used to set the chance to spawn this keyring.

specialKeyRingChance#

Type:

integer

See specialKeyRing for more details.

specialLootChance#

Type:

integer

Default:

8

No description

steeringClamp#

Type:

float

Default:

0.4

Maximum angle you can turn the front wheels left/right

steeringIncrement#

Type:

float

Default:

0.04

No description

stoppingMovementForce#

Type:

float

Default:

1.0

A drag factor applied to the vehicle at all times

storageCapacity#

Type:

integer

Default:

100

Attributes:

Useless

No description

suspensionCompression#

Type:

float

Default:

4.4

No description

suspensionDamping#

Type:

float

Default:

2.3

No description

suspensionRestLength#

Type:

float

Default:

0.6

No description

suspensionStiffness#

Type:

float

Default:

20.0

No description

template#

Type:

Any

Attributes:

Can be duplicated

Uses a template script data for this vehicle.

template!#

Type:

Any

Attributes:

Can be duplicated

No description

textureDamage1Overlay#

Type:

string

No description

textureDamage1Shell#

Type:

string

No description

textureDamage2Overlay#

Type:

string

No description

textureDamage2Shell#

Type:

string

No description

textureLights#

Type:

string

No description

textureMask#

Type:

string

No description

textureMaskEnable#

Type:

boolean

Attributes:

Useless

No description

textureRust#

Type:

string

No description

textureShadow#

Type:

string

No description

useChassisPhysicsCollision#

Type:

boolean

Default:

True

By default true which makes the vehicle use the physicsChassisShape for its hitbox. If set to false, it will instead use the physics blocks as the hitbox of the vehicle.

wheelFriction#

Type:

float

Default:

800.0

It is 1.2 to 1.9 for all vanilla vehicles and controls turning and stopping (but not acceleration) tire friction limits, with 1.4 being the most common. Values over 1.8 can cause vehicles to flip in sharp turns. (Likely depends somewhat on center of mass)

zombieType#

Type:

array (array of string, separator: ‘;’)

Used to chose what zombie may spawn around the vehicle and is likely to have the key of the vehicle.