Configuration
Last updated on
Every key of config/shared.lua, config/server.lua and config/client.lua — the runtime's own settings, outside any module — with its shipped default.
These three files hold the settings that belong to the runtime rather than to one module: server name, language, money types, health pool, command aliases, entry gate, WebUI page. Module settings live in config/<module>.lua, documented on each module page.
| File | Script | Sets | Who can read it |
|---|---|---|---|
config/shared.lua | shared_script | OPX.Config.SHARED, OPX.Config.MODULES | server and every client |
config/server.lua | server_script | OPX.Config.SERVER | server only (nil on a client) |
config/client.lua | client_script | OPX.Config.CLIENT | client only (nil on the server). Not trusted: a player can change it. |
Every value below is the shipped default.
config/shared.lua
Nothing secret belongs here: it is sent to every player.
| Key | Default | What it does |
|---|---|---|
LOCALE | 'en' | Active language of the locale catalogue. English is always the fallback. Shipped: en, fr. |
SERVER_NAME | 'OPEN//77' | Title of every toast sent with OPX.Notify, and author of every command read-back (OPX.CommandResult). |
NOTIFY_POSITION | 'top_right' | position passed to Open77.notifications.send by OPX.Notify: middle_left, top_left, top_center, top_right, bottom_left, bottom_center, bottom_right. A hyphen is accepted for the underscore; anything else is logged once and the package default is used. Does not move the runtime's own toasts (see TOASTS). |
MONEY | see MONEY | Money types. Read by character, inventory and admin. |
HEALTH | see HEALTH | The health pool every character is placed with, in points. Applied by character. |
AV_PREFIXES | { 'vehicle.av_', 'vehicle.max_tac_av' } | A TweakDB vehicle record starting with one of these (compared lower-case) is an AV. Read only by OPX.Vehicle.IsAvRecord. An empty list falls back to the shipped pair. |
REACH_SLACK | 1.0 | Metres the server adds to a place's reach when it measures a press again: garages, dealers, fitting rooms, teleports, lifts, shops, crafting and gunsmith benches, vehicle keys. The server measures where it last saw the player, a moment behind the press, so a row drawn at the edge was refused as "too far" without it. 0 to 4. Read by OPX.Spots.ServerReach. doorlock has its own SLACK. |
MONEY
| Sub-key | Default | What it does |
|---|---|---|
DEFAULT | 'EDDIES' | The money type used when none is named (e.g. the paycheck fallback). |
TYPES | { EDDIES = 'EDDIES', BANK = 'BANK' } | Every money type a character has. A type not listed is refused. |
ALLOW_NEGATIVE | {} | Types whose balance may go below zero, as { BANK = true }. |
HEALTH
| Sub-key | Default | What it does |
|---|---|---|
MAX | 250 | Maximum health in points, applied with Open77.players.setMaxHealth. The engine's own default is 100. |
LEGACY_FULL | 100 | Stored health at or above this is placed at full: rows written before MAX existed are on a 0–100 scale. Do not raise it. |
OPX.Config.MODULES
config/shared.lua creates OPX.Config.MODULES = {}; each config/<module>.lua fills its own entry. The runtime reads one key from it: enabled = false switches a module off (state disabled). Every other key belongs to the module.
config/server.lua
| Key | Default | What it does |
|---|---|---|
CONFLICTING_PLACERS | { 'open77_playerstate', 'freeroam', 'pursuit', 'race' } | Resources that also place players. At boot, a warning is logged for each one running or starting. |
COMMAND_ALIASES | see COMMAND_ALIASES | Short names for commands, full name → alias. Empty the table to turn aliases off. |
ENTRY | see ENTRY | The readiness gate and the selection bucket a player waits in. Each value is checked once at load; a bad one is logged and the shipped value is used. |
EXPORTS | see EXPORTS | Who may call the server exports, and the rules for stashes created by them. |
EXPORTS
Who may call the creator exports in core/server/exports.lua. The caller is the resource name the host reports, never an argument. A list is '*', a set { my_shop = true } or an array { 'my_shop' }.
| Key | Default | What it does |
|---|---|---|
READ | '*' | Who may call the read exports (GetPlayerData, GetMoney, HasJob, HasItem, IsStaff…). |
WRITERS | {} | Who may call the write exports (money, jobs, gangs, duty, metadata, revive, items, stashes, chat, keys, vehicle state). Empty: nobody until the operator adds a resource. A refused caller is answered export.callerDenied, audited, and the journal prints the line to add. '*' admits every resource (development only). |
STAFF_PERMISSION | 'command.opx.admin' | The ACL right the IsStaff export checks. |
METADATA.MAX_BYTES | 4096 | SetMetadata: largest encoded size of one value. |
METADATA.MAX_KEYS | 32 | SetMetadata: most keys one resource may keep on one character. |
METADATA.MAX_TOTAL_BYTES | 16384 | SetMetadata: largest encoded size of all of one resource's keys on one character. |
STASHES.CREATE_CAP | 25 | How many stashes one resource may create with AddToStash, named <resource>.<name>. Counted in the database. |
STASHES.IDLE_MS | 60000 | A stash loaded by an export and not opened by a player is saved and put away this long after its last use. |
See For creators.
COMMAND_ALIASES
- The full name is still the command: it keeps working, and the ACL right is still
command.<full name>. An alias is checked against that same right, so grant only the full name. - An alias that cannot be registered (taken by another resource, not a legal name, or starting with
opx.) is skipped with a warning in the log.OPX.Command.Aliaseslists what actually registered. Rules: Aliases and the ACL.
| Alias | Command | Owner |
|---|---|---|
chars | opx.characters | character |
duty | opx.duty | character |
withdraw | opx.withdraw | inventory |
noclip | opx.admin.self.noclip | admin |
god | opx.admin.self.god | admin |
invis | opx.admin.self.invisible | admin |
heal | opx.admin.self.heal | admin |
revive | opx.admin.self.revive | admin |
speed | opx.admin.self.speed | admin |
pos | opx.admin.self.pos | admin |
goto | opx.admin.player.goto | admin |
bring | opx.admin.player.bring | admin |
tp | opx.admin.player.tp | admin |
freeze | opx.admin.player.freeze | admin |
spectate | opx.admin.player.observe | admin |
addweapon | opx.admin.weapon.give | admin |
addammo | opx.admin.weapon.giveammo | admin |
delweapon | opx.admin.weapon.remove | admin |
car | opx.admin.vehicle.spawn | admin |
fix | opx.admin.vehicle.repair | admin |
dv | opx.admin.vehicle.remove | admin |
announce | opx.admin.world.announce | admin |
No alias is shipped for opx.admin, for irreversible commands (ban, kick, kill, character delete, opx.delete), or for generic words such as give or weather.
ENTRY
| Sub-key | Default | What it does |
|---|---|---|
GATE_MS | 300000 | Liveness interval declared to the readiness gate, in ms. A watchdog on the core, not a limit on the player. Clamped to 1000–600000. |
WATCH_MS | 240000 | How long OPX.Gate.Watch waits before giving up on a player. Must be below GATE_MS; otherwise 80 % of GATE_MS is used and an error is logged. |
BUCKET.ISOLATE | true | Put each player in their own selection bucket until a character is placed. false moves nobody. |
BUCKET.BASE | 77000 | A player's selection bucket is BASE + playerId: range BASE+1 .. BASE+65535. |
BUCKET.WORLD | 0 | The shared bucket characters are placed in. A value inside the selection range is an error, and isolation is switched off. |
BUCKET.POPULATION | false | Ambient population inside a selection bucket. |
BUCKET.LOCKDOWN | 'relaxed' | Lockdown mode of a selection bucket: inactive, relaxed, strict or full. false leaves the host's mode alone. |
config/client.lua
| Key | Default | What it does |
|---|---|---|
SURFACE | { layer = 'hud', zIndex = 700, fps = 60 } | The one WebUI page. layer: hud, menu, modal, system or debug (system needs the webui.system permission; an unknown value becomes hud). fps is fixed when the page is created. |
EXPORTS | { CALLERS = '*', REPLY = 'OnOpxEvent' } | The client exports. CALLERS: who may call them, including Subscribe ('*', a set or an array). REPLY: the export of the caller that receives answers when a call names no reply. Advice, not a lock: the server re-checks anything that matters. |
TOASTS | { position = 'top_right', width = 340 } | Where the runtime's own toasts stack, and their width in px. position: top_left, top_center, top_right, middle_left, bottom_left, bottom_center or bottom_right. The page refuses an unknown name and keeps its default. |
KEY_PRIORITY | see below | The ranks of the key contest: when several features share one physical key (E, X), only the highest-ranked one with something to do acts; at equal rank the nearer one. Higher wins; reorder freely, a missing name keeps its default. Read by OPX.Spots.Key.Rank. |
KEY_PRIORITY
| Name | Default | When |
|---|---|---|
PROGRESS | 100 | a cancelable progress bar is up (X cancels it) |
PICK | 95 | a lockpick under way, or staff Pick in world on the door panel (E). Beats a nearer spot. |
OPEN | 90 | the key closes a list it opened: garages, dealership (E) |
RINGING | 80 | a call rings at the player (X declines) |
OUTGOING | 70 | the player is ringing someone (X withdraws) |
CARRY | 60 | a hauling crate is carried (X puts it down) |
EMOTE | 50 | the player's own emote plays (X stops it) |
SPOT | 20 | at a garage, dealer, fitting room, lift, teleport or door (E) |
CALL | 10 | on a call (X hangs up) |
KEY_PRIORITY = { CARRY = 85 } -- the other names keep their defaultsTwo spots on E (a garage beside a door) are both SPOT: the nearer one acts and only its key-strip row is drawn.
Client
The client-only OPX.* runtime — the WebUI bridge and focus stack, the runtime's own toasts, notes to the server journal, OPX.Lib and the client scheduler loop.
Events
The net events the core itself sends and listens to, the host event names in OPX.Host, the core's WebUI page channels, and its private internal events.