Skip to content

Configuration

There are two config files, and the split matters:

There are two config files, and the split matters:

FileWho can read itWhat goes in it
config.luaEvery player. It is sent to every client.Models, the recycler's position, effects, hide rules, UI colours
server/config.luaThe server onlyLoot 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)

KeyTypeDefaultWhat it does
DebugboolfalseExtra console logging
Presetstring'default'Loads presets/<name>.lua over server/config.lua (see Presets)
Features.*boolall trueSwitch a feature off: hazards, gloves, careful, areas, dispatch, progression, hide, recycler, shop, wallet, panel, board
TargetDistancenumber2.0How close a player must be to see the target option
Interactionstring'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
Kindslistdumpster, binModel names for each kind, an icon, and canHide. The server maps a model to its kind
Search.animtablebin rummageThe animation played while searching
Search.carefultable3 stagesSkill-check difficulty and keys. Set enabled = false to skip it
Search.pickedMemoryseconds120How long the client remembers a "picked clean" answer, to save a round trip
Hazards.*tableHow each hazard looks and hurts: damage, screen effect, peds
Hide.*table10 minTime limit, keys and camera offset for hiding
Police.jobs{ job = minGrade }{ police = 0 }Who can check inside a dumpster and who receives dispatch
Recycler.*tableRogers SalvagePed model, coordinates (vec4), scenario and blip
GloveItem, WalletItemstringwork_gloves, lost_walletItem names
UI.*hex coloursblueThe accent colours of the panel and find card
Tierslistfive tiersTier order. The names come from the locale
Commandstring'scavenger'The panel command. Set '' for none

server/config.lua (secret)

Kinds

ServerConfig.Kinds[i] matches Config.Kinds[i]:

KeyDefault (dumpster / bin)What it does
durationMs9000 / 5000Search length. The server enforces it
rolls{2,3} / {1,2}How many loot rolls
emptyChance0.15Chance each roll finds nothing
tramptrue / falseWhether 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

KeyDefaultWhat it does
refillMinutes{ 20, 35 }A picked dumpster stays empty for everyone for this long
mergeRadius1.6A 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
cellSize32.0Size 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.

KeyDefaultWhat it does
reach3.0Distance from the player's own server position to the claimed dumpster
finishReach4.0The player must still be this close when the search finishes
floor0.85A finish earlier than duration x floor is refused and flagged
ticketGraceMs20000The search ticket lives for the duration plus this
cooldownMs2500Gap between one search ending and the next starting
softCapPerHour45After this many searches in a rolling hour, the trash "runs thin"
softCapEmpty0.55Extra empty chance past the soft cap
hardCapPerHour90Refused outright past this, and flagged
newSpotsPerHour60Brand-new dumpster spots one character may open per rolling hour. 0 turns it off
densityRadius, densityMax6.0, 3At 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.

lua
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

KeyWhat it does
XP.search, XP.tier[tier], XP.hazardXP per search, per find of each tier, per hazard
LevelsXP needed for each level. Ascending, starting at 0
Perks.speed / safety / eye / extraRollper level above 1, up to max

Recycler

KeyDefaultWhat it does
reach3.0How close the player must be to sell or buy
buysjunk itemsitem = cash each. Keep it to junk, so it does not undercut your crafting or pawn scripts
hourlyCap6000Cash 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
shopgloves for 180{ item, count, price } lines the recycler sells

Wallet, hide, dispatch, logs

TableKeys
Walletcash = { min, max }, bonusChance, bonusItem (nil for none)
Hidereach, checkReach (police), perDumpster
Dispatchcode, blip. Title and text come from the locale; set title to override
Logsusername and channels.economy / finds / security / admin. Each channel is the name of a set convar (recommended) or a webhook URL
LogTierThe lowest tier that is logged to the finds channel
PayAccountThe 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.

lua
-- 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

ConvarSet withDefaultWhat it does
cc_dumpster_localesetrenLanguage (locales/<code>.json)
cc_dumpster_log_economy / _finds / _security / _adminsetWebhook 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).