Every file in config/ is open under the escrow, as are locales/, install/ and the two bridge files.
| File |
Loaded on |
Contents |
config/shared.lua |
Client and server |
Tiers, item groups, config benches, distances, placeable benches, queue, XP and bench looks |
config/recipes.lua |
Server only |
Every recipe and the salvage table |
config/gunsmith.lua |
Client and server |
Gunsmith slots, tints, repair prices and camera |
config/server.lua |
Server only |
Crafted weapons, scratcher, admin panel, log retention, robbery rewards, unlocks and blueprint buy-back |
config/mechanic.lua |
Server only |
Generated by glitch-mechanicJob. Ignored when that resource is not installed. |
Shared settings#
| Setting |
Default |
What it does |
Config.Debug |
false |
Debug output |
Config.BlueprintsCommand |
'blueprints' |
Player command that lists learned blueprints |
Config.StyleCommand |
'craftstyle' |
Player command that picks a bench look. nil removes the command. |
Config.ImagePath |
ox_inventory's inventory:imagepath convar |
Item pictures in the UI. On qb or ESX, set your inventory's image folder, e.g. 'nui://qb-inventory/html/images/'. |
Config.Tiers |
Seven tiers |
label, model, salvage, gunsmith, alsoMakes, ui and noSteal per tier |
Config.ItemGroups |
any_phone, any_tablet |
An ingredient that takes any one of several items |
Config.BenchModels |
11 props |
Bench props offered in the admin panel. Any other prop can be typed in. |
Config.Blueprints |
hideIngredients = true, hideUntilLearned = false |
How unlearned blueprint recipes show. The Recipes tab in /craftadmin can override this. |
Config.Categories |
9 shelves |
Order and names of the shelves in the UI |
Config.Benches |
Empty (two commented examples) |
Config benches |
Config.UseDistance |
3.5 |
How close a player must stay to a bench. The server checks it on every action. |
Config.HoursUtcOffset |
nil |
Opening hours follow the server clock. Set a UTC offset in hours to use a fixed timezone. |
Placeable benches#
| Setting |
Default |
What it does |
Config.Placeable.enabled |
true |
Bench items can be placed |
Config.Placeable.items |
workbench_basic, workbench_weapons, workbench_ammo |
Item name to tier, model and label |
Config.Placeable.perPlayer |
2 |
Benches one character can have out at once |
Config.Placeable.crewAccess |
true |
The owner's glitch-criminaltablet crew can use the bench |
Config.Placeable.minDistance |
15.0 |
Metres from any other bench |
Config.Placeable.maxRange |
6.0 |
How far from the player a bench can be put down |
Config.Placeable.spawnRange |
80.0 |
Bench props spawn for players this close |
Config.Placeable.refreshInterval |
300 |
Seconds between bench list checks on each client. 0 turns it off. Changes are also pushed at once. |
Config.Placeable.blockedZones |
{} |
{ coords, radius } spots where nobody can place a bench, checked on the server |
Queue and XP#
| Setting |
Default |
What it does |
Config.Queue.slots |
3 |
Base queue slots. The Bulk order perk adds more. |
Config.Queue.cancelRefund |
0.5 |
Share of materials returned when a running craft is cancelled |
Config.Queue.maxQuantity |
20 |
Most crafts one queue entry can hold |
Config.Queue.overtimeMax |
5 |
Most crafts in the Overtime perk's one daily craft |
Config.XP.enabled |
true |
false, or glitch-xpSystem not running: no levels, every recipe open, no XP |
Config.XP.resource |
'glitch-xpSystem' |
XP resource name |
Config.XP.category |
'crafting' |
XP category |
Config.XP.openCommand |
'xp' |
Command the bench's Skills button runs. nil makes the button do nothing. |
Config.XP.falloff |
10 levels above: 0.5, 5 levels above: 0.75 |
Less XP from recipes far below the player's level |
Config.XP.salvage |
2 |
XP per item salvaged |
Perk keys read from the Crafting skill tree: craft_speed, craft_refund, craft_cleancancel, craft_headstart, craft_queue, craft_bonus, craft_weapon_quality, craft_salvage, craft_tints, craft_quick, craft_blueprint, craft_masterwork, craft_padlock, craft_overtime, craft_lanes and craft_repair.
Bench looks#
Config.WorldUi.style is 'bench'. The other styles are 'workshop' (full-screen board), 'dock' and 'hotspots'. A bench takes its ui, then its tier's ui or its placeable item's, then this default. With allowPlayerChoice = true, benches left on default follow the player's own pick from /craftstyle. hidePed, fov, cams, board and anchors set the camera framing and the hotspot positions per prop.
Recipes#
A recipe in config/recipes.lua has id, item, count, category, tier, level, time (seconds), xp, rarity and ingredients. Optional fields:
| Field |
What it does |
blueprint |
true: must be learned from a blueprint first |
source |
Where the blueprint drops, shown to players who lack it |
teaches |
Other recipe ids learned with the same blueprint |
bpLabel |
Name on the blueprint item instead of the crafted item's label |
bpOptional, bpIngredients |
Anyone can craft it, and a learned blueprint swaps in the cheaper bpIngredients |
rep |
glitch-criminaltablet REP needed |
weekly |
How many crafts of it the whole city can queue per week |
bindOwner |
Writes the crafter's character id into the item's metadata.owner, for scripts that pair an item to its owner (glitch-criminaltablet reads it) |
hideIngredients, hideUntilLearned |
Per-recipe override of Config.Blueprints |
desc |
One line for the UI |
Config.SalvageMax is 10 items per salvage run. Each Config.Salvage entry has time (seconds per item), yields ({ item, min, max }) and an optional bench (a bench id or a tier). The shipped car parts point at a bench id burton_garage. A bench id that does not exist on your server is ignored, so change or remove it.
Gunsmith#
| Setting |
Default |
What it does |
Config.Gunsmith.enabled |
true |
Gunsmith on tiers with gunsmith = true |
Config.Gunsmith.benchOnly |
true |
Attachments can only be fitted at a bench. Removing them from the inventory screen still works. |
Config.Gunsmith.craftTimeScale |
0.25 |
Share of the recipe time for "Craft and equip" |
Config.Gunsmith.minCraftTime |
3 |
Shortest quick-craft time in seconds |
Config.Gunsmith.repair.fullCost |
750 |
Price of a repair from 0% to 100%, scaled by the condition missing |
Config.Gunsmith.repair.minCost |
50 |
Lowest repair price |
Config.Gunsmith.repair.weapons |
{} |
Per-weapon fullCost |
Config.Gunsmith.repair.accounts |
{ 'cash', 'bank' } |
Paid from the first account that has enough |
Config.Gunsmith.blacklist |
Stun gun, cans, ball, snowball |
Weapons that never show in the gunsmith |
Config.Gunsmith.slots |
8 slots |
Optic, muzzle, barrel, tactical, underbarrel, magazine, camo and finish |
Config.Gunsmith.tints |
8 normal, 32 Mk II |
Each tint can need a level, the Custom finishes perk or an unlock |
Config.Gunsmith.camera |
Table |
Camera framing at the bench |
Server settings#
| Setting |
Default |
What it does |
ServerConfig.BlueprintItem |
'crafting_blueprint' |
The blueprint item |
ServerConfig.CraftedWeapons |
serial = nil, durability = 80 |
nil gives crafted guns no serial. A string writes that serial. |
ServerConfig.Scratcher |
item = 'serial_scratcher', uses = 4, time = 8000 |
Scratcher item, guns per tool and grinding time in ms |
ServerConfig.AdminCommand |
'craftadmin' |
Admin panel command |
ServerConfig.AdminGroup |
'group.admin' |
Group given the command |
ServerConfig.AdminAce |
'command.craftadmin' |
Ace checked on every panel action |
ServerConfig.PropThumbnails |
nil |
Online thumbnails for props typed in by hand. nil means the panel makes no outside requests. |
ServerConfig.Tablet |
{ resource = 'glitch-criminaltablet' } |
resource = nil turns the tablet features off |
ServerConfig.LogRows |
6 |
Recent crafts shown on the queue page |
ServerConfig.LogRetentionDays |
90 |
Days of crafting_log kept. nil or 0 keeps everything. |
ServerConfig.BlueprintDrops, ComponentDrops, RolledByScript, CacheDrops, CaseDrops, BlueprintPity |
Tables keyed by job id |
Robbery rewards. See Robbery Rewards. |
ServerConfig.Unlocks |
finish_diamond |
One-off unlocks that are not recipes |
ServerConfig.BlueprintBuyback |
common 250 to mythic 12000, unlock 12000 |
Fence buy-back prices by rarity. A recipe can set buyback. |
Locales#
locales/en.json holds the notifications, menus, /craftstyle labels and admin panel messages. Copy it to add a language and set setr ox:locale to that code. The text inside the bench UI and the admin panel is English and lives in web/app.js, web/world.js and web/admin.js.