Configuration ​
Everything is in shared/config.lua. The file is shared (client and server), so keep secrets out of it: the
encryption secret is the convar np_passwords:secret (see Installation). Times are in seconds
unless a key says ms. Most values are read when they are used, so np_admin can change them live
(below).
General ​
| Option | Default | Description |
|---|---|---|
Config.Debug |
false |
Debug log |
Config.Locale |
'en' |
'en' or 'de' for Lua strings. The web gets the locale in boot |
Config.Framework |
'auto' |
'esx', 'qbx', 'qb', 'standalone', or auto-detect (qbx_core → qb-core → es_extended → standalone) |
Config.Inventory |
'auto' |
'np', 'ox', 'qb', 'none', or auto-detect |
Config.AutoCreateTables |
true |
Run sql/np_passwords.sql at start (CREATE TABLE IF NOT EXISTS) |
Config.Material |
nil |
NUI glass. nil follows the server theme from np_admin; 'frosted' or 'liquid' (Liquid Glass) wins when set |
Config.ZIndex |
1000 |
SetNuiZindex while a panel is open, so it sits above the caller's NUI |
Config.RateLimit |
{ perSecond = 12, burst = 24, maxPayload = 16384 } |
Per-player token bucket over every RPC, plus the payload size limit. Each RPC has its own window on top |
Config.Notify |
{ duration = 6000 } |
Toast duration in ms |
Config.Admin |
{ command = 'pwlock' } |
Name of the admin command |
Keys ​
Config.Keys = {
autofill = 'TAB', submit = 'RETURN', cancel = 'ESC', shuffle = 'R',
unlock = 'E', enter = 'G', watch = 'H',
}
autofill, submit, cancel and shuffle are sent to the NUI in boot and work inside the panels. unlock,
enter and watch are the proximity prompt keys: E unlocks with a saved code (or locks
an open door again), G opens the prompt to type, H watches a nearby player type. The proximity keys support
E, G and H.
Integrations ​
Config.Integrations = {
hud = 'auto', phone = 'auto', inventory = 'auto', gangs = 'auto', menu = 'auto',
identification = 'auto', character = 'auto', minigames = 'auto', discord = 'auto',
}
Each is 'auto' (use it when the resource is started), true or false. See
Bridges & integrations for what each one does.
Locks ​
Config.Locks = {
radius = 2.0,
tries = 3,
lockout = 45,
notifyOwner = true,
dispatch = false,
autofill = true,
crackable = true,
promptDistance = 1.6,
static = { --[[ lock definitions ]] },
}
| Option | Description |
|---|---|
radius |
Default interaction radius. Attempts are accepted within radius + 2 m |
tries |
Wrong tries before a lockout. Counted per lock, for everyone |
lockout |
Lockout seconds |
notifyOwner |
Owners get an alert on lockouts and leaks |
dispatch |
Fire np_passwords:dispatch on lockouts (see Events) |
autofill |
Default for locks: saved codes may autofill |
crackable |
Default for locks: the code breaker works |
promptDistance |
Proximity prompt distance (the lock's radius wins when smaller) |
static |
Locks registered at every start, same fields as RegisterLock |
Every lock can override radius, tries, lockout, notifyOwner, dispatch, autofill and crackable.
static = {
{ id = 'pd:evidence', label = 'Evidence room', icon = 'box-archive', type = 'pin', length = 6,
owner = { type = 'job', id = 'police', grade = 3 }, coords = vector3(474.5, -990.3, 26.3),
generate = true, door = { model = `v_ilev_ph_gendoor002`, coords = vector3(474.9, -990.5, 26.3), autoRelock = 10 } },
},
Prompts and offers ​
Config.Prompt = { timeout = 120, unlockTtl = 10, closeDelay = 950, verifyTries = 5 }
Config.Offers = { ttl = 60, shareDistance = 5.0 }
Config.Guest = { maxUses = 25, maxTtl = 7 * 86400, defaultTtl = 7200 }
| Option | Description |
|---|---|
Prompt.timeout |
Seconds a server-initiated Prompt / RequireCode waits for the player |
Prompt.unlockTtl |
Default maxAge of IsUnlocked / ConsumeUnlock |
Prompt.closeDelay |
Ms the green unlocked state stays before focus is released |
Prompt.verifyTries |
Wrong tries for verifier logins before the session closes |
Offers.ttl |
Seconds a save / update toast stays answerable |
Offers.shareDistance |
Share from the phone app to a player within this range |
Guest.maxUses / maxTtl / defaultTtl |
Limits and default for guest codes (uses 1..25, lifetime 60 s..7 days, default 2 h) |
Strength ​
Config.Strength = { guessesPerSecond = 2, commonPins = {}, commonPasswords = {} }
Strength is time to crack: guesses / guessesPerSecond. Levels: weak under 60 s, fair under 10 min, good under
2 h, else strong. The same number drives the cracking minigame. Add your own common PINs (counted as 20 guesses) and
common passwords (lowercase, 50 guesses) to the built-in lists. See Prompts → Strength.
Crime ​
Config.Crack = {
enabled = true, item = 'code_breaker', timeScale = 0.05,
minDuration = 8, maxDuration = 600, breakChance = 0.15, maxMove = 2.0,
}
Config.Surf = { enabled = true, typingDistance = 10.0, distance = 3.0, blurChance = 0.3 }
Config.Warrant = {
enabled = true, jobs = { 'police', 'sheriff' }, item = 'search_warrant',
distance = 3.0, requireDuty = true, document = false,
}
| Option | Description |
|---|---|
Crack.enabled |
Cracking on / off |
Crack.item |
Item the cracker needs (false = anyone may crack) |
Crack.timeScale, minDuration, maxDuration |
Duration = clamp(crack seconds × timeScale, min, max) / speed |
Crack.breakChance |
Chance the code breaker is used up on success |
Crack.maxMove |
The minigame cancels when the player moves further than this (m) |
Surf.typingDistance |
Players in this range see that someone is typing |
Surf.distance |
A watcher must stay this close to see the characters |
Surf.blurChance |
Chance per character to stay hidden |
Warrant.jobs |
Jobs that may read a keychain |
Warrant.item |
Item the officer needs (false = none) |
Warrant.distance |
Max distance to the target |
Warrant.requireDuty |
Officer must be on duty |
Warrant.document |
np_identification document type the officer must hold, e.g. 'badge' (false = off) |
See Crime & police.
Config.Minigames runs cracking in np_minigames while it is started: enabled, and under crack
the switch, mode ('play' / 'auto'), levels per lock strength, pattern and opts. See
Crime → Cracking with np_minigames.
2FA ​
Config.Otp = {
period = 30,
sms = true,
smsFrom = 'Verify',
apps = {
{ id = 'fleeca', label = 'Fleeca Bank', icon = 'building-columns', tint = 'green' },
},
}
period is the code lifetime in seconds. With sms, a player who has no Codes entry for the app yet gets the code by
np_phone SMS from smsFrom. Apps are also added with RegisterOtpApp.
Items ​
Config.Items = { register = true, note = 'paper_note', breaker = 'code_breaker', warrant = 'search_warrant' }
register registers the three items at runtime with np_inventory (re-registered when it restarts). The names are
used with every inventory.
Vaults ​
Config.Vaults = { gangs = true, jobs = true, custom = true, maxCustom = 5, maxMembers = 20 }
| Option | Description |
|---|---|
gangs |
One vault per np_gangs gang (ranks og 3 / trusted 2 / member 1) |
jobs |
One vault per framework job (rank = job grade, the boss manages) |
custom |
Player-made vaults with owner / editor / viewer |
maxCustom |
Custom vaults a character may own |
maxMembers |
Members per custom vault |
Stashes, gangs and doors ​
Config.Stash = { enabled = true, prefix = 'stash:' }
Config.Gangs = { stashLock = false }
Config.Doors = { enabled = true, distance = 30.0 }
| Option | Description |
|---|---|
Stash.enabled / prefix |
A lock with id stash:<stashId> gates that inventory stash. See Stash locks |
Gangs.stashLock |
Opt-in: lock gangstash:<gangId> gates the np_gangs gang stash |
Doors.enabled |
Door binding on / off |
Doors.distance |
spawnDistance of the np_prophandler doors: range in which a door is in the door system (5-300) |
Phone app ​
Config.Phone = {
enabled = true,
id = 'passwords', name = 'Passwords', icon = 'fa-solid fa-key', tint = 'gray',
deletedDays = 30, revealPerMinute = 10, nearbyDistance = 5.0,
}
| Option | Description |
|---|---|
enabled |
Register the app with np_phone |
id, name, icon, tint |
App id and home screen tile (Font Awesome class, np_phone tint) |
deletedDays |
Days entries stay in Recently deleted |
revealPerMinute |
Hold-to-reveal limit per player |
nearbyDistance |
Range of the share list |
See Passwords app.
Discord DMs ​
Config.Discord (off by default): players DM the np_discord bot for their saved codes. Options and setup are on
Discord DMs.
Editable in np_admin ​
While np_admin runs, staff can change part of the config live under Resource settings →
Passwords (shared/np_admin_settings.lua). shared/config.lua stays the default and np_admin stores only the
overrides. Without np_admin the config file is all there is.
| Category | Fields |
|---|---|
| General | Language, debug output, phone app on / off |
| Locks | Wrong tries before lockout, lockout seconds, notify owners, dispatch on lockout, guesses per second |
| Crime | Cracking on / off, crack time scale, shoulder surfing on / off, blur chance per digit, watch distance, warrant read on / off, warrant jobs, warrant item |
| Minigames | Minigames.enabled, Minigames.crack.enabled, Minigames.crack.mode (play / auto), Minigames.crack.pattern (np_minigames) |
| Codes | 2FA SMS |
| Discord | Keychain over Discord DMs on / off (restart), required role, delete answers after, lookups per minute, in-game alert |
| Integrations | np_hud, np_phone, np_inventory, np_gangs, np_minigames, np_discord, np_menu (auto / on / off) |
Most fields apply live. The language and the np_menu switch reach a client on its next connect. Phone app on / off and the np_phone / np_inventory switches need a resource restart.