Crime & police ​
Codes are roleplay: they can be cracked, watched, written down, leaked and seized. Every part on this page can be
switched off in shared/config.lua or live in np_admin.
| Cracking | Shoulder surfing | Warrant read |
|---|---|---|
![]() |
![]() |
![]() |
Cracking ​
The item code_breaker (Config.Crack.item) cracks a lock. Use it within about 1 m of the prompt distance of a
lock, or start it from your script with the Crack export. The panel shows code wheels that lock one by one
(ESC gives up). When the time is up, the server opens the lock.
Duration comes from the code's strength, the same time to crack the generator shows:
duration = clamp(crack seconds × Config.Crack.timeScale, minDuration, maxDuration) / speed
With the defaults (0.05, 8 s, 600 s): PIN 1234 (10 s) → 8 s, PIN 4821 (5000 s) → 250 s, a 6-digit PIN or a
phrase → 10 minutes. speed is 1.0 for the item; scripts pass more for better tools.
Rules:
- The player must stay within
Config.Crack.maxMove(2 m) of the start and alive; moving away or dying cancels. - On finish the server checks that the full duration passed, the distance, and that the item is still there.
- On success the code breaker breaks with
Config.Crack.breakChance(15 %). - Locks registered with
crackable = falserefuse; locks without a code can't be cracked. - A crack by someone outside the owner's circle counts as a leak and is logged with method
crack. Config.Crack.item = falselets anyone crack without an item. With the inventory bridgenoneno item is needed.
Cracking with np_minigames ​
With np_minigames started and Config.Minigames.enabled / Config.Minigames.crack.enabled on
(the default; np_admin: Settings → Passwords → Minigames), cracking (the code_breaker, the client Crack export
and the server Crack(src, id, opts) export) runs as np_minigames' server-validated
crack game instead of the built-in overlay:
Config.Minigames.crack |
|
|---|---|
mode = 'play' (default) |
The player brute-forces the digit wheels (SPACE on the target digit). Wheels = the code length (4..8); difficulty, spinMs, timeMs and allowMisses come from the lock's strength (levels.weak / fair / good / strong → easy … expert). A speed above 1 (server export) slows the wheels and adds time by that factor. The lock's crack time does not apply |
mode = 'auto' |
The original passive channel, drawn by np_minigames: the wheels lock by themselves over the lock's crack time (Config.Crack.timeScale, min / max, speed); the player stays put |
pattern = true |
In play mode a pattern lock is cracked with np_minigames' pattern game (redraw it from memory) |
opts |
Extra np_minigames opts (icon, tint, noAssist …) |
Config.Minigames = {
enabled = true,
crack = {
enabled = true,
mode = 'play',
levels = {
weak = { difficulty = 'easy', spinMs = 150, timeMs = 15000, allowMisses = 3 },
fair = { difficulty = 'medium', spinMs = 110, timeMs = 14000, allowMisses = 2 },
good = { difficulty = 'hard', spinMs = 90, timeMs = 13000, allowMisses = 1 },
strong = { difficulty = 'expert', spinMs = 72, timeMs = 12000, allowMisses = 1 },
},
pattern = true,
opts = {},
},
}
np_minigames replays the input on the server; np_passwords then re-checks the distance and the item and unlocks
('auto' also keeps its own crack-time check). A crack.finish from the client for such a session is refused and
closes it. The code_breaker stays np_passwords' item: required at start and finish, Config.Crack.breakChance on a
success; np_minigames gets no opts.item. Moving away (Config.Crack.maxMove), dying and Esc are np_minigames'
own fails / cancel. Without np_minigames, or with a switch off (Config.Integrations.minigames = false too), the
built-in overlay runs unchanged.
Shoulder surfing ​
Players within Config.Surf.typingDistance (10 m) of someone typing in a prompt get a typing indicator. Within
Config.Surf.distance (3 m) they can watch: H in the world prompt, or Watch them type on the player in
np_menu.
The watcher sees the characters of the typist's next typed attempt for 6 seconds, each one hidden with
Config.Surf.blurChance (30 %), so a 4-digit PIN usually shows two or three digits. The watcher has to stay within
Config.Surf.distance until the code is submitted. Autofilled codes are never shown: only typing can be watched.
Paper notes ​
The item paper_note carries a code in its metadata ({ code, label, lockId? }). Players write one from the
Passwords app (Write on a note). Notes can be dropped, stashed, found in a search and
handed over like any item.
Reading a note (the Read action in np_inventory, or using it) shows the code in a toast and offers Save this code?. A note tied to a lock saves as that lock's entry and works with autofill; other notes become an Other entry. Saving a note never consumes it.
Leaks ​
np_passwords notices when a code got out. A lock is marked leaked when someone opens it by typing or cracking who
- had no keychain entry or vault item for it before,
- is not an insider (the owner, a colleague of the owning job or gang, a member of the owning vault),
- and doesn't manage it.
Guest codes and autofill never leak. Then:
- the owners online get an alert (Someone without the code opened …): an np_phone notification that opens the entry, else a toast;
- the entry shows a red Leaked pill in the Passwords app, and the security check counts it;
np_passwords:leakedfires and np_admin's audit log records it.
Setting a new code clears the flag (as does /pwlock reset).
Lockouts and alarms ​
Wrong tries count per lock, for everyone. After tries (3) wrong tries the lock refuses every attempt for lockout
seconds (45), the owners get an alert, and with dispatch np_passwords fires
np_passwords:dispatch for your dispatch resource.
Warrant: reading a keychain ​
Police can read a suspect's keychain with a search warrant: Read keychain (warrant) on the player in np_menu, or
use the search_warrant item next to them. The sheet lists every saved entry with label, username and the code
in plain text.
The server checks, in this order:
| Check | Config |
|---|---|
| Warrant reads are on | Config.Warrant.enabled |
| The officer's job is in the list | Config.Warrant.jobs (police, sheriff) |
| The officer is on duty | Config.Warrant.requireDuty |
| The officer carries the item | Config.Warrant.item (search_warrant, false = none) |
| The officer holds a valid document | Config.Warrant.document (np_identification type, e.g. 'badge'; false = off) |
| The target is within range | Config.Warrant.distance (3 m) |
The target gets a notification (… read your keychain with a warrant), the read is logged (method warrant) and goes
to np_admin's audit log with the number of entries. The item is not used up. Vault items are not part of the read.
Turning parts off ​
| Feature | Switch |
|---|---|
| Cracking | Config.Crack.enabled = false, or per lock crackable = false |
| Shoulder surfing | Config.Surf.enabled = false |
| Warrant reads | Config.Warrant.enabled = false |
| Owner alerts | Config.Locks.notifyOwner = false, or per lock notifyOwner = false |
| Items | Config.Items.register = false (np_inventory), or leave them out of your item list |


