API reference
Overview
Find Lua functions by table or bundled library.
Each Lua table has its own page. Choose a page to see function signatures, parameters, return values, and examples. Calls that cannot read a game value usually return nil, error; false is a valid result for boolean queries.
Game scripts
| Lua table | What it provides |
|---|---|
game | Character, world, movement, items, and quests. |
ui | Windows and interactive controls. |
gfx | Screen drawings. |
hotkeys | Key state and one-time presses. |
http | Asynchronous web requests. |
sound | System and WAV playback. |
defense | Auto Defense skills, rules, and events. |
script | Workers, pauses, and saved module values. |
log | Script messages. |
Bundled libraries
Import these with require.
| Library | What it provides |
|---|---|
sdk | Common game functions in one import. |
entities | Nearby entity helpers. |
ui_sdk | A window helper that opens and closes ui windows. |
Start with the quickstart if you have not run a script yet.