mux package
mux is the built-in server API available to every Lua module. It is supplied
by the game server rather than loaded with require. Lua callbacks and commands
run with the server’s #1 authority model; scripts should still use the callback
context to identify the object and enactor that triggered them.
Functions
Objects and state
| Function | Description |
|---|
mux.object | Creates a validated handle for a database object. |
Styled text
Connections and flows
Types
| Type | Description |
|---|
Object | A validated handle for a native database object. |
Attribute | Access to an object’s supported native attributes. |
State | Typed, persistent state in one object namespace. |
Availability and limits
Runtime database operations are unavailable during @lua/check. The Lua
sandbox does not expose filesystem, operating-system, debugger, FFI, coroutine,
or dynamic code-loading APIs. VM memory and persistent-state limits still apply
while using these functions.