Configuration ​
The configuration is split over shared/config/*.lua. 00_core.lua creates Config with the core defaults; the
other files extend it. The files are shared (client and server), so keep secrets out of them. Radii are metres,
times are seconds unless a key says ms.
| File | Holds |
|---|---|
shared/config/00_core.lua |
Framework, locale, staff, integrations, RPC rate limit, commands, kinds, services, factions, director, scene radii, payout, citizen rank, /event cleanup, reports, items |
shared/config/director.lua |
Director tick, hour provider, the rules staff may change, roll log limit |
shared/config/tasks.lua |
Clean-up work: token staleness, slack, placed items, share points |
shared/config/board.lua |
Faction board, and the report extras: closures, photo length, voice lines, gang attention |
shared/config/catalogue.lua |
The starter catalogue (Config.Catalogue) |
shared/config/client_world.lua |
Client: streaming, keys, markers, work animations, hazard effects, blips, editor tools |
shared/config/integrations.lua |
The np_phone app, item details, np_menu, np_gangs, np_drugs, np_banking |
shared/np_admin_settings.lua |
What staff may edit live in np_admin (below) |
Templates and spawn points live in the database and are edited in game (see Scenes & templates).
General ​
| Option | Default | Description |
|---|---|---|
Config.Debug |
false |
Debug log |
Config.Locale |
'en' |
'en' or 'de' (Lua strings and the NUI dictionaries) |
Config.Framework |
'auto' |
'esx', 'qbx', 'qb', 'standalone'. auto prefers esx > qbx > qb > standalone |
Config.Inventory |
'auto' |
'np' (np_inventory), 'ox', 'qb', 'none' |
Config.Rpc |
{ perSecond = 8, burst = 16 } |
Token bucket per player over every NUI / app call |
Config.Timers |
{ tickSeconds = 5 } |
Scheduler tick for the persistent timers and cooldowns |
Staff ​
Config.Admins = {
-- 'license:0123456789abcdef0123456789abcdef01234567',
-- 'discord:123456789012345678',
}
Config.AdminGroups = {
esx = { 'admin', 'superadmin' }, -- xPlayer.getGroup()
qb = { 'admin', 'god' }, -- qb-core / qbx_core HasPermission
}
Config.AdminDiscordRoles = {
-- '123456789012345678', 'staff',
}
Config.AdminDiscordCacheSeconds = 60
Only used while np_admin is not running (or with Config.Integrations.np_admin = false). A player is staff when
one of their identifiers is in Config.Admins, their framework group is in Config.AdminGroups, or np_discord says
they hold one of Config.AdminDiscordRoles (role ids or np_discord role names, answers cached for
AdminDiscordCacheSeconds). See Staff.
Integrations ​
Config.Integrations = {
np_inventory = 'auto', np_hud = 'auto', np_phone = 'auto', np_menu = 'auto', np_character = 'auto',
np_discord = 'auto', np_admin = 'auto', np_gangs = 'auto', np_drugs = 'auto', np_banking = 'auto',
np_minigames = 'auto',
}
'auto' uses a sibling while it is started; false never does (the built-in fallback runs). The tuning of each adapter
is in shared/config/integrations.lua (below). See Integrations. np_prophandler and
np_npchandler are required and have no entry here.
Commands and keys ​
Config.Commands = {
board = 'scenes', -- faction scene board (also the key below and the np_phone app tab)
boardKey = 'F6',
admin = 'envadmin', -- staff editor
cleanup = 'event', -- `/event cleanup`
}
Config.Client.commands = { report = 'report', director = 'envdirector' } -- false = not registered
Kinds and services ​
Config.Kinds = {
road = { icon = 'road-barrier', tint = 'orange' },
fire = { icon = 'fire', tint = 'red' },
water = { icon = 'droplet', tint = 'aqua' },
nature = { icon = 'tree', tint = 'green' },
hazard = { icon = 'oil-can', tint = 'rust' },
strange = { icon = 'question', tint = 'lilac' },
}
Config.KindOrder = { 'road', 'fire', 'water', 'nature', 'hazard', 'strange' }
Config.Services = { '311', '911' }
The kind's tint names it everywhere (marker, toast, board, phone). A report goes to one service; it routes to the factions with that service that are on the template's list (see Reporting).
Factions ​
Membership comes from the framework job: jobs = { <job name> = <min grade> }. A job may belong to several factions.
needsDuty: only members on duty count (ESX: job.onDuty ~= false; qb / qbx: job.onduty).
Config.Factions = {
publicworks = { label = 'Public Works', icon = 'helmet-safety', tint = 'orange', service = '311', needsDuty = true,
jobs = { publicworks = 0, garbage = 0 } },
fire = { label = 'Fire Department', icon = 'fire-extinguisher', tint = 'red', service = '911', needsDuty = true,
jobs = { fire = 0, firefighter = 0 } },
police = { label = 'Police', icon = 'shield-halved', tint = 'blue', service = '911', needsDuty = true,
jobs = { police = 0, sheriff = 0 } },
ems = { label = 'EMS', icon = 'kit-medical', tint = 'pink', service = '911', needsDuty = true,
jobs = { ambulance = 0, ems = 0 } },
tow = { label = 'Tow', icon = 'truck-pickup', tint = 'rust', service = '311', needsDuty = true,
jobs = { mechanic = 0, tow = 0 } },
rangers = { label = 'Park Rangers', icon = 'tree', tint = 'green', service = '311', needsDuty = true,
jobs = { ranger = 0, park_ranger = 0 } },
news = { label = 'Weazel News', icon = 'video', tint = 'lilac', service = '311', needsDuty = false,
jobs = { reporter = 0, journalist = 0 } },
}
Config.FactionOrder = { 'publicworks', 'fire', 'police', 'ems', 'tow', 'rangers', 'news' }
Config.Civilian = { label = 'Civilian', icon = 'user', tint = false }
| Faction | Service | Default jobs | Duty |
|---|---|---|---|
publicworks Public Works |
311 | publicworks, garbage |
needed |
fire Fire Department |
911 | fire, firefighter |
needed |
police Police |
911 | police, sheriff |
needed |
ems EMS |
911 | ambulance, ems |
needed |
tow Tow |
311 | mechanic, tow |
needed |
rangers Park Rangers |
311 | ranger, park_ranger |
needed |
news Weazel News |
311 | reporter, journalist |
not needed |
Replace the job names with your own (jobs = { lspd = 0, bcso = 0 }), raise a minimum grade to keep cadets out
(police = 2). civilian is implicit (everybody, no job). Templates refer to factions by key, so keep the keys or
edit the templates. Other resources add factions at runtime with RegisterFaction.
Director ​
Config.Director = {
enabled = true,
interval = { 7 * 3600, 9 * 3600 }, -- the next roll is random inside this window (persisted)
chance = 0.5,
maxLive = 3,
scaling = { enabled = false, high = 48, highFactor = 0.75, low = 12, lowFactor = 1.5 },
clearableOnly = true,
cooldown = 24 * 3600,
areaCooldown = 24 * 3600,
areaRadius = 500.0,
sceneGap = 300.0,
weatherProvider = 'auto',
logChannel = false,
historyDays = 7,
}
-- shared/config/director.lua
Config.Director.tickSeconds = 30
Config.Director.hoursProvider = 'auto'
Config.Director.editable = { 'interval', 'chance', 'maxLive', 'lifetime', 'clearableOnly', 'cooldown',
'areaCooldown', 'areaRadius', 'sceneGap', 'scaling' }
Config.Director.rollLogLimit = 500
| Option | Description |
|---|---|
enabled |
The director rolls at all |
interval |
Seconds; the next roll is drawn inside this window and stored, so a restart never resets the clock |
chance |
Hit chance per roll (0..1) |
maxLive |
Live scenes at once; a roll with that many live is a miss (max_live) |
scaling |
Population scaling, off by default: at or above high players the window is multiplied by highFactor, at or below low by lowFactor |
clearableOnly |
Skip templates when no faction on their list has conditions.minOnDuty members on duty |
cooldown |
Per template: no repeat inside this time |
areaCooldown / areaRadius |
Per area: no scene within areaRadius of a recent one |
sceneGap |
No spawn within this distance of a live scene |
weatherProvider |
'auto' (GlobalState.weather / .currentWeather), 'hook' (Config.Director.weatherHook, a function), a function returning the weather name, or false |
hoursProvider |
'auto' (GlobalState.currentHour / .clockHours, else the server clock) or a function returning the hour |
logChannel |
np_discord channel for the roll log while np_admin is not running (false = np_admin log only) |
historyDays |
Days of rolls the director screen shows |
tickSeconds |
How often the director checks whether the next roll is due |
editable |
The rules the director screen may change; anything else is refused |
rollLogLimit |
Rows of env_rolls the director screen reads at most |
See Director.
Scenes ​
Config.Scenes = {
streamRadius = 250.0, streamInterval = 2000,
discoverRadius = 35.0, inspectRadius = 8.0, taskRadius = 6.0,
despawnRadius = 120.0, noWitnessRadius = 150.0,
reportRadius = 200.0, voiceRadius = 300.0, vagueJitter = 120.0,
vehicleScanRadius = 25.0, peopleRadius = 10.0,
stageTickSeconds = 15, defaultLifetime = 7200, finishRatio = 0.8,
}
| Option | Default | Description |
|---|---|---|
streamRadius |
250.0 |
Clients get a scene's public data (to draw its props) inside this radius |
streamInterval |
2000 |
Ms between per-player stream updates |
discoverRadius |
35.0 |
Markers and the card only after line of sight inside this radius |
inspectRadius |
8.0 |
Inspect: a precise report and the clues |
taskRadius |
6.0 |
A task step is done within this distance of its object (or the scene centre) |
despawnRadius |
120.0 |
Expired scenes are removed only when nobody is within this radius |
noWitnessRadius |
150.0 |
The director never spawns with a player this close |
reportRadius |
200.0 |
A vague report needs a live scene within this radius |
voiceRadius |
300.0 |
np_phone emergency calls add a voice report to a known scene this close |
vagueJitter |
120.0 |
A vague pin is the caller's position moved up to this far |
vehicleScanRadius |
25.0 |
Vehicles within this radius count for a task's vehicle requirement |
peopleRadius |
10.0 |
Eligible players within this radius count for a task's people |
stageTickSeconds |
15 |
Stage and expiry tick |
defaultLifetime |
7200 |
Seconds, for templates without a lifetime |
finishRatio |
0.8 |
A task step needs at least this share of its duration on the server clock |
Payout ​
Config.Payout = {
account = 'bank', -- 'bank' | 'cash'
minShare = 0.1, -- nobody gets less than this fraction of an even split
finderTip = 150, -- to the first useful caller, on clear
society = false, -- true: faction pay goes to the society account
offlineQueue = true, -- participants who left are paid on their next join (env_payouts)
}
See Clean-up & payouts.
Citizen rank ​
Config.Citizen = {
levels = {
{ id = 'newcomer', at = 0 }, { id = 'observant', at = 3 }, { id = 'reliable', at = 10 },
{ id = 'trusted', at = 25 }, { id = 'pillar', at = 50 },
},
falseWeight = 2,
falseLimit = { count = 3, window = 3600 },
flagAt = 5,
}
Points are useful - falseReports * falseWeight. More than falseLimit.count false reports inside window seconds
and further reports are refused; at flagAt false reports staff are notified. Level labels come from the locales
(citizen.level.<id>). See Clean-up & payouts → Citizen rank.
Clean-up command and reports ​
Config.Cleanup = { commandPayMult = 0.5, radius = 30.0 }
Config.Reports = { textLength = 240, cooldownSeconds = 20 }
-- shared/config/board.lua
Config.Reports.closureKinds = { 'road' }
Config.Reports.closureRadius = 40.0
Config.Reports.photoLength = 512
Config.Reports.mineLimit = 20
Config.Reports.voiceLines = { ['911'] = '911', police = '911', ems = '911', fire = '911', emergency = '911',
['311'] = '311', city = '311', publicworks = '311' }
Config.Reports.gangAttention = 2
| Option | Description |
|---|---|
Cleanup.commandPayMult |
Share of the normal pay when a faction member clears with /event cleanup |
Cleanup.radius |
/event cleanup takes the nearest live scene within this radius |
Reports.textLength |
Characters of a report's text |
Reports.cooldownSeconds |
Seconds between two reports of one player |
Reports.closureKinds / closureRadius |
Template kinds whose reported scenes show as a road closure on everyone's GPS (a template may set meta.closure = true / false), and the closure's radius |
Reports.photoLength |
Max length of a photo URL attached to a report |
Reports.mineLimit |
Reports the phone's Reports tab lists |
Reports.voiceLines |
np_phone emergency line → service. A line that is not listed and is not '311' / '911' itself is ignored |
Reports.gangAttention |
np_gangs: police attention for a report of a template with meta.turfAttention |
Board and catalogue ​
Config.Board = { onSceneRadius = 40.0, backupCooldown = 60 }
Config.Catalogue = { seedTemplates = true, seedSpawns = true, labRadius = 600.0 }
| Option | Description |
|---|---|
Board.onSceneRadius |
An accepted unit this close to the scene counts as "on scene" (timeline) |
Board.backupCooldown |
Seconds between two backup requests for the same scene |
Catalogue.seedTemplates |
Insert the 20 starter scenes (and the sinkhole's follow-up) when env_templates is empty on the first start. Deleting every template later does not bring them back |
Catalogue.seedSpawns |
Insert the example spawn points (check them on your map) |
Catalogue.labRadius |
np_drugs: templates with meta.nearLabs prefer spawn points this close to a lab |
Tasks ​
Config.Tasks = {
staleFactor = 3, staleSlack = 30,
finishSlack = 2.0, dragSlack = 24.0,
placeRadius = 15.0, placeCooldown = 1500,
placeItems = { 'traffic_cone', 'road_flare' },
pointsPerSecond = 1,
civilianUseful = 1,
icons = { hold = 'hand', drag = 'hand-back-fist', place = 'triangle-exclamation', vehicle = 'truck-pickup',
inspect = 'magnifying-glass' },
}
| Option | Description |
|---|---|
staleFactor / staleSlack |
A task token older than duration * staleFactor + staleSlack seconds is stale |
finishSlack |
Metres on top of Config.Scenes.taskRadius when a step is handed in |
dragSlack |
Extra metres for drag steps (the player carries the object off the road) |
placeRadius |
Using a cone / flare counts for a place task within this distance of its spot |
placeCooldown |
Ms between two placed items per player |
placeItems |
Items whose use completes place tasks |
pointsPerSecond |
Share points per second of work (a step of an 8 s task = 8 points) |
civilianUseful |
Good citizen points a civilian earns per scene they helped with |
icons |
Font Awesome icon per task kind |
Items ​
Config.Items lists the tools and materials templates use (label, icon, tint, weight, usable); descriptions and
categories are merged in from Config.ItemDetails (integrations.lua). See Items.
Client ​
Config.Client (shared/config/client_world.lua) only decides what is drawn and when a request is sent. The server
trusts none of it.
| Key | Default | Description |
|---|---|---|
spawnRadius / despawnSlack |
160.0 / 25.0 |
Scene objects are created this close and deleted beyond spawnRadius + despawnSlack (keep below Config.Scenes.streamRadius) |
tick |
{ idle = 2000, far = 1000, near = 500 } |
Sleep tiers of the streaming loop (ms) |
maxObjectsPerScene |
64 |
Objects drawn per scene |
discovery |
{ interval = 500, maxProbes = 4, retrySeconds = 5, giveUpSeconds = 60 } |
Line-of-sight checks while a scene is close |
viewRefreshSeconds |
10 |
Refresh of a known scene while standing at it (items, duty changed) |
markers |
{ hz = 30, radius = 40.0, max = 12, lift = 1.1, stem = { near = 70, far = 24 } } |
World markers: updates per second, radius, count, height and stem length |
card.closeSlack |
10.0 |
The scene card closes this far beyond the discover radius |
keys |
inspect E (38), report G (47), task F (23) | Keys at a scene. The task key falls back to the inspect key once the scene was inspected |
inspect |
{ duration = 2500, anim = 'kneel' } |
The inspect action |
work |
hudRadius = 45.0, autoRadius = 25.0, moveCancel = 1.5, maxRounds = 25, drag = { … } |
The clean-up HUD closes beyond hudRadius; on-duty responders of a listed faction get it within autoRadius; a hold step is cancelled after moving moveCancel m; steps of one counted task in a row before the key is needed again; drag settings (carried model, min / max distance, timeout, how long the dropped prop lies there) |
work.items, work.hints, work.byKind, work.presets |
Work animation by the task's item, then by words in the task id / label, then by task kind; the presets are scenarios or { dict, clip, flag, prop? } |
|
hazards |
tick = 1000, effects per kind |
Damage, ragdoll, cough and screen effect of electric, gas, fumes, fire zones |
closures |
{ sprite = 1, colour = 47, scale = 0.85, radiusColour = 47, radiusAlpha = 90, fetchDelay = 4000 } |
Road closure blips |
alerts |
{ sprite = 161, colour = 1, scale = 1.0, seconds = 300, vagueRadius = 120.0 } |
Faction alert blips (an area when the report is vague) |
editor |
{ alpha = 160, ahead = 3.0, maxObjects = 64, dropControl = 38, backControl = 177, follow = 50 } |
Editor ghost preview and walking mode (E drops, BACKSPACE returns) |
Adapters ​
shared/config/integrations.lua tunes what an adapter does while its sibling runs:
Config.Phone = {
app = { name = 'Scene', ui = 'web/dist/phone/index.html', icon = 'fa-solid fa-triangle-exclamation', tint = 'orange',
description = 'Report what blocks the road, follow your reports, see the closures.',
developer = 'np_environmental', default = true },
alertIsland = true, alertIslandSeconds = 90,
workIsland = true,
receipts = true, mailSender = 'City of Los Santos', mailAddress = '[email protected]',
pushes = true,
voiceReports = true,
}
Config.Menu = { context = true, contextDistance = 3.0, sceneRadius = 30.0, radial = true }
Config.Gangs = { attention = 2, kinds = { 'hazard' }, reportKinds = { 'hazard' }, clue = true }
Config.Drugs = { kinds = { 'hazard' }, labRadius = 400.0, labBias = 3, dispatchFallback = true, dispatchCode = '10-15' }
Config.Banking = { society = true }
What each one does is on Integrations.
Editable in np_admin ​
With np_admin running, staff change these live under Resource settings → Environmental
(shared/np_admin_settings.lua). The files stay the default; np_admin stores only the overrides. Every field applies
live. Without np_admin this changes nothing.
| Category | Fields |
|---|---|
| Director | Director rolls (Director.enabled), roll window from / to (Director.interval), hit chance, live scenes at once, population scaling, clearable picks only, template cooldown |
| Scenes | Stream radius, discover radius, inspect radius, quiet despawn radius, no-witness radius |
| Payout | Finder's tip, pay the society account |
| Citizen | False report weight, flag for staff at |
| Cleanup | /event cleanup pay |
The rules changed on the director screen are stored in env_meta and written back into
Config.Director at start, so np_admin's settings and the screen agree.