shared/. Three files, all hot-editable — restart the resource to apply.
shared/config.lua — core resource
Currency
Marketplace generation
dripIntervalMs, a new listing is added — picked from the registry weighted by each contract’s weight field. Generation pauses once the marketplace hits maxListings. Listings older than listingExpiryMs are removed by a background sweep that runs every expirySweepIntervalMs.
On a fresh boot the marketplace starts empty and the first listing appears after
dripIntervalMs. There’s no initial fill — by design, so a server restart doesn’t wipe and re-spawn a fresh catalog at the same time. Lower the interval temporarily if you need listings now for testing.Contract rarity (per-contract weight)
Each contract template can declare an optionalweight field (default 1.0) controlling how likely it is to be picked when the marketplace adds a new listing. Higher weight = more common, lower = rarer.
1.0, 0.5, 0.5, the first is picked 50% of the time and the others 25% each.
The same contract can appear as multiple listings simultaneously — each listing is its own unique instance with its own listingId. Buying a Fleeca doesn’t stop another Fleeca listing from existing or being bought by someone else.
Slots
Invite expiry
XP / leveling
The XP curve is configurable two ways. Quadratic by default:base * (N - 1) ^ exponent. With the defaults:
For an explicit table, set
requirements:
0. Past the end, the last delta repeats — in the example above, level 7 needs 2200 + (2200 - 1200) = 3200.
The dashboard’s level ring is rendered server-side per profile, so curve changes flow through automatically — no client-side curve duplication.
Debug
utils.dprint (server-side [DEBUG] logging). Default is off; flip to true when investigating drip/expiry behaviour or entry-point errors locally.
shared/marketplace_config.lua — items + pickups
Two top-level tables: items (what’s for sale) and locations (where the player has to go to claim a checkout).
Items
Locations
On checkout, the server picks one location uniformly at random and starts a timer to drop the pickup if it’s not claimed.
Multiple checkouts by the same player while a pickup is still active merge into the existing pickup instead of rolling a new location. Item quantities are summed; the original deadline is preserved.
shared/training_config.lua — training sandbox
0 to make access free.
Minigames list
Each entry is one practice card in the dashboard’s Training tab.
A lookup index
config.byId is built once on require. Don’t mutate it directly; rebuild by editing config.minigames and restarting.