Trucking
Configuration

Configuration

All tuning lives in config.lua. The file is listed in escrow_ignore, so it remains editable on encrypted builds.

Depot location

Config.DepotBlip controls the map blip; Config.BossNPC is the dispatcher the player interacts with via ox_target.

Config.DepotBlip = {
    coords = vec3(-327.18, -1300.38, 31.35),
    sprite = 477,
    color  = 47,
    scale  = 0.8,
    label  = 'Trucking Depot',
}
 
Config.BossNPC = {
    model    = 's_m_m_trucker_01',
    coords   = vec4(-299.68, -1289.54, 30.25, 0.39),
    scenario = 'WORLD_HUMAN_CLIPBOARD',
}

Truck models

Config.Trucks defines purchasable freight trucks: model, label, price, horsepower, level requirement, category.

ModelLabelPriceHPLevel
haulerHauler$75,0003200
packerPacker$270,0004015
phantomPhantom$330,00048010
phantom3Phantom Custom$600,00055020

Trailer models

Config.Trailers lists trailer types and the cargo categories each accepts. Config.TruckTrailerRestrictions then controls which trailer each truck is permitted to tow — for example, the Hauler can only pull standard / cargo / heavy trailers, while the Packer and above can pull tankers and log trailers.

License definitions

Config.Licenses is the heart of the CDL system. Each license entry includes:

  • id, label, description, fee, cooldown (seconds)
  • passScore — number of correct answers required
  • requiredLevel — gate before the test can be taken
  • prerequisite — required prior license (e.g. CDL A requires cdl_b)
  • quizQuestions — array of { question, answers, correct } with 1-indexed correct answer
  • drivingTest — { vehicle, trailer, checkpoints[], timeLimit, maxDamage }
  • trucks — list of truck models this license unlocks
LicenseFeePrereqUnlocks
CDL Class B$2,500noneHauler
CDL Class A$5,000CDL B + Lvl 5Packer, Phantom
Hazmat Endorsement$10,000CDL A + Lvl 20Phantom Custom, tanker / log trailers

Skill trees

Config.Skills defines five categories with six ranks each. Every rank has its own XP cost array.

SkillEffect
adrUnlocks hazardous material contracts
distanceUnlocks longer routes with higher pay
valuableUnlocks high-value cargo
fragileReduces fragile cargo penalties
ontimeAdds time on timed deliveries
{
    name = 'adr',
    label = 'Product Type (ADR)',
    description = 'Unlocks hazardous material contracts',
    maxLevel = 6,
    xpPerLevel = {500, 1200, 2500, 5000, 10000, 20000},
}

Contract pools

  • Config.Contracts.quick — entry-level hauler-only jobs. Truck spawn is fixed at the depot.
  • Config.Contracts.freight — mid and high-tier jobs requiring an owned truck and matching requiredSkills. Some are timed, some fragile, some hazmat.
  • Config.PickupLocations / Config.DeliveryLocations — pool of coordinates contracts pull from.

Config.ContractRefreshTime (default 600s) and Config.MaxActiveContracts (default 8) control the dispatch board.

XP curve and payment

Config.PayPerKm                       -- base pay per kilometer
Config.SkillContractMultiplier        -- bonus for skill-gated freight
Config.OnTimeBonusPercent             -- 15% default
Config.FragileDamagePenaltyMultiplier -- 2x default
Config.TruckRecoveryFee               -- fee to recover a destroyed owned truck

Hazmat tuning

Config.Hazmat = {
    speedLimit       = 80,   -- mph cap on hazmat hauls
    sloshPenalty     = ...,  -- payout reduction for harsh driving with tanker
    hudUpdateInterval= 250,  -- ms
}

Quiz questions and driving-test checkpoints are server-authoritative. Edit Config.Licenses[*].quizQuestions and drivingTest.checkpoints in-place to localise content or fit a different map.