cc_crafting: configuration reference
Back to the overview. See also exports and hooks.
Back to the overview. See also exports and hooks.
#
Two files, both open under escrow:
| File | Who reads it | Holds |
|---|---|---|
config.lua | every player (it is downloaded) | stations, kinds, features, labels, categories, which tier unlocks each recipe |
server/config.lua | the server only | inputs, outputs, times, XP, fees, limits, logs |
The resource checks both at boot and refuses to start on a mistake, with one console line per problem naming the key (Config.Collect must be 'kind' or 'station' (got kinds)).
config.lua
| Key | Type | Default | Effect |
|---|---|---|---|
Preset | string | nil | nil | load presets/<name>.lua over these defaults (or setr cc_crafting_preset "<name>") |
Features.batches | bool | true | jobs of more than one batch |
Features.cancel | bool | true | cancel for a quoted loss |
Features.express | bool | true | pay to halve the time left |
Features.recycling | bool | true | recycling stations |
Features.progression | bool | true | XP, tiers and perks (off: everything unlocked, no XP) |
Features.tools | bool | true | tool wear (off: tools are not needed) |
Features.facility | bool | true | gatekeeper, card and card-gated kinds |
Features.gangBenches | bool | true | GangBenches |
Features.readyNotices | bool | true | ready notice + login notice |
Features.reminders | bool | true | repeat notices for uncollected jobs |
Features.blips | bool | false | map blips per kind (Blips) |
Features.helpCard | bool | true | the first-open help card |
Collect | 'kind' | 'station' | 'kind' | where a job collects |
UI.accent | hex | #1c2434 | the panel's one theme colour |
OpenDelayMs | ms | 0 | a "setting up" bar before the panel opens |
Target.icon / distance | target option look and reach | ||
SpawnDistance | metres | 60 | peds and props exist only this close |
SpawnProps | bool | true | false when your map already has benches |
ItemLabels | { [item] = label } | {} | display names (needed where the inventory has none to read) |
Blips | per kind | sprite, colour, scale | |
Kinds | table | 9 kinds | track, label, catalogue, card, minTier, gang, instant, anim |
Stations | list | 16 | id, kind, label, coords, heading, ped, prop, zone, minTier |
GangBenches | { [gang] = { coords, heading, minGrade } } | empty | paste from /cc_crafting_gangbench <gang> |
Facility | table | card, minTier, teleport, gatekeeper, entrySpawn, exit, exitSpawn, fadeMs | |
Categories | list | panel tabs (label key category.<id>) | |
Recipes | list | 21 | id, kind, category, tier. The order is the index clients send: append only |
server/config.lua
| Key | Effect |
|---|---|
Tiers | XP at which each of the 5 tiers starts |
ProcessingPerks | per tier: timeDiscount, batchCap, expressCut |
Queue | job limits, batch caps, time formula, caps, station distance, quote lifetime |
Cancel | base, step, every, max of the cancel loss |
Tools | maxDurability, nilIsFull (a tool with no durability: full, or unusable) |
Facility | gate distance, replacementFees, feeAccount |
Gang | speedExport (a gang resource's perk export), minMult, maxMult |
Notify | pollSeconds, remindMinutes, phoneApp |
Webhooks | read from convars, see Logs |
Logs | username, rejectThrottleMs, adminXpCap, pruneDays, file, mute |
Recipes | per recipe: kind, tier, seconds, inputs, outputs, tools, xp, express / cash |
Adding a recipe
- Append
{ id = 'my_item', kind = 'workshop', category = 'tools', tier = 1 }to the END ofConfig.Recipes. - Add
my_item = { kind = 'workshop', tier = 1, seconds = 300, inputs = { { 'steel', 2 } }, outputs = { { 'my_item', 1 } }, xp = 3, express = 200 }toServerConfig.Recipes. - Make sure your inventory defines every item it names. Restart: the boot check tells you if the two halves disagree.
Presets
Config.Preset = 'name' (or setr cc_crafting_preset "name") loads presets/name.lua after config.lua and presets/server/name.lua after server/config.lua. A preset can replace any section: a whole catalogue, a map's station positions, an economy. Write your own the same way; each file starts with if Config.Preset ~= 'name' then return end.
Language
server.cfg: setr cc_crafting_locale "de" (default en). setr, not set: the panel reads it on the client too. The files are locales/.json and stay open under escrow.
| File | Coverage |
|---|---|
en.json | every string (200) |
de.json, es.json, fr.json, pt.json | the common lines; every missing key falls back to English, one key at a time |
To translate, copy en.json to .json, translate the values (keep every {name} placeholder), and set the convar. A typo in a key shows the key itself, never a blank.
Added in 2.3.0
| Key | Type | Default | Effect |
|---|---|---|---|
HideWhenState | list of strings | {} | LocalPlayer state bag keys; while any is set, the fabrication floor's benches and exit do not show (for another resource's private copy of the same interior) |
Logs
Console always. Discord per channel, from set convars (never setr):
set cc_crafting_webhook_default "<webhook url>" # catches every channel left unset
set cc_crafting_webhook_crafting "" # job start / collect / cancel, gang benches
set cc_crafting_webhook_economy "" # express, refunds, recycling cash, card fees
set cc_crafting_webhook_progress "" # XP and tiers
set cc_crafting_webhook_facility "" # gate in / out, cards
set cc_crafting_webhook_admin "" # commands, boot summary, orphaned jobs, imports
set cc_crafting_webhook_security "" # security flags, ROLLBACK FAILED, stuck jobs
set cc_crafting_webhook_rejects "" # every refused request (throttled)ServerConfig.Logs.file = 'logs/audit.jsonl' also appends every entry as one JSON line (create the folder). ServerConfig.Logs.mute['XP gained'] = true keeps one entry on the console only. cc_lib mirrors to Fivemanage / the ox_lib logger when enabled there.
Admin (ACE cc_crafting.admin)
| Command | Does |
|---|---|
/cc_crafting_xp <id|citizenid> <processing|fabrication> <give|set> <n> | change rep (at most 100000 per command) |
/cc_crafting_jobs <id|citizenid> | a player's open jobs, orphaned and stuck ones marked |
/cc_crafting_release <jobId> | make a running job ready now (grants nothing) |
/cc_crafting_refund <jobId> | return a job's stored inputs in full and close it (owner online) |
/cc_crafting_reopen <jobId> | put a stuck job back to running |
/cc_crafting_stats | open, ready and stuck jobs, by kind |
/cc_crafting_gangbench <gang> | print a Config.GangBenches line at your feet |
/cc_crafting_import acc dry|run | import from acc_crafting / acc_manufacturing (below) |
Every command is logged to admin; a refused one (no ACE) to security.