Configuration
There are two config files, and the split matters:
There are two config files, and the split matters:
| File | Who can read it | What goes in it |
|---|---|---|
config.lua | Every player. It is sent to every client. | Models, the recycler's position, effects, hide rules, UI colours |
server/config.lua | The server only | Loot tables, odds, durations, prices, caps, XP and webhooks |
Never move a price, a loot table or a webhook into config.lua. Both files are left open (not escrowed), so you can edit everything.
The server checks both files on start. A value out of range prints one line naming it. A missing or broken table prints one line, and the resource then refuses requests until you fix it, rather than paying out from a half-read config.
config.lua (public)
| Key | Type | Default | What it does |
|---|---|---|---|
Debug | bool | false | Extra console logging |
Preset | string | 'default' | Loads presets/<name>.lua over server/config.lua (see Presets) |
Features.* | bool | all true | Switch a feature off: hazards, gloves, careful, areas, dispatch, progression, hide, recycler, shop, wallet, panel, board |
TargetDistance | number | 2.0 | How close a player must be to see the target option |
Interaction | string | 'auto' | 'auto' uses the target script cc_lib found, or an [E] prompt when there is none. 'target' always uses the target script. 'prompt' always uses the key prompt |
Kinds | list | dumpster, bin | Model names for each kind, an icon, and canHide. The server maps a model to its kind |
Search.anim | table | bin rummage | The animation played while searching |
Search.careful | table | 3 stages | Skill-check difficulty and keys. Set enabled = false to skip it |
Search.pickedMemory | seconds | 120 | How long the client remembers a "picked clean" answer, to save a round trip |
Hazards.* | table | How each hazard looks and hurts: damage, screen effect, peds | |
Hide.* | table | 10 min | Time limit, keys and camera offset for hiding |
Police.jobs | { job = minGrade } | { police = 0 } | Who can check inside a dumpster and who receives dispatch |
Recycler.* | table | Rogers Salvage | Ped model, coordinates (vec4), scenario and blip |
GloveItem, WalletItem | string | work_gloves, lost_wallet | Item names |
UI.* | hex colours | blue | The accent colours of the panel and find card |
Tiers | list | five tiers | Tier order. The names come from the locale |
Command | string | 'scavenger' | The panel command. Set '' for none |
server/config.lua (secret)
Kinds
ServerConfig.Kinds[i] matches Config.Kinds[i]:
| Key | Default (dumpster / bin) | What it does |
|---|---|---|
durationMs | 9000 / 5000 | Search length. The server enforces it |
rolls | {2,3} / {1,2} | How many loot rolls |
emptyChance | 0.15 | Chance each roll finds nothing |
tramp | true / false | Whether the tramp hazard can happen at this kind |
Keep the value per minute equal across kinds: average rolls x (1 - emptyChance) / seconds. The model is still a client claim, so a cheater who claims "dumpster" at a bin should get a longer search, not a richer one.
World
| Key | Default | What it does |
|---|---|---|
refillMinutes | { 20, 35 } | A picked dumpster stays empty for everyone for this long |
mergeRadius | 1.6 | A claim this close (in metres) to a known dumpster is that dumpster. Keep it under 2.2, because two dumpsters side by side are about 2.2 m apart |
cellSize | 32.0 | Size of the spatial buckets. You do not need to change it |
Guard (anti-cheat)
These are floors that keep the economy honest. Loosening them does not make the script friendlier. It makes it farmable.
| Key | Default | What it does |
|---|---|---|
reach | 3.0 | Distance from the player's own server position to the claimed dumpster |
finishReach | 4.0 | The player must still be this close when the search finishes |
floor | 0.85 | A finish earlier than duration x floor is refused and flagged |
ticketGraceMs | 20000 | The search ticket lives for the duration plus this |
cooldownMs | 2500 | Gap between one search ending and the next starting |
softCapPerHour | 45 | After this many searches in a rolling hour, the trash "runs thin" |
softCapEmpty | 0.55 | Extra empty chance past the soft cap |
hardCapPerHour | 90 | Refused outright past this, and flagged |
newSpotsPerHour | 60 | Brand-new dumpster spots one character may open per rolling hour. 0 turns it off |
densityRadius, densityMax | 6.0, 3 | At most this many of a character's own picks within this radius of a new claim |
All hourly counters are keyed by character, so relogging does not reset them.
Loot
ServerConfig.TierWeights sets the relative weight of each tier. ServerConfig.Loot[tier] is a list of { item, min, max, weight }. The item money pays cash into PayAccount instead of giving an item.
ServerConfig.Loot.rare = {
{ 'rolex', 1, 1, 30 },
{ 'money', 400, 900, 25 },
}The console names any loot item your inventory does not know.
Areas
Each area has id, center (vec3, z is ignored), radius, tiers (multipliers on the tier weights) and watch (chance per search that a resident calls it in to dispatch). The first match wins. The server measures where the player is; the client never names an area.
Hazards and gloves
ServerConfig.Hazards is rolled once per search, in order; the first hit wins. gloves and careful multiply the chance where they are set. ServerConfig.Gloves.breakChance is the chance per search that worn gloves tear.
Progression
| Key | What it does |
|---|---|
XP.search, XP.tier[tier], XP.hazard | XP per search, per find of each tier, per hazard |
Levels | XP needed for each level. Ascending, starting at 0 |
Perks.speed / safety / eye / extraRoll | per level above 1, up to max |
Recycler
| Key | Default | What it does |
|---|---|---|
reach | 3.0 | How close the player must be to sell or buy |
buys | junk items | item = cash each. Keep it to junk, so it does not undercut your crafting or pawn scripts |
hourlyCap | 6000 | Cash per character per rolling hour |
cardValue | {} | item = cash value. A find in this list (such as a scratch card your lottery script pays out) counts against hourlyCap. Once the cap is full, it is not found |
shop | gloves for 180 | { item, count, price } lines the recycler sells |
Wallet, hide, dispatch, logs
| Table | Keys |
|---|---|
Wallet | cash = { min, max }, bonusChance, bonusItem (nil for none) |
Hide | reach, checkReach (police), perDumpster |
Dispatch | code, blip. Title and text come from the locale; set title to override |
Logs | username and channels.economy / finds / security / admin. Each channel is the name of a set convar (recommended) or a webhook URL |
LogTier | The lowest tier that is logged to the finds channel |
PayAccount | The account the recycler, wallets and cash finds pay into (cash or bank) |
Presets
Config.Preset = 'myserver' loads presets/myserver.lua on the server. The preset runs against an empty ServerConfig, and every top-level table it sets replaces the default table of the same name. A preset that only sets ServerConfig.Loot changes the loot and nothing else.
-- presets/myserver.lua
ServerConfig.Recycler = {
reach = 3.0,
buys = { garbage = 5, tin_can = 12 },
hourlyCap = 8000,
cardValue = {},
shop = { { item = 'work_gloves', count = 1, price = 250 } },
}Keep your economy in a preset and it survives every update untouched.
Convars
| Convar | Set with | Default | What it does |
|---|---|---|---|
cc_dumpster_locale | setr | en | Language (locales/<code>.json) |
cc_dumpster_log_economy / _finds / _security / _admin | set | Webhook URLs. The names are set in ServerConfig.Logs |
Theming
Config.UI sets the accent colours at runtime. Everything else is in the :root block of web/style.css, which ships open.
Locales
locales/en.json, de.json, es.json and fr.json ship complete. A key missing from your language falls back to English one key at a time. To add a language, copy en.json to .json, translate the values, and setr cc_dumpster_locale.
custom/
custom/server.lua and custom/client.lua are never escrowed and load last. Custom.onSearch(src, result) runs after every search. The client file can replace any hazard effect (for example Hazards.needle = function() ... end).