Files & Convars
On this page8
There are two config files and they are not interchangeable.
| File | Loaded as | Who can read it | What belongs in it |
|---|---|---|---|
config.lua | shared_scripts | the server and every connected player | Gameplay numbers, feature switches, integration selectors, item names, HUD defaults. |
config_server.lua | server_scripts | the server only | Secrets, Discord webhook URLs, photo hosting keys, rate limits, retention, clean-up. |
Both files stay open after asset escrow (together with locales/*.lua and
bridge/*.lua), so you can edit them and keep your edits across updates.
Units used in config.lua
| Suffix | Means |
|---|---|
...Seconds, ...Ms, ...Minutes, ...Hours, ...Days | exactly that |
...Pct, ...At | whole percent, 0–100 |
...Factor, ...Match, ...Share | a multiplier, 0.0–1.0 |
| distances | metres |
| angles | degrees |
General
| Key | Default | Allowed | What it does |
|---|---|---|---|
Config.Debug | false | true / false | Extra console output and the admin debug overlay. |
Config.Locale | 'en' | any file in locales/ | Which language file to load. |
Convars
Every secret in config_server.lua can also be set from server.cfg. The convar
always wins over the value written in the file, and an empty or unset convar
leaves the file value alone.
set recognition_secret "a-long-random-string"
set recognition_webhook_default "https://discord.com/api/webhooks/..."
set recognition_webhook_proofs "https://discord.com/api/webhooks/..."
set recognition_webhook_deaths "https://discord.com/api/webhooks/..."
set recognition_webhook_admin "https://discord.com/api/webhooks/..."
set recognition_webhook_exports "https://discord.com/api/webhooks/..."
set recognition_webhook_errors "https://discord.com/api/webhooks/..."
set recognition_webhook_anomalies "https://discord.com/api/webhooks/..."
set recognition_fivemanage_key "YOUR_KEY_HERE"
set recognition_photo_webhook "https://discord.com/api/webhooks/..."| Convar | Overrides | Notes |
|---|---|---|
recognition_secret | ServerConfig.SecretSalt | Set it before the first start, then never change it. |
recognition_webhook_default | ServerConfig.Webhooks.Default | Anything without its own channel. |
recognition_webhook_proofs | .Proofs | Action snapshots. |
recognition_webhook_deaths | .Deaths | New Life Rule resets. |
recognition_webhook_admin | .Admin | Admin edits, deletes, identity resets, settings changes. |
recognition_webhook_exports | .Exports | One-click pair exports from the panel. |
recognition_webhook_errors | .Errors | Script errors. |
recognition_webhook_anomalies | .Anomalies | Possible cheating. |
recognition_fivemanage_key | ServerConfig.Fivemanage.ApiKey | Only when PhotoHost = 'fivemanage'. |
recognition_photo_webhook | ServerConfig.PhotoDiscord.Webhook | Only when PhotoHost = 'discord'. |
The secret salt
ServerConfig.SecretSalt = '' -- convar: recognition_secret
ServerConfig.AllowSaltChange = false| Key | Default | Allowed | What it does |
|---|---|---|---|
ServerConfig.SecretSalt | '' | any long random text | Keeps the hidden voice values secret and protects the proof log. |
ServerConfig.AllowSaltChange | false | true / false | Whether a changed salt is accepted at boot. Leave it off. |
Leave it empty and the script generates one into the database on first start. That works, but it is weaker — anyone with database access can read it — and the console warns at every boot:
[5code-recognition] The secret salt is stored in the database. Set recognition_secret in server.cfg (see docs: Security).Anti-spam and safety limits
config_server.lua also holds a few protection blocks. Leave them as they are
unless 5CODE support asks you to change them. Players never download this file.
| Block | What it is |
|---|---|
ServerConfig.RateLimits | Per-player anti-spam limits: how often one player's game may send each kind of message (starting scans, actions like introduce or the mirror, photos, admin panel traffic and so on). |
ServerConfig.Security.MaxPayloadBytes | The largest message the server accepts, per kind of message. A bigger one is dropped. |
ServerConfig.Security.FocusPosMaxDistance | A camera-distance limit used while scanning. Third-person cameras sit several metres behind the character, so keep it generous. On server artifacts older than 12882 this check is skipped and the console says so once at boot. |
| Key | Default | Allowed | What it does |
|---|---|---|---|
ServerConfig.Security.LogAnomalies | true | true / false | Save "possible cheating" notes in the database (recognition_anomalies) for admins. |
ServerConfig.Security.AnomalyWebhook | true | true / false | Also send them to the Anomalies webhook. |
Letting other resources call our write exports
ServerConfig.Api = {
TrustedResources = {}, -- e.g. { 'my_surgeon_shop', 'my_idcard' }
}Our own bridges are always allowed. Anything else that calls a write export —
ResetIdentity, StartFaceImplant, ReportDown / ReportRevived /
ReportRespawned, GrantLabIdentification, LogAction, RecordIntroduction,
GiveItem, TriggerItemUse — must be named here, or the call is refused and logged
for admins.
Performance logging
| Key | Default | Allowed | What it does |
|---|---|---|---|
ServerConfig.Perf.TickWarnMs | 5.0 | ms | Warn when one background loop tick takes longer than this. |
ServerConfig.Perf.WindowSeconds | 300 | seconds | Rolling window shown by recognition:status. |
ServerConfig.Perf.LogEveryMinutes | 0 | 0 = off, else minutes | Periodic performance line in the console. |
ServerConfig.Debug | false | true / false | Extra server-side logging. |
What can and cannot be changed in game
Admins with the settings level can change almost everything in config.lua from
the panel. These can only ever be changed in the files:
- Everything in
ServerConfig— webhooks, the salt, photo keys, rate limits, retention. It is never even offered in the panel. - Every integration selector (
Config.Framework,Config.MulticharSystem, every*Systemkey) andConfig.MDT[...]— they are resolved once at boot. - The admin permission settings (
Config.Admin.Ace,.FrameworkGroups,.TxAdmin,.TxAdminPerms,.Perms,.GroupPerms,.LiveSettings,.FileOnly,.SettingPerms) and the audit switches (.BlockSelfEdit,.BlockSelfView,.RequireReason,.LogViews,.DiscordActions) — admins can never widen their own rights from inside the game. Config.Memory.Disguises, which changes the shape of stored memory rows.
Details, plus how to lock more keys yourself: Admin & Permissions.