All settings live in shared/config.lua. Screens, built-in apps, browser sites and screen models are defined in the files of data/.
The os block and data/browser.lua can also be edited live from /screensadmin. Once saved there, the database values take over from the files. The Factory button of each section goes back to the files.
ui
| Option | Type | Default | What it does |
|---|---|---|---|
ui.accent | string | Configurable | Accent colour of Cuxial OS and of the staff panel, in hex (#rrggbb). |
dui
Each screen in use is drawn by an in-game browser. These options control how many there are and their resolution.
| Option | Type | Default | What it does |
|---|---|---|---|
pixels | number | 921600 | Pixels of each screen browser (1280 × 720). Width and height follow the aspect ratio of the model's screen. |
minSide / maxSide | number | 320 / 2048 | Minimum and maximum side of that resolution, in pixels. |
maxLive | number | 2 | Browsers alive at the same time. The screen you are using always gets one. Browsers only start when a screen is used or its mirror has to be shown. |
distance | number | 12.0 | Distance at which a screen prepares its prop and its interaction option. At rest, the model shows its own idle image. |
releaseMs | number | 30000 | Wait before releasing the browser of a screen nobody uses or watches. |
page | string | 'screen.html' | Page loaded by each browser. Do not change it. |
readyMs | number | 5000 | Maximum wait for a screen page to load before showing an error. |
use
| Option | Type | Default | What it does |
|---|---|---|---|
interactDistance | number | 1.8 | Distance of the Use screen option. |
icon | string | 'fas fa-display' | Icon of that option. |
maxDistance | number | 2.5 | Distance from the screen at which the session closes. |
hidePed | boolean | true | Hides your character while you use a screen. |
overlay | boolean | true | true draws the screen with its real colours, without the game's light and fog, while you use it. |
drawCursor | boolean | false | true makes the screen draw its own cursor as well as the game's. false shows only one cursor. |
exitKeys | string[] | { 'Escape' } | Keys that close the screen, as KeyboardEvent.key names. 'Backspace' only closes while you are not typing. |
checkMs | number | 500 | How often the client checks whether you died or walked away. |
camera
| Option | Type | Default | What it does |
|---|---|---|---|
fill | number | 0.76 | Part of the image height filled by the screen. |
maxWidth | number | 0.9 | Maximum screen width over the image width. |
fov | number | 40.0 | Field of view of the camera. |
easeMs | number | 600 | Duration of the camera transition. |
A screen can override fill, maxWidth and fov with its own camera field.
input
| Option | Type | Default | What it does |
|---|---|---|---|
wheelStep | number | 120 | Mouse wheel step sent to the screen. |
maxText | number | 4000 | Maximum text per send, pasting included. |
session
| Option | Type | Default | What it does |
|---|---|---|---|
maxDistance | number | 4.0 | Maximum distance checked on the server. Keep it a bit larger than use.maxDistance. |
checkMs | number | 2000 | How often the server reviews open sessions. |
os
| Option | Type | Default | What it does |
|---|---|---|---|
name / build | string | 'Cuxial OS' / '1.0.0' | Name and version shown at boot and in Settings › About. |
hostnamePrefix | string | 'CX' | Prefix of the computer name when a screen has no hostname (CX-<id>). |
clock24 | boolean | true | true 24-hour clock, false 12-hour with AM/PM. |
boot | boolean | true | Boot animation every time a screen is used. |
sounds | boolean | true | System sounds. Only the user of the screen hears them. |
defaults.theme | string | 'dark' | Starting theme of each character: 'dark' or 'light'. |
defaults.wallpaper | string | 'ember' | Starting wallpaper, one of wallpapers. |
defaults.accent | string | '' | Starting accent. Empty uses ui.accent. |
defaults.volume | number | 0.6 | Starting volume of the system sounds, from 0.0 to 1.0. |
accents | string[] | 8 colours | Accent colours players can pick in Settings. |
wallpapers | string[] | ember, ember-light, aurora, dusk, waves, solid | Wallpapers players can pick. |
pinned | string[] | files, notes, browser | Apps pinned to the taskbar, in order. |
desktop | string[] | files, notes, calculator, browser, settings | Apps with a desktop icon, in order. |
pinAttempts | number | 3 | Wrong PIN attempts before the lockout. |
pinLockSeconds | number | 60 | Seconds of lockout. |
limits.files / limits.notes | number | 100 / 50 | Documents and notes per character. |
limits.fileName / limits.noteTitle | number | 80 / 80 | Maximum length of a document name and a note title. |
limits.fileBody / limits.noteBody | number | 20000 / 20000 | Maximum characters of a document and a note. |
apps
Limits for apps added by other resources.
| Option | Type | Default | What it does |
|---|---|---|---|
rateLimit / rateWindowMs | number | 20 / 2000 | Calls per player accepted from all external apps in that window. |
maxPayload | number | 16384 | Maximum size in bytes of what an app sends. |
maxResult | number | 262144 | Maximum size in bytes of what its resource answers. |
maxPush | number | 65536 | Maximum size in bytes of data pushed from the server to an app. |
latentAbove / latentBps | number | 8192 / 262144 | Pushes larger than latentAbove bytes travel as a latent event at latentBps bytes per second. |
readyMs | number | 8000 | Wait for an external app to connect before its window shows an error with Retry. |
mirror
| Option | Type | Default | What it does |
|---|---|---|---|
defaultMode | string | 'private' | Mode of screens that do not set one: 'private' only the user sees it, 'mirror' nearby players see what the user does. |
distance | number | 12.0 | Distance to the screen to watch the mirror. Never more than dui.distance. |
slack | number | 3.0 | Extra margin the server allows when checking that distance. |
maxViewers | number | 8 | Viewers per session. |
maxWatch | number | 2 | Screens a player can watch at the same time. |
rateKBs / burstKB | number | 32 / 256 | What the user of a screen can upload: sustained KB per second and burst in KB. |
maxBatchKB | number | 256 | Maximum size of one batch in KB. Never more than burstKB. |
latentAbove / latentKBs | number | 4096 / 256 | Batches larger than latentAbove bytes travel as a latent event at latentKBs KB per second. |
batchMs | number[] | { 100, 250, 500 } | Interval between batches in ms: normal, after a batch over 8 KB and after one over 32 KB. |
fullMinMs | number | 1500 | Minimum time between two full snapshots. |
backlog | number | 64 | Recent batches the server keeps for viewers who join mid-session. |
resyncMs | number | 2500 | Wait on a gap in the batches before asking for a new snapshot. |
bufferMs | number | 60 | Playback delay that absorbs network jitter. |
maxEvents | number | 20000 | Events played back before asking for a new snapshot and freeing memory. |
checkMs | number | 2000 | How often the server reviews viewers while there are any. |
Nothing is recorded or sent while a screen has no viewers.
logs
| Option | Type | Default | What it does |
|---|---|---|---|
retentionDays | number | 30 | Days staff actions are kept in cuxial_screens_log. 0 keeps them forever. |
admin
| Option | Type | Default | What it does |
|---|---|---|---|
permission | string | 'admin' | Staff permission for /screensadmin and the test monitor. |
staffAccess | boolean | true | Staff with that permission enter any screen and open any app, whatever its access. |
placeRange | number | 40.0 | Maximum distance, in metres, a new screen can be moved with the gizmo. |
pickRadius | number | 3.0 | Radius, in metres, used by Find on map to find a map screen of the chosen model. |
commands
| Option | Default | What it does |
|---|---|---|
test | { name = 'screentest', restricted = 'group.admin' } | Places or removes the test monitor. |
admin | { name = 'screensadmin' } | Staff panel. |
mirror | { name = 'screensmirror', restricted = 'group.admin' } | Mirror status in the server console. |
registry | { name = 'screensreg', restricted = 'group.admin' } | Screens registered on the server and on your client. |
test
| Option | Type | Default | What it does |
|---|---|---|---|
models | table[] | One per aspect | Test monitor for each aspect ratio of /screentest. The first one is the default. |
distance | number | 1.1 | Distance in front of the player where it appears. |
data/screens.lua
Fixed screens, defined in code. Screens placed from /screensadmin are stored in the database and do not need to be here.
| Field | Type | What it does |
|---|---|---|
id | string | Unique id. |
model | string | Model with its screen face in data/models.lua. |
coords | vector3 | Origin of the prop, or position of the map entity. |
heading | number | Heading of the prop when the script creates it. |
prop | boolean | true makes every client create the model at coords. Without it, the script looks for the model already on the map. |
use | vector3 | Interaction point. By default, the centre of the screen. |
label | string | Name of the screen. |
hostname | string | Computer name on the sign-in screen and in Settings. |
access | table | { jobs = { [job] = minGrade }, boss = true }. Without access anyone can use it. With boss = true the player must also be boss of that job. |
apps | string[] | Apps shown on this screen. Without it, every app the player has access to. |
tags | string[] | Tags. An external app with tags appears on screens that share one. |
pin | string | Sign-in PIN. It stays on the server. Without it, the sign-in screen shows a button. |
mode | string | 'private' or 'mirror'. Default mirror.defaultMode. |
mirrorOf | string | Id of another screen. This one cannot be used: it only shows the mirror of that one. |
camera | table | { fill, maxWidth, fov } for this screen. |
interact | boolean | false removes the interaction option. The screen is then opened only by another resource. |
return {
{
id = 'pd_desk',
label = 'Front desk',
model = 'cuxial_screens_test',
coords = vec3(441.2, -978.9, 30.7),
heading = 180.0,
prop = true,
access = { jobs = { police = 0 } },
pin = '1234',
mode = 'mirror',
},
}data/apps.lua
The built-in apps: files, notes, calculator, browser and settings.
| Field | Type | What it does |
|---|---|---|
id | string | Id of the app. |
label | string | Locale key or text. |
icon | string | Icon id. |
size / minSize | table | { w, h } of the window when it opens and its minimum size. |
access | table | { jobs = { [job] = minGrade } }. Without it, everyone. |
screens | string[] | Screen ids where it appears. Without it, on all of them. |
private | boolean | true shows a card instead of its content to mirror viewers. |
data/browser.lua
The sites of the browser. Only addresses listed here can be opened. The included sites are examples to replace with your own.
| Field | Type | What it does |
|---|---|---|
address | string | Address typed in the bar: lowercase, without https:// or www.. |
title | string | Title of the page. |
bookmark | boolean | true adds it to the bookmarks bar. |
kind | string | 'blocks' page built from blocks, or 'url' external site in a frame. |
url | string | Only with kind = 'url'. Must start with https://. |
blocks | table[] | Content of a 'blocks' page. |
Available blocks:
| Block | Fields |
|---|---|
h1, h2, p | text |
list | items (texts) |
notice | text, tone ('info', 'warn' or 'ok') |
links | items ({ label, href }) |
table | head, rows |
img | src (https://), alt |
{
address = 'news.ls',
title = 'City news',
bookmark = true,
kind = 'blocks',
blocks = {
{ t = 'h1', text = 'City news' },
{ t = 'notice', tone = 'warn', text = 'Roadworks on the Senora freeway.' },
{ t = 'links', items = { { label = 'City hall', href = 'cityhall.ls' } } },
},
},data/models.lua
The models that can be used as screens and where their screen is. The included monitors are already listed.
| Field | Type | What it does |
|---|---|---|
txd | string | Texture dictionary of the model (its own name). |
texture | string | Texture of the screen face, replaced by the image of the screen. |
corners | vector3[] | The four corners of the screen in local space of the model: top left, top right, bottom right, bottom left. |
resolution | table | Optional { w, h } that fixes the resolution of this screen. |
Every model listed here needs a screen texture with a name of its own. Two screens with the same texture show the same image, and only one of them gets a browser at a time. The staff panel marks them with Shared texture.
