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 BROKENand every action answers "misconfigured" until you fix it. The resource never half-works.
| File | Who can read it | What |
|---|---|---|
config.lua | every player (it is sent to clients) | features, job lock, brand, colour, commands, keys, depot, truck, crews, contracts, animation, uniform |
config_sites.lua | every player | the dig sites (polygons) and the depot return zone |
server/config.lua | the server only | items, 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).
| Key | On | Off |
|---|---|---|
crews | leaders invite up to Config.Crew.maxMembers workers onto one contract | everyone works solo |
jackhammer | workers buy and own a jackhammer | a depot loaner that never wears |
maintenance | chisel / filter / oil wear and are serviced with spare parts | no wear |
upgrades | the four jackhammer upgrade lines are for sale | no upgrades |
toolChest | finds wait in the truck's chest until unloaded at the depot | finds go straight to pockets |
chestTiers | bigger chests can be bought | everyone has tier 1 |
cargoRisk | a damaged truck can lose stacks, a wrecked one loses the chest | no loss |
wages | some finds are a cash site wage | items only |
bonusFinds | rank and hammer assembly give a chance at a second find | one find per hole |
rareFinds | the percent rows of the find tables | weighted rows only |
uniform | work clothes on clock-in, own clothes back on clock-off | players keep their clothes |
staffPanel | the recovery panel and staff commands | none |
boardCommand | /tradie opens the board at the depot or while on shift | board only at the foreman |
boost | honours 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
| Key | Default | |
|---|---|---|
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.
| Key | Default | Who |
|---|---|---|
board | tradie | everyone |
info | jhinfo | everyone |
service | jhservice | everyone (/jhservice chisel|filter|oil) |
staff | tradieadmin | ACE cc_tradie.admin |
run | tradierun | ACE |
restore | tradierestore | ACE |
upgrade | tradieupgrade | ACE |
import | tradieimport | ACE / console |
Config.Keys
GTA control ids (list): interact 38 (E), pressure 24 (LMB), cancel 194 (BACKSPACE).
Config.Depot
| Key | Default | |
|---|---|---|
ped | s_m_y_construct_01, vec4 at the yard, a scenario | the foreman |
radius | 6.0 | metres from the foreman to use the board, clock on, buy, invite, take the truck |
blip | sprite 566 | enabled, sprite, colour, scale, label |
truck.model | sadler | any vehicle model |
truck.bays | 2 × vec4 | spawn points; the first clear one is used |
truck.colour | { 255, 196, 0 } | RGB, primary and secondary |
truck.fuel | 100 | starting fuel (through your fuel script) |
truck.platePrefix | TRD | up to 4 characters |
truck.chestReach | 8.0 | how 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
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
| Table | What |
|---|---|
Items | key → 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 |
XP | XP for an empty hole, a find, a rare find |
Ranks | five ranks: xp, label, findBonus, cooldown, luck, extraFind, perk text |
Contracts.sizes | { holes, rank }: contract sizes and the rank that unlocks each |
Drilling | baseFindChance, 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 |
Jackhammer | the minigame (base), maxSessionSeconds, clamps, service bands, parts |
Upgrades | four lines (chisel, regulator, air, hammer) × tiers: multipliers, rank, price |
Shop | { kind = 'jackhammer' or 'item', item, label, price, description } |
JackhammerLoan | nil, or { resource, job }: a resource exporting drawStartupLoan(src, job, price) and cancelStartupLoan(src, job) can pay for the jackhammer |
ToolChest | tiers { label, slots, rank, price } |
Finds | per pool: { kind = 'item' or 'wage', item, min, max, weight or percent, label }. percent rows are rare rolls checked first |
WageScale | wage multiplier per rank (bigger contracts mean more holes an hour) |
CashCap | perWindow (30000), windowSeconds (3600). Rolling per-character cash ceiling, 0 = off. Survives restarts |
ItemCap | itemsPerWindow (300), xpPerWindow (0 = off), windowSeconds |
CargoRisk | truck condition bands → lossChance per stack |
Runs | run id prefix (TR), staff searchLimit |
Webhooks | read 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.