Skip to content

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:

FileWho reads itHolds
config.luaevery player (it is downloaded)stations, kinds, features, labels, categories, which tier unlocks each recipe
server/config.luathe server onlyinputs, 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

KeyTypeDefaultEffect
Presetstring | nilnilload presets/<name>.lua over these defaults (or setr cc_crafting_preset "<name>")
Features.batchesbooltruejobs of more than one batch
Features.cancelbooltruecancel for a quoted loss
Features.expressbooltruepay to halve the time left
Features.recyclingbooltruerecycling stations
Features.progressionbooltrueXP, tiers and perks (off: everything unlocked, no XP)
Features.toolsbooltruetool wear (off: tools are not needed)
Features.facilitybooltruegatekeeper, card and card-gated kinds
Features.gangBenchesbooltrueGangBenches
Features.readyNoticesbooltrueready notice + login notice
Features.remindersbooltruerepeat notices for uncollected jobs
Features.blipsboolfalsemap blips per kind (Blips)
Features.helpCardbooltruethe first-open help card
Collect'kind' | 'station''kind'where a job collects
UI.accenthex#1c2434the panel's one theme colour
OpenDelayMsms0a "setting up" bar before the panel opens
Target.icon / distancetarget option look and reach
SpawnDistancemetres60peds and props exist only this close
SpawnPropsbooltruefalse when your map already has benches
ItemLabels{ [item] = label }{}display names (needed where the inventory has none to read)
Blipsper kindsprite, colour, scale
Kindstable9 kindstrack, label, catalogue, card, minTier, gang, instant, anim
Stationslist16id, kind, label, coords, heading, ped, prop, zone, minTier
GangBenches{ [gang] = { coords, heading, minGrade } }emptypaste from /cc_crafting_gangbench <gang>
Facilitytablecard, minTier, teleport, gatekeeper, entrySpawn, exit, exitSpawn, fadeMs
Categorieslistpanel tabs (label key category.<id>)
Recipeslist21id, kind, category, tier. The order is the index clients send: append only

server/config.lua

KeyEffect
TiersXP at which each of the 5 tiers starts
ProcessingPerksper tier: timeDiscount, batchCap, expressCut
Queuejob limits, batch caps, time formula, caps, station distance, quote lifetime
Cancelbase, step, every, max of the cancel loss
ToolsmaxDurability, nilIsFull (a tool with no durability: full, or unusable)
Facilitygate distance, replacementFees, feeAccount
GangspeedExport (a gang resource's perk export), minMult, maxMult
NotifypollSeconds, remindMinutes, phoneApp
Webhooksread from convars, see Logs
Logsusername, rejectThrottleMs, adminXpCap, pruneDays, file, mute
Recipesper recipe: kind, tier, seconds, inputs, outputs, tools, xp, express / cash

Adding a recipe

  1. Append { id = 'my_item', kind = 'workshop', category = 'tools', tier = 1 } to the END of Config.Recipes.
  2. Add my_item = { kind = 'workshop', tier = 1, seconds = 300, inputs = { { 'steel', 2 } }, outputs = { { 'my_item', 1 } }, xp = 3, express = 200 } to ServerConfig.Recipes.
  3. 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.

FileCoverage
en.jsonevery string (200)
de.json, es.json, fr.json, pt.jsonthe 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

KeyTypeDefaultEffect
HideWhenStatelist 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)

CommandDoes
/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_statsopen, ready and stuck jobs, by kind
/cc_crafting_gangbench <gang>print a Config.GangBenches line at your feet
/cc_crafting_import acc dry|runimport from acc_crafting / acc_manufacturing (below)

Every command is logged to admin; a refused one (no ACE) to security.