Repair & Replace Parts

📄 Config file: shared/repair_config.lua

This file defines all the repair and replacement actions a mechanic can perform on each vehicle part. Every part entry specifies the item required, duration, animation, and whether it's a partial repair or a full replacement.

circle-info

Repair = partially restores the part's condition using a repair kit (cheaper, faster, but doesn't fully fix it). Replace = fully restores the part to brand new using a replacement part (more expensive, takes longer, but resets wear to 0).


Minigames & Failure Handling

📄 Config file: shared/repair_config.lua

All repair and installation actions are protected by a centralized minigame system. This ensures that while everyone can use repair tools, professional mechanics have a clear advantage.

Config.Minigames = {
    enabled = true,
    mechanicNeedsMinigame = false, -- Mechanics skip the minigame if false
    damageOnFail = true,
    failDamageAmount = 150.0, -- Amount of engine damage to apply on failure
}

Configuration Options

Option
What it does

enabled

Globally enable or disable minigames for all repairs/installs.

mechanicNeedsMinigame

If false, players with a registered mechanic job will skip the minigame.

damageOnFail

If true, failing a minigame damages the vehicle.

failDamageAmount

The amount of health to remove from the engine and body on failure.


Body Repair

Setting
What it does

item

Inventory item required to perform the body repair.

duration

How long the repair takes in milliseconds. 5000 = 5 seconds.

label

The text shown on the progress bar during the repair.

This repairs the vehicle's exterior body damage (dents, scratches, deformation) — not individual parts.


Cleaning Kit (Wash)

📄 Config file: shared/animations.lua (for animations)

The cleaning kit uses a sponge prop and particle effects to wash the vehicle. A vehicle must have a dirt level of 0.0 before wax can be applied.


Tiered Repair Kits

📄 Config file: shared/repair_config.lua

Tiered repair kits (Standard, Advanced, Helicopter) provide a more flexible way to manage multi-part repairs.

Configuration Options

Option
What it does

label

Name shown on the progress bar.

duration

Time in milliseconds to complete the repair.

repaints

If true, the kit will fix visual body damage.

repairs

List of part categories this kit can fix. Valid categories: engine, oil, spark_plug, air_filter, tires, brakes, suspension, clutch, gearbox, piston, radiator, fuel_pump, alternator, turbo.

classes

List of vehicle class IDs this kit is compatible with.


Part-by-Part Configuration

Each part listed in Config.RepairParts has the following structure:

Property
What it does

label

Display name of the part.

maxMileage

Maximum mileage this part supports before it needs replacement. Used as a reference value.

repair.item

The repair kit item needed for a partial repair.

repair.amount

How much condition is restored (out of 100). 25 = restores 25% condition.

repair.duration

Time in milliseconds for the repair action.

replace.item

The full replacement part item.

replace.count

How many of the item are consumed.

replace.duration

Time in milliseconds for the replacement action.


Spark Plugs

Action
Item
Count/Amount
Duration

Replace

spark_plugs

1

5 seconds

Spark plugs only support replacement (no partial repair).


Engine Oil

Action
Item
Count/Amount
Duration

Replace

engine_oil

1

10 seconds

Oil changes are full replacements — you always use a fresh bottle.


Oil Filter

Action
Item
Count/Amount
Duration

Replace

oil_filter

1

3 seconds


Air Filter

Action
Item
Count/Amount
Duration

Replace

air_filter

1

3 seconds


Tires

Action
Item
Count/Amount
Duration

Replace

tires

4 (full set)

5 seconds

Tire replacement always uses 4 items (one per wheel).


Brakes

Action
Item
Count/Amount
Duration

Repair (pad change)

brake_pads_repair

Restores 25%

6 seconds

Replace (full service)

brakeparts

1

10 seconds


Suspension

Action
Item
Count/Amount
Duration

Repair (service)

suspension_repair

Restores 25%

8 seconds

Replace

suspension_parts

1

12 seconds


Clutch

Action
Item
Count/Amount
Duration

Repair (adjust)

clutch_repair

Restores 20%

8 seconds

Replace

clutch

1

12 seconds


Gearbox

Action
Item
Count/Amount
Duration

Repair (service)

gearbox_repair_kit

Restores 20%

10 seconds

Replace

gearbox_parts

1

15 seconds


Radiator

Action
Item
Count/Amount
Duration

Repair (seal)

radiator_repair_kit

Restores 35%

6 seconds

Replace

radiator

1

10 seconds


Fuel Pump

Action
Item
Count/Amount
Duration

Repair (service)

fuel_pump_repair_kit

Restores 35%

6 seconds

Replace

fuel_pump

1

8 seconds


Alternator

Action
Item
Count/Amount
Duration

Repair (service)

alternator_repair_kit

Restores 35%

6 seconds

Replace

alternator_battery

1

8 seconds


Pistons

Action
Item
Count/Amount
Duration

Repair (service)

piston_repair_kit

Restores 15%

12 seconds

Replace

engine_pistons

1

20 seconds

Pistons are the most time-consuming parts to replace.


Turbo

Action
Item
Count/Amount
Duration

Repair (service)

turbo_repair_kit

Restores 50%

7 seconds

Replace

turbo_s2

1

10 seconds

circle-info

All animation dictionaries and animations are also defined per-part in this config. You can change the animation played during any repair/replace action by editing the animation block in each entry.

Last updated