Configuration ​
The config lives in config/. Every file is shared (loaded on client and server) and starts with
Config = Config or {}, so the feature files can be edited in any order.
| File | Holds |
|---|---|
config/config.lua |
Render, playback sync, audio, media, slides, storage, framework, interaction, rate limit, locale |
config/permissions.lua |
Config.Permissions: the admin node and how capabilities imply each other |
config/surfaces.lua |
Config.SeedSurfaces: surfaces under version control |
config/remote.lua |
Config.Library: history, favourites, playlists, domain filters, channels. See Remote & library |
config/world.lua |
Config.World: screensaver, "Now showing", prompts, mute key, np_menu option, remote item. See In-world UX |
config/editor.lua |
Config.Editor: live collaboration, drafts, version history, PNG export. See Whiteboard editor |
config/presenter.lua |
Config.Presenter: laser rate, hand-over, room range. See Presenter view |
config/cinema.lua |
Config.Cinema: cinema surfaces, requests, votes, tickets, schedule and the emergency broadcast. See Cinema |
config/cast.lua |
Config.Cast: the np_phone app. See Phone cast |
config/audio_channels.lua |
Config.AudioChannels: per-owner limit, active DUIs, intervals, hysteresis, DUI size. See Audio channels |
config/integrations.lua |
Config.Integrations: switch single integrations off. See Integrations |
With np_admin running, most keys can also be changed in game. See np_admin.
Surfaces ​
A surface is a place in the world that shows a content. Surfaces come from two places and behave the same once loaded:
config/surfaces.lua: seeded into the database on start and marked config-locked. They can't be moved or deleted in game. Use these for anything you want under version control.- Placed in game with the Surface manager,
/screens_placeor/screens_add. They live in the database only and can be edited freely.
| Field | Meaning |
|---|---|
id |
Unique surface id |
contentId |
What the surface shows. Surfaces with the same contentId show the same thing and stay in sync. Mark all but one readOnly for mirror boards |
label |
Name in the remote, the prompts and the target option |
surfaceType |
free: a floating quad, x/y/z is its centre. prop: pinned to a prop of model near x/y/z. entity: pinned to a spawned entity, x/y/z is an offset |
renderMode |
quad (default, any surfaceType) or renderTarget (draws into a TV prop's own screen) |
model |
Prop model name, required for surfaceType = 'prop' |
x/y/z, rx/ry/rz |
Position, and rotation in degrees (rz = facing) |
width / height |
Quad size in metres |
resW / resH |
Texture resolution, capped at Config.MaxResolution. Stored, but the pool renders at Config.DefaultResolution (see Limitations) |
radius |
Metres within which the surface is drawn and kept in sync |
interactDistance |
Metres within which the prompt and the remote are available |
audio |
{ refDistance = full volume within, maxDistance = silent beyond } |
capabilities |
{ canvas = bool, media = bool, allowedKinds = { … } }. See below |
permissions |
{ use, edit, present } np_admin nodes required on top of the capability chain. nil = no extra restriction |
readOnly |
Drops edit for everyone, admins included |
A surface with neither canvas nor media is rejected. A renderTarget surface must be a prop whose model is in
Config.PropRenderTargets.
allowedKinds ​
Leave it out and every provider is allowed. Set it and a link is accepted when an entry matches either the provider name or the descriptor kind. An empty table denies everything.
| Provider | Kind | Notes |
|---|---|---|
image |
image |
Animated when the file is a .gif |
video_file |
video |
Direct .mp4 and similar. The name and kind differ |
pdf |
pdf |
Rendered with the bundled pdf.js |
youtube |
iframe |
Synced transport |
twitch, vimeo, gdocs, gsheets |
iframe |
|
gslides |
iframe (embed) / imageDeck (export) |
Slide controls either way |
webpage |
iframe |
The fallback for any other link, matched last |
allowedKinds = { 'youtube', 'video_file' } makes a TV. allowedKinds = { 'iframe' } allows every embed provider at once.
Examples ​
config/surfaces.lua ships one of each shape:
Config.SeedSurfaces = {
-- Cinema: a large floating quad, media only, video sources only.
{
id = 'cinema_main', contentId = 'cinema_main', label = 'Cinema Screen',
surfaceType = 'free', renderMode = 'quad',
x = -1662.9, y = -1128.5, z = 18.0, rx = 0.0, ry = 0.0, rz = 140.0,
width = 16.0, height = 9.0, resW = 1920, resH = 1080,
capabilities = { canvas = false, media = true, allowedKinds = { 'youtube', 'video_file', 'vimeo' } },
radius = 60.0, interactDistance = 30.0,
audio = { maxDistance = 60.0, refDistance = 15.0 },
},
-- Apartment TV: drawn into the prop's screen material. The model must be in Config.PropRenderTargets.
{
id = 'apartment_tv', contentId = 'apartment_tv', label = 'Living Room TV',
surfaceType = 'prop', model = 'prop_tv_flat_01', renderMode = 'renderTarget',
x = -266.0, y = -957.2, z = 31.2,
width = 1.2, height = 0.675, resW = 1920, resH = 1080,
capabilities = { canvas = false, media = true }, -- every provider
radius = 20.0, interactDistance = 5.0,
audio = { maxDistance = 18.0, refDistance = 3.0 },
},
-- Briefing board: drawable, plus slides, PDFs and images. A quad drawn over a whiteboard prop.
{
id = 'demo_briefing', contentId = 'demo_briefing', label = 'Briefing Board',
surfaceType = 'prop', model = 'ch_prop_whiteboard_03', renderMode = 'quad',
x = -1109.32, y = -845.16, z = 19.32, rz = 34.0,
width = 1.85, height = 1.05, resW = 1280, resH = 720,
capabilities = { canvas = true, media = true, allowedKinds = { 'gslides', 'pdf', 'image' } },
radius = 30.0, interactDistance = 2.5,
},
}
Mirror boards share a content id:
{ id = 'hq_main', contentId = 'wanted', readOnly = false, ... },
{ id = 'lobby_copy', contentId = 'wanted', readOnly = true, ... },
Restrict a surface to a staff group with per-surface nodes, and grant the node in np_admin:
permissions = {
use = nil, -- everyone who can view may open the remote
edit = 'np_screens.cinema', -- only cinema staff may change what is on it
present = 'np_screens.cinema', -- and only they may drive playback
},
Routing buckets ​
There is nothing to set up for housing. If your housing script puts players in routing buckets:
- Transport is per bucket. Pausing the TV in apartment 3 doesn't pause apartment 7. A bucket that never touches the remote has no state on the server, so most instances cost nothing.
- Content is shared. The link, canvas or deck on a content id is the same in every bucket. Setting a new video from any bucket points every bucket at it.
- Bucket changes heal themselves. The server notices a bucket change within about 2 seconds and sends the new
bucket's state. Clients also ask again every
Config.ResyncIntervalnear a surface. - A running TV survives an empty instance. State is only dropped when the bucket is empty, nothing plays and the queue is empty, so walking out and back in doesn't restart the film.
Add one prop / renderTarget surface per TV in the interior shell and every apartment instance works.
config.lua ​
| Key | Default | Meaning |
|---|---|---|
DrawDistance |
60.0 |
Metres. Beyond this a surface isn't drawn |
LiveDistance |
25.0 |
Metres. Video and live pages only play inside this |
DuiPool |
4 |
In-game browsers, created once at startup. Raising it costs VRAM for the whole session |
MaxAnimatedBoards |
2 |
How many pooled surfaces may run video or live pages. The rest show a poster frame |
MaxResolution |
1920×1080 |
Upper bound for resW / resH |
DefaultResolution |
1920×1080 |
Size of every pooled browser, and so the YouTube quality: 1920×1080 = 1080p, 1280×720 = 720p |
DoubleSided |
true |
Draw quads from behind too (two extra draw calls per surface per frame) |
ViewBonus |
0.5 |
Priority multiplier for surfaces in view. Lower favours them more |
ResyncInterval |
10000 |
ms between playback state requests while near a surface |
DriftTolerance |
2.0 |
Seconds of drift before the player seeks back to the server position |
PropRenderTargets |
6 TV models → tvscreen |
Model → named render target. Unlisted models fall back to tvscreen with a warning to the admin who adds them |
DynamicDefaults |
radius 20, interact 5, audio 18 / 3, media only | Applied to surfaces placed in game |
Brightness |
night 0.35, day 1.0, dawn 6, sunrise 8, sunset 19, dusk 21 |
Day / night tint curve (quads are unlit) |
SnapshotGraceHours |
24 |
Hours old whiteboard snapshots are kept before pruning |
MaxFetchBytes |
8 MiB |
Cap on any single outbound fetch |
Framework |
'auto' |
auto detects es_extended, qbx_core or qb-core. Or standalone, esx, qbcore |
Media |
twitchParent = 'localhost', autoplay = true, loop = false, muteEmbeds = true |
Twitch needs a fixed parent host. Embeds are muted, their sound comes from Audio |
Slides |
strategy = 'embed', ttlHours = 24, maxSlides = 200 |
embed is the confirmed strategy, export (mirrored slide images) is untested |
Audio |
strategy = 'xsound', maxDistance = 18, volume = 0.4, maxConcurrent = 1 |
Sound for embeds that aren't synced. 'nui' plays direct files only, 'off' disables it |
MasterVolume |
1.0 |
Multiplier on every surface volume |
CommandName |
'remote' |
Chat command that opens the remote |
InteractKey |
'E' |
Default key for the remote, rebindable in the FiveM key settings |
RateLimit |
10 tokens / 5000 ms |
Control events accepted per player |
Remote |
radius = 12.0, keybinds = true, requireItem = false, itemName = 'presenter_remote' |
Range of the slide keys and /presenter, the arrow-key slide binds, the remote item |
Locale |
'en' |
en and de ship |
Debug |
false |
Extra console output |
permissions.lua ​
| Key | Default | Meaning |
|---|---|---|
adminNode |
'np_screens.admin' |
Full access to every surface. Don't set it to nil on a live server, see Installation |
editImpliesPresent |
true |
Whoever may edit may also drive playback and slides |
defaultPresent |
false |
Whether everyone who can view a public content may also present on it |
presenterTtlSeconds |
300 |
Idle seconds before the presenter lock is released |
np_admin ​
With np_admin running, Settings → Screens edits about 80 keys in game. Only the overrides are stored, the files stay the defaults.
| Category | Keys |
|---|---|
| General | Locale, Debug |
| Render | DrawDistance, LiveDistance, DuiPool¹, MaxAnimatedBoards, DefaultResolution¹, DoubleSided, ViewBonus |
| Playback | ResyncInterval, DriftTolerance |
| Media, Slides, Audio | Media.*, Slides.*, Audio.*, MasterVolume, plus Presenter.laserHz and Presenter.handoverRadius under Slides |
| Interaction | CommandName¹, InteractKey¹, Remote.radius, Remote.keybinds¹ |
| Permissions | editImpliesPresent, defaultPresent, presenterTtlSeconds¹, RateLimit.* |
| Storage | SnapshotGraceHours, MaxFetchBytes |
| World | Every Config.World key (muteKey¹ and npMenu¹), Remote.requireItem, Remote.itemName¹ |
| Cinema | Request price, charge mode, cooldown, open requests, lifetime, audience range, vote ratio and minimum, ticket price and validity, schedule on / off and catch-up, broadcast maximum and default scope |
| Editor | collaborative, maxMembers, autosaveSeconds (after a reload), historyKeep, exportPng |
| Cast | enabled¹, default¹, icon¹, tint¹, range, slideshow and Chirp wall timings, notifyVia |
¹ needs a resource restart. Everything else applies live.
Every audit entry is also written to np_admin's log (category np_screens), and the np_screens_webhook convar
keeps working next to it. The staff actions are listed in Events & commands.
Theme ​
The player UIs (the whiteboard editor, the remote, the presenter view, the Surface manager and the HUD pill) follow
the server theme set in np_admin (Settings → np_admin → Theme: brand colour, strength, frosted or Liquid Glass
material). There is no local override. Without np_admin they read the replicated convars np_theme_brand,
np_theme_strength and np_theme_material (setr), and with nothing set they keep the neutral grey Nimbus look. See
np_admin → Theme.
The in-world screens (the browsers drawn onto TVs and boards, including the screensaver, the poster badge and the emergency broadcast card) are not themed.