Configuration ​
shared/config.lua holds the core settings; every module keeps its own in shared/config/<module>.lua. Every file is
commented. All of them are shared (client and server), so nothing secret goes in there: the MDT key is a convar
(Installation → MDT). Every number is a starting value; tune it for your server.
With np_admin running, the main tunables are also editable in game on its Resource settings page under Drugs (see Editable in np_admin).
| File | What |
|---|---|
shared/config.lua |
Framework, Inventory, MDT, Locale, Integrations, Jobs, staff without np_admin (AdminGroups, Admins, AdminDiscordRoles), AdminLog, StandaloneJobs, Actions.workSpeed, rate limits, DirtyCash, ImagePath, TrustedResources, keys, distances |
substances.lua |
The eight substances: class, unit, dose, price, load, methods, detection windows, craving, withdrawal, addiction, K9 strength, portions; Grades, Phases |
items.lua |
Every item np_drugs adds; containers with capacity, fill line, cover and safe minutes |
batch.lua |
Tools, cut limits (filler, fentanyl mg per gram), bagging time |
stamps.lua |
Personal stamp designs, how fast reputation moves, tiers and their price factors, bad batch penalty |
sale.lua |
Sale limits, the price ceiling for hooks, unbatched grade, opened portions, passer-by overdoses, pending payouts |
demand.lua |
Demand per area and substance |
production.lua |
Lines, stages and the skill model, equipment, where labs may stand, purity weights, fumes, smell, fire, receipts, power meters, shops |
conceal.lua |
Surfaces (props, benches, car hoods), seals, cover rules, decoy lots |
carry.lua |
The container actions, cutting open, trunk wear, the cooler, smell |
use.lua |
The picker, partial doses, tools, the used syringe, animations |
effects.lua |
Per substance upside, downside and comedown, mixing rules, screen profiles, client numbers, commands |
body.lua |
The body clock, load meter, line, tolerance steps, lineMax, stages |
addiction.lua |
Tolerance per dose and its fade, settleHours, dependence, cravings, withdrawal |
overdose.lua |
Time to critical, kill or hold, signs, vitals |
ems.lua, medical.lua |
Tray, treatments, the spray, the tox kit, bad batch alerts, reportToPolice; the record and the MDT mapping |
rehab.lua, vitals.lua |
Days, pace, clinics and meetings, substitute, sponsor, certificate; the phone app |
hud.lua |
The tile strip and the load meter, and the np_hud zones they claim |
search.lua |
Training levels, the chance factors, consent, evidence case numbers, the police terminal |
k9.lua |
The leash, dog peds, alert chances |
tests_kit.lua |
Kits, limits, swab panels, who may draw blood |
trash.lua |
Bin and dumpster models, the 24 h clear, digging, the throw action, sanitation areas, routes, pay, the heavy package |
street.lua |
Buyers, wallets, the walk-away line, haggling, robberies, witness calls, heat |
dispatch.lua |
The adapter (built-in, ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch or the event only), delays, kinds and codes |
Core (shared/config.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Framework |
'auto' |
'esx', 'qbx', 'qb', 'standalone' (auto: es_extended > qbx_core > qb-core) |
Config.Inventory |
'auto' |
'np', 'ox', 'qb', 'esx', 'none' (auto: np_inventory > ox_inventory > qb-inventory) |
Config.MDT |
'auto' |
'stempeluhr' or 'none'; the URL and key are convars |
Config.Locale |
'en' |
'en' or 'de' |
Config.AutoCreateTables |
true |
Create the tables at start |
Config.Integrations.<name> |
'auto' |
Optional siblings only (np_npchandler and np_prophandler are required, no toggle): np_inventory, np_hud, np_menu, np_phone, np_character, np_shops, md-stempeluhr, np_discord, np_admin: 'auto' = used when it runs, true = the same with a warning when missing, false = always the built-in fallback |
Config.Jobs |
police, medic, sanitation | { group = { job = minGrade } }. See Installation → Jobs |
Config.AdminGroups / Admins / AdminDiscordRoles |
{ 'admin', 'superadmin', 'god' } / {} / {} |
Staff without np_admin. See Installation → Permissions |
Config.AdminLog |
batch_import, search_teach, search_seized, overdose_critical, ems_report |
np_drugs log entries that also go to np_admin's audit log (exact names, or Lua patterns starting with ^). Staff actions always go there |
Config.StandaloneJobs |
{} |
Standalone only: [identifier] = { job, grade } |
Config.RateLimit |
{ perSecond = 8, burst = 16, maxPayload = 8192 } |
Token bucket per player for every RPC |
Config.DirtyCash |
{ item = 'black_money', account = 'black_money' } |
ESX uses the account, everything else the item |
Config.ImagePath |
'nui://np_inventory/web/images/' |
Item pictures in np_drugs' screens: <ImagePath><item>.png |
Config.TrustedResources |
{ 'np_gangs' } |
Resources that may ask GetItemInfo for the contents of concealed items (opts.reveal). Add np_prison so packed products count as contraband there |
Config.Keys |
{ interact = 'E', cancel = 'X' } |
Key mapping defaults; players rebind them |
Config.Actions.workSpeed |
{ min = 0.5, max = 1.5 } |
Bounds for work actions sped up by the body (meth); false = never |
Config.TimerTick / SaveInterval |
15 / 60 |
Seconds between timer checks; write-behind of body states and stamps |
Substances (substances.lua) ​
| Substance | Class | Unit · dose | Price / unit | Methods | Portions |
|---|---|---|---|---|---|
| Alcohol | alcohol (legal) | drink · 1 | 12 | drink | moonshine (4), moonshine_jug (40) |
| Tobacco | nicotine (legal) | cig · 1 | 1 | smoke | cigarettes (20) |
| Weed | cannabis | g · 0.5 | 14 | smoke (rolling paper), swallow | joint, weed, weed_bag, weed_brick |
| Cocaine | stimulant | g · 0.25 | 75 | snort, smoke (pipe), inject (syringe) | cocaine_bag_s, cocaine_bag, cocaine_bag_l, cocaine_brick |
| Ecstasy | empathogen | pill · 1 | 22 | swallow | ecstasy_pill, ecstasy_bag, ecstasy_bag_l, ecstasy_jar |
| Meth | stimulant | g · 0.2 | 65 | smoke (pipe), snort, inject (syringe) | meth_bag_s, meth_bag, meth_bag_l, meth_brick |
| Heroin | opioid | g · 0.1 | 90 | inject (syringe), smoke (pipe), snort | heroin_bag_s, heroin_bag, heroin_bag_l, heroin_brick |
| Fentanyl | opioid | g · 0.002 | 400 | inject (syringe), snort, swallow | fentanyl_powder (bulk), fentanyl_vial (medical stock) |
Each substance also sets load (load-meter points of one dose at 100 % purity), detection (minutes a breath, swab or
blood test still finds it), craving (minutes between cravings once hooked), withdrawal and addiction (1..5) and
k9 (how well a dog finds it). legal = true on weed changes the swab panel, the K9 rule (Config.K9.legalWeed) and
the sale.
Config.Grades: A ≥ 80 % (price × 1.0), B ≥ 60 (× 0.8), C ≥ 40 (× 0.6), D (× 0.4). Config.Phases splits a method's
duration into onset 10 %, peak 55 %, comedown 35 %.
Product ​
| Option | Default | Description |
|---|---|---|
Config.Batch.tools |
scale drug_scale, baggies, filler cutting_agent, fentanyl fentanyl_powder, test kit purity_test_kit |
The scale opens the batch table; one baggie per portion |
Config.Batch.filler |
{ maxPct = 100, noticePct = 60 } |
Filler as a share of the original weight; buyers notice from noticePct |
Config.Batch.fentanyl |
{ maxPerGram = 8.0, safePerGram = 2.0, potencyPerMg = 6.0 } |
Fentanyl as a cut, mg per gram of the finished product |
Config.Stamps.designs |
Crown, Bolt, Dragon, Ghost, Skull, Spade, Star, Fire | Personal stamp designs; one dealer per design |
Config.Stamps |
startScore = 50, minUses = 10, alpha = 0.04, npcWeight = 0.25 |
How reputation moves; a passer-by's high counts a quarter |
Config.Stamps.badBatchPenalty / badBatchThreshold |
15 / 2 |
Score lost per bad batch; overdoses on one batch before it counts as bad |
Config.Stamps.tiers |
trusted ≥ 80 (× 1.10), known ≥ 60 (× 1.05), neutral ≥ 40, shaky ≥ 20 (× 0.90), burned (× 0.75) | Price factor per tier; no stamp × 0.95 |
Config.Conceal.surfaces |
required = true, table and counter props, car hoods, benches = {} |
What counts as a bench |
Config.Conceal.seals |
glue 85 %, tape 55 % | The first one in the pockets is used |
Config.Conceal.containers |
per container: rattle, maxSame, odd hours |
Situational cover (a cold pizza at 4 am, six cans on one person) |
Config.Conceal.decoyLots |
true |
Ordinary containers carry a lot id too, so the key gives nothing away |
Config.Carry.wear |
burstPerMinute = 0.04, poorSeal = 50 (× 0.5), heatFactor = 1.5, crashChance = 0.15, cooler = 'cooler', coolerMode = 'trunk' |
Trunk wear (Product loop) |
Config.Carry.heat |
sunny weathers, 11:00 to 18:00 | When a car counts as hot; hot = function() … end overrides |
Production (production.lua) ​
| Option | Default | Description |
|---|---|---|
sites.custom |
nil |
function(src, coords, bucket) returning { id, kind = 'property' | 'garage', label } or false: wire your housing here |
sites.fixed |
Sandy Shores shack, Carson Ave garage, Paleto barn | Places that always allow a lab |
sites.interiors / anywhere |
true / false |
Inside an instance (routing bucket ≠ 0) counts; anywhere else |
purity |
min = 20, max = 96, weights ingredients 0.30, equipment 0.20, care 0.35, practice 0.15 |
Worn equipment also caps it |
practiceRuns / rushGrades / equipmentWear |
25 / 1 / 6 |
Runs until practice is full; grades a rushed stage costs; wear per run |
fumes |
cough = 60, down = 100, traceMinutes = 240 |
Without a respirator: health ticks and a trace every test finds |
smell, fire, trail, meter |
see file | Smell on clothes 20 min; a boil-over burns 45 s; receipts kept 14 days; meters within 40 m, idle 0.4 kW |
shops |
npd_pharmacy, npd_hardware, npd_grocery, npd_backroom (dirty cash) |
Supplies; trail = true keeps receipts. np_shops shops when np_shops runs |
lines |
grow, process, cook, refine, press, distil | Sets, yield, ingredients, stages (Production); a stage's minigame = { preset, difficulty, seconds } or false |
Config.Minigames (same file) plays attended stages in np_minigames while it runs: enabled, mode
(checks / once / off), game, every, maxChecks, seconds, difficulty per preset, worn, practiced,
grace. See Production → Lab minigames.
Selling (sale.lua, demand.lua, street.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Sale.maxCount / cooldown |
50 / 1500 ms |
Items per sale; time between two sales of one seller |
Config.Sale.priceCeiling |
8.0 |
A sale never pays more than base price × this (0 = no ceiling). Caps what beforeSale hooks can make |
Config.Sale.unbatchedGrade |
'C' |
Grade of drug items without a batch; false = cannot be sold |
Config.Sale.opened |
0.8 |
An opened portion sells for what is left × this; false = not at all |
Config.Sale.npc |
{ rate = true, overdoseBase = 0.0, overdosePerMg = 0.04 } |
A passer-by's high rates the stamp; a fentanyl cut can kill them |
Config.Sale.pendingPayoutDays |
14 |
Payouts for offline or full payees wait this long |
Config.Demand |
default = 1.0, min = 0.25, max = 3.0, areas Vinewood, Davis, Vespucci Beach, Sandy Shores, Paleto Bay |
Circles with a multiplier per substance |
Config.Street.enabled / disableWith |
true / { 'np_gangs' } |
The basic street sale; it steps aside while these resources run |
Config.Street.meter / walk / haggleBand |
cheap 0.5 – greedy 1.6; walk line 1.0–1.3 (shown ± 0.06); 0.2 | The price meter and the buyer's walk-away line |
Config.Street.call / rob |
see file | Chances a passer-by calls it in or tries to take it |
Config.Street.heat |
line = 70, decayPerMinute = 2.5 |
Standing in one place too long thins out the buyers |
Body (use.lua, effects.lua, body.lua, addiction.lua, overdose.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Use.skipPicker / partial |
true / true |
One method starts at once; one use takes one dose, not the whole item |
Config.Use.syringe |
mode = 'prop', max = 60 |
A used syringe lies on the ground ('item' = into the pockets, 'none') |
Config.Effects.substances |
per substance up, down, comedown |
The modifiers (Body loop) |
Config.Effects.mixing |
sober (alcohol + cocaine), double (opioid + alcohol), spins, overheat | Mixing rules |
Config.Effects.comfort |
{ default = 100, min = 0 } |
The player's motion setting (never the gameplay) |
Config.Effects.guideCommand / statusCommand / statusKey |
drugguide / drugstatus / F7 |
The substance board and "right now" |
Config.Body.clock / offlineRate |
'wall' / 0.5 |
What counts as time for cravings, tolerance and dependence |
Config.Body.baseLine / lineStep / lineMax |
60 / 4 / 92 |
The overdose line; it never reaches the end of the meter |
Config.Body.stages |
dependent ≥ 75, hooked ≥ 45, habit ≥ 15, clean | Dependence stages |
Config.Addiction.tolerance |
perDose = 0.34, fadePerDay = 1, settleHours = 6 |
Tolerance only moves the line once it has settled |
Config.Addiction.dependence |
perDose = 0.6 (× addiction), dailyCap = 20, fallPerDay = 4 |
|
Config.Overdose |
criticalSeconds = 300, critical = 'kill', recoverSeconds = 20, stateBag = 'isDowned' |
'kill' hands over to the framework's death flow, 'hold' keeps them down |
Config.Hud |
tiles bottom left, load meter top right, claim = { 'bottom-center' }, loadClaim = { 'top-right' } |
The np_hud zones the HUD pieces claim |
EMS, record and rehab (ems.lua, medical.lua, rehab.lua, vitals.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Ems.reportToPolice |
false |
May medics tell the police about an overdose |
Config.Ems.treatments |
naloxone (opioids), sedative (stimulants, empathogens; wrong on depressants), charcoal (swallowed, first 10 min), saline (alcohol) | The tray |
Config.Ems.spray |
naloxone_spray, buys 180 s, at most 2 |
The nasal spray friends carry |
Config.Medical.mdt |
patientTtlMinutes = 360 |
One MDT patient case is reused this long |
Config.Rehab |
days = 14, fallMult = 3.0, meetings every 120 min for 45 min, substitute 12 h |
|
Config.Rehab.clinics |
Pillbox Recovery (meeting at Mission Row hall), Sandy Shores Clinic (church) | Doctor ped, desk, meeting place |
Config.Rehab.certificate |
clean_certificate, 150 cash |
The clean-test certificate for employers |
Config.Vitals.app |
vitals, default installed |
The np_phone app |
Police and city (search.lua, k9.lua, tests_kit.lua, trash.lua, dispatch.lua) ​
| Option | Default | Description |
|---|---|---|
Config.Search.levels |
untrained 5 %, basic 20 %, narcotics 35 %, instructor 50 % | Chance to notice per item checked |
Config.Search.certDays / academy |
30 / Police Academy, 60 m |
Training lapses; lessons count at the academy |
Config.Search.falseHunch |
0.05 |
An ordinary container feels off anyway |
Config.Search.evidence |
{ prefix = 'npd', digits = 5 } |
Case numbers for np_inventory's evidence locker |
Config.Search.terminal |
command = 'drugdesk', receipts of 72 h |
The police terminal |
Config.K9 |
requireItem = true (k9_leash), command = 'k9', legalWeed = false, trunks = true |
The dog |
Config.TestsKit.breath |
limit = 0.5 ‰, heavy = 1.5 |
Breathalyzer |
Config.TestsKit.swab |
developSeconds = 30, faintShare = 0.15, readLevel = 'narcotics' |
Six panels; below the read level the officer reads the lines |
Config.TestsKit.blood |
group = 'medic', labMinutes = 10, requires = 'restrained' |
The blood draw |
Config.Trash.clearHours |
24 |
A bin is emptied this long after its first item |
Config.Trash.areas / job |
eight areas, depot Los Santos Sanitation, 6 stops a route | The sanitation board and routes |
Config.Trash.job.notice |
{ chance = 0.08, handIn = 200 } |
Noticing a heavy package |
Config.Dispatch.adapter |
'auto' (ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch, else 'builtin') |
'event' = only np_drugs:server:witness |
Config.Dispatch.delay / cooldown |
6–20 s / 90 s | A witness needs time; the same suspect is not reported again at once |
Config.Dispatch.kinds |
sale 10-31, lab 10-70, robbery 10-90, other 10-37 |
Codes, icons, priorities |
Editable in np_admin ​
With np_admin running, these keys are on its Resource settings page under Drugs (shared/np_admin_settings.lua).
np_admin stores only the overrides; shared/config*.lua stays the default. Everything applies live except the
language (restart). The settings are listed even while np_drugs is stopped.
| Category | Keys |
|---|---|
| General | Locale (restart), Debug, AdminLog |
| Sales | Sale.priceCeiling, Sale.opened, Sale.maxCount, Sale.pendingPayoutDays, Demand.default, Demand.min, Demand.max |
| Trunk wear | Carry.wear.burstPerMinute, poorSealFactor, heatFactor, crashChance, coolerMode, coolerItems |
| Search | Search.certDays, Search.falseHunch, the notice chance of every training level (Search.levels.<n>.chance) |
| Trash | Trash.clearHours |
| EMS | Ems.reportToPolice |
| Body | Body.clock, Body.offlineRate |
| Overdose | Overdose.criticalSeconds, critical, recoverSeconds, toleranceDrop |
| Lab minigames | Minigames.enabled, mode, every, maxChecks, seconds, grace, worn, practiced, difficulty.<preset> for heat, simmer, stir, pressure, trim |
| Addiction | Addiction.tolerance.perDose, tolerance.fadePerDay, dependence.perDose, dependence.dailyCap, dependence.fallPerDay |