Everything is in config.lua, with a comment on each block. Player text is in locales/en.lua.
Main blocks#
| Block | What it does |
|---|---|
Config.Locale, Config.Debug |
Language file ('en') and debug output (false). |
Config.TestingMode |
Skips the minigames and ends a cook after Config.TestingCookSeconds (5). The daily cap is ignored. Default false. Never leave it on for a live server. |
Config.RVs |
Vehicle models that can cook. Default { 'journey', 'camper' }. |
Config.Location |
openSky (true), skyCheck (25.0), minRoadDistance (0.0) and minY (nil). The first three are measured by the cook's client and are soft checks. minY is checked on the server. |
Config.Precursors |
What each cook uses up: 5 methylamine, 2 acetone, 2 lithium and 2 red phosphorus. |
Config.Cook |
Rounds, timings, purity, bags, explosion and alert chances, grace periods, XP, tray and bag items, the hammer list and the bonus drop. |
Config.Smoke |
The plume. Each row is one looped particle effect on every client in range. |
Config.Battery |
car_battery gives 2 lithium in 6000 ms. |
Config.Chemist |
Contact id, trust, unlock gate, fallback ped, range, purchase cap and the shop list. |
Config.Equipment |
Burner and condenser items, effects and wear. |
Config.LabGrade, Config.BlueMeth |
Lab-grade methylamine and blue crystal. |
Config.Integrations |
Optional resources, each off until the named resource runs. |
Config.Tablet, Config.XP, Config.Thermal |
Tablet, XP and thermal camera settings. |
Config.Account, Config.DirtyMoney |
The account the Chemist charges ('dirty') and the item behind it (black_money). |
Config.Alerts, Config.PoliceJobs |
The dispatch alert and who counts as police. |
Cook settings#
Key (Config.Cook) |
Default | Meaning |
|---|---|---|
rounds |
8 |
Minigame rounds per cook. |
roundEvery |
120 |
Seconds between rounds. The chem_time perk shortens it. |
minRoundEvery |
45 |
The perk never takes the gap below this. |
firstRoundDelay |
20 |
Seconds from the start to the first round. |
roundTimeout |
120 |
Seconds a round may stay open before it counts as failed. |
purityMin / purityCap |
40 / 90 |
Purity range. The chem_purity perk adds 3 percent per rank, up to 99. |
helperBonus |
5 |
Purity cap bonus when another player sits in the RV at the end. |
bags |
{ 40, 60 } |
Bag range. The chem_yield perk adds 5 percent per rank. |
botched |
0.35 |
A score below this is a botched cook. |
explodeChance |
0.5 |
Explosion chance on a botched cook. |
alertChance / stolenAlert |
0.15 / 0.30 |
Police alert chance for the cook's own RV, and for an RV that is not theirs. |
alertDelay |
{ 60, 240 } |
Seconds after the start that the alert goes out. |
smokeRange |
1000.0 |
Metres the plume shows for. |
dailyCap |
5 |
Cooks per character per day. The chem_cooks perk adds one. |
warnBefore / grace |
30 / 30 |
Seconds of warning before a check, and of grace after it is due. |
moveLimit / cancelRange |
8.0 / 8.0 |
Metres the RV may shift before the batch spills, and the range to cancel from. |
xp |
{ 150, 350 } |
Chemistry XP from lowest to highest purity. |
tray / bag |
meth_tray / meth |
Output items. |
breakTime |
8000 |
Milliseconds spent breaking a tray into bags. |
breakTools |
{ 'hammer', 'WEAPON_HAMMER' } |
Any one of these in the pockets. It is not used up. |
bonusDrop |
filter_cartridge, 1, 10 percent |
Extra item after a finished cook. Set false to turn it off. |
Minigames#
Config.Cook.minigameResource names the minigame resource ('glitch-minigames'). The temperature round calls StartBalanceGame and the pressure round calls StartHoldZoneGame, with the args in Config.Cook.temperature and Config.Cook.pressure. Each has a minSeconds value: a won round that comes back faster counts as failed and is logged. When the minigame resource is not running, the fallback entry drives an ox_lib skill check with its own minSeconds.
The Chemist#
Key (Config.Chemist) |
Default | Meaning |
|---|---|---|
contactId |
'chemist' |
glitch-criminaltablet contact id. |
minTrust |
0 |
Tablet trust needed to buy. Every purchase adds 1 trust. |
unlock |
nil |
Set to { jobId = 'humane_labs', count = 2 } only while glitch-humaneHeist runs. Tablet only. |
fallback |
s_m_m_scientist_01 |
Ped model and coordinates used when the tablet is not running. |
range |
4.0 |
Metres from the Chemist to buy. |
maxBuy |
50 |
Most of one item per purchase. |
shop |
see below | Items and prices. |
Default shop prices, in dirty money:
| Item | Price | Min trust | Max |
|---|---|---|---|
methylamine |
150 | Config.Chemist.minTrust |
none |
acetone |
120 | Config.Chemist.minTrust |
none |
red_phosphorus |
500 | Config.Chemist.minTrust |
none |
cook_burner |
4500 | 40 | 1 |
cook_condenser |
7500 | 50 | 1 |
Equipment, lab grade and blue crystal#
Config.Equipment.burnerwidens the sweet spot bysweet = 0.15and wears10percent durability per cook.Config.Equipment.condenseraddspurity = 3, scales the plume bysmoke = 0.4, cuts the alert byalert = 0.20and wears10per cook. The alert cut stacks with thechem_alertperk, capped atConfig.XP.maxAlertCut(0.40).Config.LabGradeswaps regular methylamine formethylamine_labwhen the player carries enough of it, and addsyield = 0.15more bags. Set it tofalseto turn it off.Config.BlueMethmakesblue_methatminPurity = 99or better. WithneedsLabGrade = trueonly a lab-grade cook can come out blue.
Optional resources#
Key (Config.Integrations) |
Used for |
|---|---|
research |
exports[resource]:ResearchBonus(src) returns extra purity cap. |
cousinHint |
exports[resource]:CousinHint(src, 'cook') points the player at a buyer after a cook. |
economyLedger |
exports[resource]:LogCrime(src, data) for items handed out or taken. |
adminLog |
exports[resource]:Log({ ... }) for exploit entries. Channel and category come from Config.AdminLogWebhook and Config.AdminLogCategory. |
testingFlag |
Global state bag key that lets everyone skip police and job blocks while staff test. |
Each entry holds the resource name when that resource exists on the server and false when it does not. Set an entry to false to turn it off, or to your own resource name to replace it.
XP and perks#
Config.XP.resource ('glitch-xpSystem') needs the exports AddPlayerXP(src, category, amount) and GetEffect(src, perk). XP goes to the chemistry category, and a cook that blows up pays failShare (0.25) of the lowest amount. The perks read are chem_time, chem_sweetspot, chem_purity, chem_yield, chem_save, chem_smoke, chem_alert, chem_explosion, chem_cooks and chem_signature.
Locales#
Copy locales/en.lua to locales/<code>.lua, translate the values and set Config.Locale = '<code>'. Keep the keys and the %s and %d markers.