Skip to content

Configuration

Every option of Cuxial Screens: shared/config.lua block by block and the screens, apps, browser sites and models in data/.

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 ​

OptionTypeDefaultWhat it does
ui.accentstringConfigurableAccent 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.

OptionTypeDefaultWhat it does
pixelsnumber921600Pixels of each screen browser (1280 × 720). Width and height follow the aspect ratio of the model's screen.
minSide / maxSidenumber320 / 2048Minimum and maximum side of that resolution, in pixels.
maxLivenumber2Browsers 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.
distancenumber12.0Distance at which a screen prepares its prop and its interaction option. At rest, the model shows its own idle image.
releaseMsnumber30000Wait before releasing the browser of a screen nobody uses or watches.
pagestring'screen.html'Page loaded by each browser. Do not change it.
readyMsnumber5000Maximum wait for a screen page to load before showing an error.

use ​

OptionTypeDefaultWhat it does
interactDistancenumber1.8Distance of the Use screen option.
iconstring'fas fa-display'Icon of that option.
maxDistancenumber2.5Distance from the screen at which the session closes.
hidePedbooleantrueHides your character while you use a screen.
overlaybooleantruetrue draws the screen with its real colours, without the game's light and fog, while you use it.
drawCursorbooleanfalsetrue makes the screen draw its own cursor as well as the game's. false shows only one cursor.
exitKeysstring[]{ 'Escape' }Keys that close the screen, as KeyboardEvent.key names. 'Backspace' only closes while you are not typing.
checkMsnumber500How often the client checks whether you died or walked away.

camera ​

OptionTypeDefaultWhat it does
fillnumber0.76Part of the image height filled by the screen.
maxWidthnumber0.9Maximum screen width over the image width.
fovnumber40.0Field of view of the camera.
easeMsnumber600Duration of the camera transition.

A screen can override fill, maxWidth and fov with its own camera field.

input ​

OptionTypeDefaultWhat it does
wheelStepnumber120Mouse wheel step sent to the screen.
maxTextnumber4000Maximum text per send, pasting included.

session ​

OptionTypeDefaultWhat it does
maxDistancenumber4.0Maximum distance checked on the server. Keep it a bit larger than use.maxDistance.
checkMsnumber2000How often the server reviews open sessions.

os ​

OptionTypeDefaultWhat it does
name / buildstring'Cuxial OS' / '1.0.0'Name and version shown at boot and in Settings › About.
hostnamePrefixstring'CX'Prefix of the computer name when a screen has no hostname (CX-<id>).
clock24booleantruetrue 24-hour clock, false 12-hour with AM/PM.
bootbooleantrueBoot animation every time a screen is used.
soundsbooleantrueSystem sounds. Only the user of the screen hears them.
defaults.themestring'dark'Starting theme of each character: 'dark' or 'light'.
defaults.wallpaperstring'ember'Starting wallpaper, one of wallpapers.
defaults.accentstring''Starting accent. Empty uses ui.accent.
defaults.volumenumber0.6Starting volume of the system sounds, from 0.0 to 1.0.
accentsstring[]8 coloursAccent colours players can pick in Settings.
wallpapersstring[]ember, ember-light, aurora, dusk, waves, solidWallpapers players can pick.
pinnedstring[]files, notes, browserApps pinned to the taskbar, in order.
desktopstring[]files, notes, calculator, browser, settingsApps with a desktop icon, in order.
pinAttemptsnumber3Wrong PIN attempts before the lockout.
pinLockSecondsnumber60Seconds of lockout.
limits.files / limits.notesnumber100 / 50Documents and notes per character.
limits.fileName / limits.noteTitlenumber80 / 80Maximum length of a document name and a note title.
limits.fileBody / limits.noteBodynumber20000 / 20000Maximum characters of a document and a note.

apps ​

Limits for apps added by other resources.

OptionTypeDefaultWhat it does
rateLimit / rateWindowMsnumber20 / 2000Calls per player accepted from all external apps in that window.
maxPayloadnumber16384Maximum size in bytes of what an app sends.
maxResultnumber262144Maximum size in bytes of what its resource answers.
maxPushnumber65536Maximum size in bytes of data pushed from the server to an app.
latentAbove / latentBpsnumber8192 / 262144Pushes larger than latentAbove bytes travel as a latent event at latentBps bytes per second.
readyMsnumber8000Wait for an external app to connect before its window shows an error with Retry.

mirror ​

OptionTypeDefaultWhat it does
defaultModestring'private'Mode of screens that do not set one: 'private' only the user sees it, 'mirror' nearby players see what the user does.
distancenumber12.0Distance to the screen to watch the mirror. Never more than dui.distance.
slacknumber3.0Extra margin the server allows when checking that distance.
maxViewersnumber8Viewers per session.
maxWatchnumber2Screens a player can watch at the same time.
rateKBs / burstKBnumber32 / 256What the user of a screen can upload: sustained KB per second and burst in KB.
maxBatchKBnumber256Maximum size of one batch in KB. Never more than burstKB.
latentAbove / latentKBsnumber4096 / 256Batches larger than latentAbove bytes travel as a latent event at latentKBs KB per second.
batchMsnumber[]{ 100, 250, 500 }Interval between batches in ms: normal, after a batch over 8 KB and after one over 32 KB.
fullMinMsnumber1500Minimum time between two full snapshots.
backlognumber64Recent batches the server keeps for viewers who join mid-session.
resyncMsnumber2500Wait on a gap in the batches before asking for a new snapshot.
bufferMsnumber60Playback delay that absorbs network jitter.
maxEventsnumber20000Events played back before asking for a new snapshot and freeing memory.
checkMsnumber2000How often the server reviews viewers while there are any.

Nothing is recorded or sent while a screen has no viewers.

logs ​

OptionTypeDefaultWhat it does
retentionDaysnumber30Days staff actions are kept in cuxial_screens_log. 0 keeps them forever.

admin ​

OptionTypeDefaultWhat it does
permissionstring'admin'Staff permission for /screensadmin and the test monitor.
staffAccessbooleantrueStaff with that permission enter any screen and open any app, whatever its access.
placeRangenumber40.0Maximum distance, in metres, a new screen can be moved with the gizmo.
pickRadiusnumber3.0Radius, in metres, used by Find on map to find a map screen of the chosen model.

commands ​

OptionDefaultWhat 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 ​

OptionTypeDefaultWhat it does
modelstable[]One per aspectTest monitor for each aspect ratio of /screentest. The first one is the default.
distancenumber1.1Distance 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.

FieldTypeWhat it does
idstringUnique id.
modelstringModel with its screen face in data/models.lua.
coordsvector3Origin of the prop, or position of the map entity.
headingnumberHeading of the prop when the script creates it.
propbooleantrue makes every client create the model at coords. Without it, the script looks for the model already on the map.
usevector3Interaction point. By default, the centre of the screen.
labelstringName of the screen.
hostnamestringComputer name on the sign-in screen and in Settings.
accesstable{ jobs = { [job] = minGrade }, boss = true }. Without access anyone can use it. With boss = true the player must also be boss of that job.
appsstring[]Apps shown on this screen. Without it, every app the player has access to.
tagsstring[]Tags. An external app with tags appears on screens that share one.
pinstringSign-in PIN. It stays on the server. Without it, the sign-in screen shows a button.
modestring'private' or 'mirror'. Default mirror.defaultMode.
mirrorOfstringId of another screen. This one cannot be used: it only shows the mirror of that one.
cameratable{ fill, maxWidth, fov } for this screen.
interactbooleanfalse removes the interaction option. The screen is then opened only by another resource.
data/screens.lua
lua
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.

FieldTypeWhat it does
idstringId of the app.
labelstringLocale key or text.
iconstringIcon id.
size / minSizetable{ w, h } of the window when it opens and its minimum size.
accesstable{ jobs = { [job] = minGrade } }. Without it, everyone.
screensstring[]Screen ids where it appears. Without it, on all of them.
privatebooleantrue 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.

FieldTypeWhat it does
addressstringAddress typed in the bar: lowercase, without https:// or www..
titlestringTitle of the page.
bookmarkbooleantrue adds it to the bookmarks bar.
kindstring'blocks' page built from blocks, or 'url' external site in a frame.
urlstringOnly with kind = 'url'. Must start with https://.
blockstable[]Content of a 'blocks' page.

Available blocks:

BlockFields
h1, h2, ptext
listitems (texts)
noticetext, tone ('info', 'warn' or 'ok')
linksitems ({ label, href })
tablehead, rows
imgsrc (https://), alt
data/browser.lua
lua
{
    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.

FieldTypeWhat it does
txdstringTexture dictionary of the model (its own name).
texturestringTexture of the screen face, replaced by the image of the screen.
cornersvector3[]The four corners of the screen in local space of the model: top left, top right, bottom right, bottom left.
resolutiontableOptional { 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.

© Cuxial