Lua API
The public API is grouped by ownership and purpose. Server-authoritative operations are marked Server; local presentation APIs may be available on Client.
Runtime and eventsThreads, timers, cron, events, commands, exports, permissions, and convars.Data and persistenceJSON, sandboxed files, MySQL, inventory revisions, and transactions.Gameplay and worldPlayers, containers, equipment, UI, assets, recipes, mobs, zones, and world objects.Detailed source referenceGenerated from natives.md and limited to the implemented API surface.
Conventions
- Lua arrays returned by the engine are indexed from
1. - Missing objects return
nil; failed mutations generally returnfalseornil. peerId = 0refers to the local player in client-side APIs that support it.- Server mutations are serialized through the owning resource execution context.
- Resource shutdown cancels scheduled and pending asynchronous work.
- Runtime object IDs are ephemeral and must not be persisted.
Side labels
| Label | Meaning |
|---|---|
| Client / Server | Registered in both resource VM types |
| Client | Local game client only |
| Server | Dedicated or listen server authority only |
Only implemented APIs are documented on this site. Proposed APIs remain in the repository roadmap until the runtime registers them.
The detailed source reference is generated from natives.md during docs startup and build so that the exhaustive implemented API list stays closer to the repository source of truth.