Kartik Scripts

Maintenance & Wear

📄 Config file: shared/maintenance.lua

This file controls how quickly each vehicle part wears out and the gameplay effects of worn parts. Every part has a wear distance (how far the vehicle must drive before the part needs attention) and various settings that determine what happens when the part is degraded.

Wear values go from 0 (brand new) to 100 (completely broken). When a part reaches 100, it stops functioning properly and may cause serious issues like engine stalling or tire blowouts.


Spark Plugs

Config.SparkPlugChangeDistance = 1
Config.MaxSparkPlugWear        = 100.0
SettingWhat it does
SparkPlugChangeDistanceDistance (in km/miles) before spark plugs need changing. Lower values mean more frequent maintenance.
MaxSparkPlugWearMaximum wear value. When reached, the spark plugs are completely worn out and cause misfires.

Engine Oil & Oil Filter

Config.OilChangeDistance    = 1
Config.OilFilterDistance    = 2000
Config.EngineDamageRate     = 0.5
SettingWhat it does
OilChangeDistanceDistance before oil needs changing.
OilFilterDistanceDistance before the oil filter needs replacing.
EngineDamageRateHow much engine health damage accumulates per tick when oil is severely degraded. Higher = more punishing.

Air Filter

Config.AirFilterDistance     = 1
Config.MaxSpeedReduction     = 0.2
Config.AccelerationReduction = 0.3
SettingWhat it does
AirFilterDistanceDistance before the air filter needs replacing.
MaxSpeedReductionMaximum top speed penalty when the air filter is fully clogged. 0.2 = up to 20% speed loss.
AccelerationReductionMaximum acceleration penalty when the air filter is fully clogged. 0.3 = up to 30% slower acceleration.

Tires

Config.TireWearDistance         = 1
Config.BaseTireGrip             = 2.5
Config.MinTireGrip              = 0.5
Config.TireBurstThreshold       = 0.98
Config.TireBurstChance          = 0.05
Config.SteeringReductionRatio   = 0.4
Config.SteeringLockReductionRatio = 0.3
SettingWhat it does
TireWearDistanceDistance before tires need replacing.
BaseTireGripGrip level of brand new tires. Higher = more traction.
MinTireGripGrip level of completely worn tires. The difference between Base and Min determines how much grip degrades.
TireBurstThresholdWear ratio (0–1) at which tires risk randomly blowing out. 0.98 means at 98% wear (only 2% life left).
TireBurstChanceProbability (0–1) per check that a tire actually bursts when above the threshold. 0.05 = 5% chance every 3 seconds.
SteeringReductionRatioMaximum reduction in steering speed when tires are worn. 0.4 = up to 40% slower steering.
SteeringLockReductionRatioMaximum reduction in turning radius when tires are worn. 0.3 = up to 30% wider turns.

Wheel Balancing

Config.WheelBalanceDistance      = 1
Config.WheelBalanceResonanceMin  = 40.0
Config.WheelBalanceResonanceMax  = 120.0
Config.WheelBalanceVibration     = 0.5
Config.WheelBalanceJitter        = 0.2
Config.WheelBalanceImpactChance  = 0.1
Config.WheelBalanceSusImpact     = 1.5
SettingWhat it does
WheelBalanceDistanceDistance before wheel balancing is needed.
WheelBalanceResonanceMinSpeed (km/h) where vibration begins. Below this speed, unbalanced wheels feel normal.
WheelBalanceResonanceMaxSpeed (km/h) where vibration reaches maximum intensity.
WheelBalanceVibrationMaximum camera shake intensity. Higher = more violent shaking.
WheelBalanceJitterMaximum steering jitter (random small inputs). Higher = harder to control.
WheelBalanceImpactChanceChance (0–1) of losing wheel balance after a high-speed collision.
WheelBalanceSusImpactMultiplier for suspension wear when wheels are unbalanced. 1.5 = suspension wears 50% faster.

Brakes

Config.BrakeWearRate        = 0.08
Config.MaxBrakeWear         = 100.0
Config.BrakeEfficiencyLoss  = 1.0
Config.BaseBrakeForce       = 1.0
Config.BrakeChangeDistance  = 1
SettingWhat it does
BrakeWearRateHow fast brakes wear per use. Higher = faster degradation.
MaxBrakeWearMaximum wear value (100 = completely worn).
BrakeEfficiencyLossMaximum braking power loss when fully worn. 1.0 = 100% loss (no brakes at all).
BaseBrakeForceThe baseline brake force of a vehicle with new brakes.
BrakeChangeDistanceDistance before brakes need attention.

Suspension

Config.SuspensionChangeDistance = 1
Config.MaxSuspensionWear        = 100.0
SettingWhat it does
SuspensionChangeDistanceDistance before suspension needs servicing.
MaxSuspensionWearMaximum wear value. Worn suspension causes harsh ride quality and handling issues.

Clutch

Config.ClutchWearRate        = 0.1
Config.MaxClutchWear         = 100.0
Config.ClutchEfficiencyLoss  = 0.8
Config.ClutchChangeDistance  = 1
Config.BaseClutchForce       = 1.0
SettingWhat it does
ClutchWearRateHow fast the clutch wears per gear change.
MaxClutchWearMaximum wear value.
ClutchEfficiencyLossMaximum efficiency loss when fully worn. 0.8 = 80% power loss through a slipping clutch.
ClutchChangeDistanceDistance before the clutch needs replacing.
BaseClutchForceBaseline clutch engagement force.

Pistons

Config.PistonChangeDistance   = 1
Config.MaxPistonPowerLoss     = 0.4
Config.PistonSmokeThreshold   = 0.85
Config.PistonDynamicWearRate  = 0.02
SettingWhat it does
PistonChangeDistanceDistance before pistons need servicing.
MaxPistonPowerLossMaximum power loss when pistons are fully worn. 0.4 = 40% less engine power.
PistonSmokeThresholdWear ratio (0–1) at which blue exhaust smoke starts appearing. 0.85 = at 85% wear.
PistonDynamicWearRateAdditional wear added when revving above 80% RPM. High-revving wears pistons faster.

Radiator

Config.RadiatorChangeDistance   = 2
Config.RadiatorHeatMultiplier   = 2.5
Config.RadiatorSteamThreshold   = 0.90
Config.RadiatorDynamicWearRate  = 0.05
SettingWhat it does
RadiatorChangeDistanceDistance before the radiator needs replacing.
RadiatorHeatMultiplierHow much faster the engine overheats when the radiator is worn. 2.5 = 150% faster heating.
RadiatorSteamThresholdWear ratio (0–1) at which steam starts coming from the hood. 0.90 = at 90% wear.
RadiatorDynamicWearRateAdditional wear when engine temperature exceeds 105°.

Fuel Pump

Config.FuelPumpChangeDistance   = 2500
Config.FuelPumpDynamicWearRate  = 0.01
SettingWhat it does
FuelPumpChangeDistanceDistance before the fuel pump needs replacing.
FuelPumpDynamicWearRateWear added periodically while driving.

A worn fuel pump causes intermittent fuel starvation, the engine will stutter and can randomly stall.


Alternator

Config.AlternatorChangeDistance   = 2
Config.AlternatorFailChance      = 0.3
Config.LightFlickerThreshold     = 0.75
Config.AlternatorDynamicWearRate = 0.1
SettingWhat it does
AlternatorChangeDistanceDistance before the alternator needs replacing.
AlternatorFailChanceChance (0–1) that the engine fails to start when the alternator is worn. 0.3 = 30% fail rate.
LightFlickerThresholdWear ratio (0–1) at which headlights start flickering. 0.75 = at 75% wear.
AlternatorDynamicWearRateWear added each time the player attempts to start the engine.

Gearbox

Config.GearboxChangeDistance       = 2
Config.GearboxWearRate             = 0.12
Config.GearboxFailShiftThreshold   = 0.8
Config.GearboxGrindChance          = 0.2
Config.GearboxClutchWearImpact     = 0.1
SettingWhat it does
GearboxChangeDistanceDistance before the gearbox needs replacing.
GearboxWearRateHow fast the gearbox wears per gear shift or per mile.
GearboxFailShiftThresholdWear ratio (0–1) at which gear shifts start randomly failing. 0.8 = at 80% wear.
GearboxGrindChanceProbability (0–1) of gears grinding when shifting with a worn gearbox.
GearboxClutchWearImpactAdditional clutch wear caused by each shift when the gearbox is worn. Worn gearbox = worn clutch faster.

Turbo

Config.TurboDynamicWearRate    = 0.04
Config.TurboBaseWearRate       = 0.01
Config.TurboPowerLossThreshold = 0.5
Config.TurboBlowThreshold      = 0.95
SettingWhat it does
TurboDynamicWearRateAdditional wear when boost is active (RPM above turbo's threshold).
TurboBaseWearRateBaseline wear added periodically while driving with a turbo installed.
TurboPowerLossThresholdWear ratio (0–1) where boost output starts declining. 0.5 = loses power at 50% wear.
TurboBlowThresholdWear ratio (0–1) where the turbo can blow out entirely (black smoke, no boost). 0.95 = at 95% wear.

Global Wear Settings

Config.WearTickInterval = 5000
Config.MaxPartCondition = 100.0
SettingWhat it does
WearTickIntervalHow often (in milliseconds) the dynamic wear calculation runs. 5000 = every 5 seconds. Lower values are more accurate but use more CPU.
MaxPartConditionThe maximum wear value any part can reach. 100 means fully broken.

On this page