Skip to content

cc_tradie configuration reference

Three config files, all outside escrow, all commented line by line. Every key is checked when the resource starts:

Three config files, all outside escrow, all commented line by line. Every key is checked when the resource starts:

  • a typo or bad value prints one console line naming the key, and the default is used;
  • a bad row (a find, a rank, a site) is dropped with a line naming it;
  • a broken essential (no ranks, no sites, no truck bays, a polygon with under 3 points) prints CONFIG BROKEN and every action answers "misconfigured" until you fix it. The resource never half-works.
FileWho can read itWhat
config.luaevery player (it is sent to clients)features, job lock, brand, colour, commands, keys, depot, truck, crews, contracts, animation, uniform
config_sites.luaevery playerthe dig sites (polygons) and the depot return zone
server/config.luathe server onlyitems, payment account, XP, ranks, contract sizes, drilling chances and anti-cheat floors, jackhammer tuning, upgrades, shop, tool-chest tiers, finds, wages, caps, cargo risk, run ids, webhooks

Never put a price, payout or webhook in config.lua: players can read it.


config.lua

Config.Preset

GetConvar('cc_tradie:preset', 'default'). Loads presets/.lua over server/config.lua at start. Set it with setr cc_tradie:preset "myserver" so an update of this file never loses your choice. See Presets.

Config.Debug

false. true draws every dig-site polygon and the depot return zone in game.

Config.Features (all true by default)

Every subsystem can be switched off; the core loop (clock on, contract, drill, get paid) works with all of them off (tested).

KeyOnOff
crewsleaders invite up to Config.Crew.maxMembers workers onto one contracteveryone works solo
jackhammerworkers buy and own a jackhammera depot loaner that never wears
maintenancechisel / filter / oil wear and are serviced with spare partsno wear
upgradesthe four jackhammer upgrade lines are for saleno upgrades
toolChestfinds wait in the truck's chest until unloaded at the depotfinds go straight to pockets
chestTiersbigger chests can be boughteveryone has tier 1
cargoRiska damaged truck can lose stacks, a wrecked one loses the chestno loss
wagessome finds are a cash site wageitems only
bonusFindsrank and hammer assembly give a chance at a second findone find per hole
rareFindsthe percent rows of the find tablesweighted rows only
uniformwork clothes on clock-in, own clothes back on clock-offplayers keep their clothes
staffPanelthe recovery panel and staff commandsnone
boardCommand/tradie opens the board at the depot or while on shiftboard only at the foreman
boosthonours cc_lib's timed pay/XP boost (CC.boost, cc_lib 1.13+)ignores it

Config.Job

required = false lets anyone clock on. required = true with jobs = { tradie = 0, builder = 2 } allows only those jobs at or above the grade (needs a framework with jobs).

Config.Brand

name, subtitle, tagline: the board header and notification title.

Config.UI

KeyDefault
accent'#f2c300' (safety yellow)the one theme colour; the page derives every shade from it
toastCorner'top-right'top-right, top-left, bottom-right, bottom-left
hudCorner'right'right or left: where the shift card sits

Config.Commands

Rename any command, or set it to false to remove it.

KeyDefaultWho
boardtradieeveryone
infojhinfoeveryone
servicejhserviceeveryone (/jhservice chisel|filter|oil)
stafftradieadminACE cc_tradie.admin
runtradierunACE
restoretradierestoreACE
upgradetradieupgradeACE
importtradieimportACE / console

Config.Keys

GTA control ids (list): interact 38 (E), pressure 24 (LMB), cancel 194 (BACKSPACE).

Config.Depot

KeyDefault
peds_m_y_construct_01, vec4 at the yard, a scenariothe foreman
radius6.0metres from the foreman to use the board, clock on, buy, invite, take the truck
blipsprite 566enabled, sprite, colour, scale, label
truck.modelsadlerany vehicle model
truck.bays2 × vec4spawn points; the first clear one is used
truck.colour{ 255, 196, 0 }RGB, primary and secondary
truck.fuel100starting fuel (through your fuel script)
truck.platePrefixTRDup to 4 characters
truck.chestReach8.0how close to the truck a worker must stand to unload

Config.Crew

maxMembers (4), inviteRadius (15 m), inviteSeconds (45).

Config.Contracts

maxCrewsPerSite (2): crews on one site at once. reservationSeconds (300): a contract nobody takes a truck for lapses.

Config.Drilling

spotSpacing (8 m between holes, yours and your crew's), prompt text-UI options.

Config.Animation

dict, clip, flag, scenario (fallback when the dict fails to load), prop, bone.

Config.Uniform

male / female: components and props as { drawable, texture } per slot. A drawable your game build does not have is skipped, never forced. Check them on your clothing pack.


config_sites.lua

lua
Config.Sites[i] = {
    name  = 'zone_001',        -- stable id written to the audit: never rename a live one
    label = 'Desert Site 01',  -- what players see
    minZ = 30.0, maxZ = 60.0,  -- vertical bounds
    points = { vec2(...), ... },-- the polygon, 3+ points
    pool  = 'default',         -- which ServerConfig.Finds table it rolls (optional)
    blip  = { ... },           -- optional
}
Config.DepotReturnZone = { type = 'poly', points = {...}, minZ, maxZ }  -- or type = 'box'

The 13 default sites are on open vanilla terrain in the Grand Senora Desert, so they work on any map. Turn on Config.Debug to see them in game while you move them.


server/config.lua

TableWhat
Itemskey → item name. The code only uses the keys; rename the values to match your items
Payment.account'cash' or 'bank': what the depot charges and wages pay into
XPXP for an empty hole, a find, a rare find
Ranksfive ranks: xp, label, findBonus, cooldown, luck, extraFind, perk text
Contracts.sizes{ holes, rank }: contract sizes and the rank that unlocks each
DrillingbaseFindChance, cooldowns (cooldownHit, cooldownMiss, cooldownFail), spot memory (recentSpots, spotExpire) and the anti-cheat floors (minFillFactor, minMs, maxDrift, ticketSeconds). Values below the safe minimum are refused at start
Jackhammerthe minigame (base), maxSessionSeconds, clamps, service bands, parts
Upgradesfour lines (chisel, regulator, air, hammer) × tiers: multipliers, rank, price
Shop{ kind = 'jackhammer' or 'item', item, label, price, description }
JackhammerLoannil, or { resource, job }: a resource exporting drawStartupLoan(src, job, price) and cancelStartupLoan(src, job) can pay for the jackhammer
ToolChesttiers { label, slots, rank, price }
Findsper pool: { kind = 'item' or 'wage', item, min, max, weight or percent, label }. percent rows are rare rolls checked first
WageScalewage multiplier per rank (bigger contracts mean more holes an hour)
CashCapperWindow (30000), windowSeconds (3600). Rolling per-character cash ceiling, 0 = off. Survives restarts
ItemCapitemsPerWindow (300), xpPerWindow (0 = off), windowSeconds
CargoRisktruck condition bands → lossChance per stack
Runsrun id prefix (TR), staff searchLimit
Webhooksread from convars (set cc_tradie:webhook_economy "..." etc.). Empty = console only

The boost

With Config.Features.boost = true and cc_lib 1.13+, wages and XP are multiplied by cc_lib's timed boost (Config.Boost in cc_lib, or the cc:boost_* convars) after the caps, so a boost never lets anyone past CashCap in base units. Without a boost window, or on an older cc_lib, nothing changes.


Presets

presets/.lua is a server-only file selected with setr cc_tradie:preset "". Every top-level ServerConfig table it sets replaces the default. It may also return function(ServerConfig) ... end for single-key edits and for relabelling (Config.Brand, Config.Sites[i].label: labels reach players through the server). presets/example.lua shows both.

Locales

locales/.json; pick one with setr cc_tradie:locale "de". English is complete; any key missing from another language falls back to English. Copy en.json to add a language.

custom/

custom/server.lua and custom/client.lua are yours and never escrowed. Register hooks there (see API.md); an update never overwrites them.