Skip to content

configuration

All settings are in config.lua.

General#

lua
Config.TestMode = false          -- Show 3D debug rays and speed text
Config.EnableCommands = true     -- Enable /fixVehicle and /fv
Config.EnableCompatible = true   -- Mechanic script compatibility bridge
Config.OldVersion = false        -- Legacy wheel damage (NOT recommended)

Crash damage#

lua
Config.Damage = 100.0                    -- Body damage per impact tick
Config.DamageTime = 1                    -- Number of damage ticks
Config.DamageRadius = 15.1               -- Visual damage radius
Config.DetectionTimeForNextCrash = 1000  -- Cooldown between crashes (ms)
Config.EnableMinCrashSpeed = true
Config.MinCrashSpeed = 5.0               -- Minimum speed for damage (m/s)

Damage levels#

lua
Config.DamageLevels = {
    { min = 10.0, max = 20.0 },   -- Tire burst
    { min = 21.0, max = 300.0 },  -- Wheel breakage
}

Hit ignore#

Skip damage when the raycast hits certain entity types:

lua
Config.HitIgnore = {
    [0] = false,  -- No entity
    [1] = true,   -- Ped (ignore)
    [2] = false,  -- Vehicle
    [3] = false,  -- Object
}

Post-crash behavior#

lua
Config.StopVehicleWhenCrash = true     -- Stall engine after wheel crash
Config.StopTimeout = 2000              -- Stall duration (ms)
Config.ForceStopAfterCrash = true      -- Force engine off instantly
Config.TimeoutWheeelRemove = 60000   -- Remove spawned wheel props (ms)

Vehicle ignore list#

Exclude certain vehicles or classes from damage:

lua
Config.Ignore = {
    Enable = true,
    VehicleTypes = {
        [8] = true,   -- Motorcycles
        [10] = true,  -- Industrial
        -- ...
    },
    Vehicles = {
        ["JACKAL"] = true,  -- Specific model (uppercase)
    },
}

Part damage#

lua
Config.PartSettings = {
    enableEngineDamage = true,
    enableRadiatorDamage = false,
    enableFuelTankDamage = true,

    Radiator = { minSpeed = 5.0, damage = 10.0 },
    Engine   = { minSpeed = 5.0, damage = 20.0 },
    FuelTank = { minSpeed = 5.0, damage = 15.0 },
}

Toolbox#

lua
Config.ToolBoxItem = "repair_toolbox"

Config.ToolBoxProps = {
    ["open"] = "ch_prop_toolbox_01b",
    ["closed"] = "ch_prop_toolbox_01a",
}

Wheel repair props#

lua
Config.EnableWheelRepairWith3D = true
Config.DefaultWheelModel = `prop_wheel_03`
Config.DefaultWheelBoltsModel = `gr_prop_gr_wheel_bolt_01a`
Config.DefaultWrenchModel = `xs_prop_x18_torque_wrench_01a`

Wheel spawn models (on crash)#

lua
Config.WheelModels = {
    wheel = `prop_tornado_wheel`,
    rim = `prop_wheel_rim_03`,
}

Land restriction#

lua
Config.EnableLandRestriction = true

Surface materials and vehicle classes are defined in Config.SurfaceMaterials and Config.VehicleClasses. Per-class settings are stored in landData.json (auto-generated on first start).

Customize handling per surface in Config.HandlingSets:

  • slippery, soft, rough, reset, normal

For fully custom logic, edit Config.CustomHandlingThread(vehicle).

Damage indicators#

Raycast points that detect crash impact zones:

lua
Config.DamageIndicators = {
    { name = "front_center", offset = vector3(0.0, 3.5, 0.0) },
    { name = "front_right",  offset = vector3(1.5, 2.5, 0.3), index = 1, bone = "wheel_rf" },
    { name = "front_left",   offset = vector3(-1.5, 2.5, 0.3), index = 0, bone = "wheel_lf" },
    { name = "rear_right",   offset = vector3(2.5, -3.5, -0.0), index = 5, bone = "wheel_rr" },
    { name = "rear_left",    offset = vector3(-2.5, -3.5, -0.0), index = 4, bone = "wheel_lr" },
    -- ...
}

Add new indicators to create additional damage zones.

Language#

Customize notification messages:

lua
Config.Lang = {
    ["toolbox_in_use"] = "You are already using the toolbox.",
    ["engine_repaired_success"] = "Engine repaired successfully!",
    ["fueltank_damaged"] = "Fuel Tank Damaged!",
    -- ...
}

UI button labels#

Each repair workflow has configurable on-screen button hints:

  • Config.Toolbox_ui_buttons
  • Config.TireItem_ui_buttons
  • Config.TireRepair_ui_buttons
  • Config.EngineRepairKit_ui_buttons
  • Config.Radiator_ui_buttons
  • Config.RepairRadiator_ui_buttons

Target options#

Vehicle and toolbox target menus are fully configurable:

  • Config.ToolboxTargetOptions — Hood, trunk, engine, radiator, fuel tank
  • Config.ToolboxTireOptions — Toolbox tool selection