Skip to content

Tuning Defaults

ServerConfig.Defaults in server/server.config.lua provides the initial values written into the database on first start. After that, the database is the source of truth — edit rows there (or delete a row and run /npcsell_reload to re-seed from this file).

This page summarises what each category governs. For the exact default numbers, open server/server.config.lua directly.


Global Scalar Settings

Defaults.Settings — a flat table of server-wide tuning values.

Hiring and Economy

SettingWhat it controls
maxDealersPerPlayerHow many dealers a single player can have on their payroll at once.
hireFeeUpfront cash cost to put a dealer on payroll (paid to the server, not another player).
dealerCutPercentPercentage of collected cash the dealer keeps as their pay.
tickIntervalSecHow often (seconds) the server runs the risk/sales tick for all active dealers.
turfRadiusMinimum metres between any two active dealers' corners. Prevents overlapping turf.

Loyalty (0–100)

Loyalty governs how honest a dealer is and how hard they are to flip. Low loyalty means more skimming and weaker snitch resistance.

SettingWhat it controls
loyalty.startStarting loyalty when a dealer is hired.
loyalty.bonusPerKLoyalty gained per $1,000 in cash bonuses.
loyalty.restockGainLoyalty gained when restocked before going dry.
loyalty.dryLossPerTickLoyalty lost per tick the dealer works with an empty stash.
loyalty.bustLossLoyalty lost when cops confiscate the dealer's stash.
loyalty.maxFromBonusBonuses cannot push loyalty above this ceiling.

Heat

Heat accumulates from dealer activity and triggers police dispatch above a threshold. It decays while the dealer is quiet.

SettingWhat it controls
heat.perAmbientSaleHeat gained per ambient (ped-to-dealer) sale.
heat.perPlayerSaleHeat gained per player purchase. Player sales generate more heat.
heat.dispatchThresholdHeat level that fires a police dispatch blip.
heat.decayPerTickHeat lost per tick while the dealer is calm.
heat.dispatchText and blip settings for the dispatch alert (message, blip sprite/color/scale/flash).

Ambient Sales

Dealers make drip-sales to passing pedestrians independently of player traffic. This keeps the operation ticking over even when no players are buying, but at reduced prices once player demand goes stale.

SettingWhat it controls
ambientSales.enabledWhether ambient sales are active at all.
ambientSales.chancePerTickPercentage chance per tick that an ambient sale occurs (multiplied by the dealer's personality sell rate).
ambientSales.unitsMin / unitsMaxRange of units sold per ambient sale.
ambientSales.cooldownSecMinimum seconds between ambient sales per dealer.
ambientSales.priceFactorStreet price as a fraction of the owner's set price when player demand is fresh.
ambientSales.staleAfterSecSeconds since the last player purchase after which demand is considered stale.
ambientSales.stalePriceFactorStreet price fraction once demand has gone stale.

Stress

Dealers crack under sustained pressure. Stress builds from cops nearby and players aiming at them, and decays when the dealer is calm.

SettingWhat it controls
stress.copRadiusMetres used to check for nearby cops; cops inside stress the dealer each tick.
stress.copGainPerTickStress added per tick while a cop is within copRadius.
stress.aimGainStress added per aiming event per player (rate-limited by aimCooldownSec).
stress.aimCooldownSecMinimum seconds between stress events from the same player aiming.
stress.decayPerTickStress removed per tick when nothing is stressing the dealer.
stress.armedGainFactorMultiplier on stress gains while the dealer is armed (armed dealers keep cooler).
stress.textThresholdStress level at which the dealer texts the owner, subject to textCooldownSec.
stress.textCooldownSecMinimum seconds between stress text messages from the same dealer.
stress.desertThresholdStress level above which the dealer may desert each tick.
stress.desertChancePerTickPercentage chance per tick the dealer deserts (scales up with low loyalty).
stress.pullStressStress level at which an armed dealer may draw on a cop during a botched interaction. See Police Pressure.
stress.deathDropPercentPercentage of stock that is lootable off a killed dealer's body.
stress.lootWindowSecSeconds the body loot window stays open before cleanup.
stress.bonusReliefStress removed per cash bonus payment.
stress.visitReliefStress removed when the owner delivers product or collects earnings in person.
stress.allowedWeaponsList of weapon hashes the owner can arm a dealer with.
stress.maxAmmoMaximum rounds the owner can load into a dealer.
stress.aimReactionIf true, armed dealers aim back at players who target them; unarmed dealers cower.

Flee

A stressed dealer who spots a cop will bolt and try to lose them.

SettingWhat it controls
flee.thresholdStress at or above which a nearby cop triggers flight.
flee.clearThresholdStress below which (with no cop nearby) the dealer calms down.
flee.fleeRadiusMetres used to check for cops that trigger flight.
flee.fleeDurationMilliseconds between flight task re-issues (keeps the flee going).

Sellable Items (Defaults.Items)

A whitelist of inventory item names with price bounds. The owner sets the actual street price within [minPrice, maxPrice]; suggested is shown as a hint in the burner UI.

Default seeded items:

ItemMin priceMax priceSuggested
weed_baggy$40$180$90
coke_baggy$90$400$220
meth_baggy$80$350$190
oxy$25$120$60

Add items at runtime with the admin dashboard or /npcsell_additem. Item names must match real ox_inventory items.


Corners (Defaults.Corners)

Working spots where dealers are assigned to sell. Each corner has a label, coordinates, heading, and idle scenario. The five default corners cover Grove Street, Forum Drive, Vespucci Canals, Mirror Park, and Davis/Roy Lowenstein.

Edit or add corners via the admin dashboard after first start.


Hire Spots (Defaults.HireSpots)

Locations where recruiters are placed for players to hire dealers. Each spot has a label, coordinates, heading, and ped model. The two default hire spots are the alley behind Vanilla Unicorn and the Yellow Jack backlot.

Add more spots using the /addrecruiter placement editor (see Recruiters & Spots).


Personalities (Defaults.Settings.personalities)

Each dealer rolls one of four hidden personality types at hire. Personality is never visible to the owner and affects how the dealer behaves over time.

PersonalityCharacter
loyalReliable, honest, slow seller, very hard to flip.
greedyFast seller, frequent skimmer, lies about earnings, moderate snitch resist.
cowardSlow seller, occasionally skims, tells everything to a cop, prone to desertion.
snakeDecent seller, heavy skimmer, lies often, moderate snitch resist, will flip.

Each personality has a spawn weight (controlling how often it's rolled), a sell-rate multiplier, skim/lie/snitch/robbery chance values. Adjust these in Defaults.Settings.personalities to shift the overall character of dealers on your server.


Dealer Models (Defaults.Settings.dealerModels)

Pool of base-game ped model names used when spawning dealers. A model is picked randomly from this list at hire. Invalid model names fall back to a default. Keep this list to valid, verified base-game ped models.

Robicore