Coming soon toSteam
Modding docsAPI 1

Publishing and updates

Packing

theonaris-mod pack my-mod --out releases

You get <id>-<version>.zip, validated and within the download limits. Players install it by dropping the zip into their mods folder, with no need to unpack (see Installing mods). Hidden files (like .luarc.json) and unknown file types are left out. The command line tool page says where to get theonaris-mod.

Include a README.md and a LICENSE in your mod: they are packed and help people who take it apart.

Versions

Use semantic versions:

Never change the mod id or a content id: saves and servers refer to them. Renaming a block's id makes every creation using it lose that block.

Set game to the versions you tested: ">=0.1.0", or "^0.4.0" if a later game version might break you.

Dependencies

Libraries are ordinary mods that mod.export functions:

"dependencies": { "someone.ui-kit": "^1.2.0" },
"optionalDependencies": { "someone.sounds": "*" }

A mod whose dependency is missing, disabled, out of range or failed does not start, and Mods says which one. Players need the dependency installed. Servers send dependencies along with the mod.

Updates and permissions

Players replace the old zip or folder with the new one and press Refresh in Mods. If the new version asks for different permissions than the player allowed, it shows as Needs consent and waits for them to review the change. Keep permission changes rare, and explain them in your changelog.

Settings keep their values across updates if the key and type stay the same. Storage is kept by mod id.

Multiplayer downloads

When a player joins a server, the server tells them which mods its session runs, each with an id, version, size, permissions and content hash. Only mods with "network": "required" or "optional" are listed. For each mod the player:

Before anything downloads, the player sees the list with sizes and permissions and chooses Download and join (Join when nothing needs downloading) or Leave. Optional mods can be skipped: they are only fetched with Join with optional mods. A list with a high-risk mod needs an extra tick before the player can join, so ask for as little as you need. The server streams the files with a bandwidth cap so the game doesn't stutter, and each file is checked against the hash. Downloaded mods are stored apart from the player's own mods and used only for sessions announcing that exact hash.

Things that follow from this:

Sharing the source

The examples in this documentation are MIT licensed so you can start from them. Whatever license you choose, say so in mod.json ("license") and in a LICENSE file.