Reference
Generated from the game code on every build. If a field, call or event exists in the game, it is on these pages; if the code changes and the pages do not, the docs test fails.
Data kinds
Section titled “Data kinds”One file per kind: data/<kind>.json. Or the same from Luau with mod.data.
| Kind | Records | Add | Remove | What it is |
|---|---|---|---|---|
economy |
one | Economy | ||
ships |
4 | Ships | ||
buildings |
12 | Buildings | ||
superweapons |
7 | yes | Superweapons | |
upgrades |
50 | yes | yes | Upgrades |
bots |
5 | yes | Bots | |
bot_tuning |
one | Bot tuning | ||
tiers |
20 | Tiers | ||
variants |
3 | Variants | ||
arsenal |
one | Arsenal | ||
outposts |
4 | Outposts | ||
minis |
one | Mini islands | ||
map |
one | Map | ||
strings |
0 | yes | yes | Strings |
The mod API
Section titled “The mod API”| Page | Covers |
|---|---|
| Identity and logging | id version api_version side is_server is_client log warn |
| mod.data | data.add data.patch data.replace data.remove data.get data.has data.list data.kinds REMOVE |
| Events | on off events |
| Timers and time | after every cancel time |
| Text | text |
| Random numbers | rng |
| Files, JSON and other mods | json.decode json.encode read require use exports |
| mod.save | save.get save.set |
| mod.game | game.cash game.best_tier game.charges game.give_charge game.toast |
| mod.weapons | weapons.on_plan |
| mod.fx | fx.shake fx.flash fx.blast |
| Audio and sprites | audio.play audio.has sprite |
| mod.ui | ui.widget ui.button ui.panel ui.colors |
Also: mod.json, sandbox globals, troubleshooting.