Skip to main content
This page covers reskate-plugin.json, the file that makes a mod a plugin, and the one field of the mod’s manifest.json that plugins use. Neither needs a permission; the manifest is where you ask for them.

reskate-plugin.json

Put reskate-plugin.json at the top of the mod folder, beside manifest.json. ReSkate reads it when it loads the plugin, and again each time the plugin reloads.
The file must be a JSON object, at most 64 KB, nested at most 8 deep. ReSkate ignores fields it does not know.

api

integer
required
The plugin API version the plugin was written for. This ReSkate has API 1. It must be a whole number, 1 or more, and no newer than the ReSkate running it.
Your code reads the running ReSkate’s version as reskate.api_version.

entry

string
required
The Luau file to run when the plugin loads, as a path inside the mod folder, such as "plugin/main.lua". It must end in .lua or .luau.
The path follows these rules:
  • / between folders, never \.
  • Inside the mod folder: not starting with /, no .., . or empty segments, and no : (no drive letters or streams).
  • Printable ASCII only, at most 260 characters.
  • No segment ending in a dot or a space.
The entry’s folder is where require looks for modules: with "plugin/main.lua", require("rules") loads plugin/rules.luau or plugin/rules.lua. The entry file itself can be at most 1 MB.

side

string
default:"client"
Where the plugin runs: "client", "server" or "both".
  • "client": on each player’s game.
  • "server": as the session’s authority, on a lobby host’s game and on a dedicated server.
  • "both": in both places, as two copies. Each copy reads reskate.side to know which it is.
A plugin is listed as not loaded where it does not run. On a player’s game a server plugin shows as not loaded (it is a server plugin). See client and server copies.

permissions

string[]
default:"[]"
The permissions the plugin uses, by name, such as ["console", "overlay"].
Every name must be one of the 47 on permissions. A name listed twice counts once. With no permissions, a plugin has the base set: logging, events such as tick, timers, reading its own package’s files, JSON, and the functions and events plugins share. The log names the permissions a plugin loaded with:
Ask only for what you use. Players see the list in the log, and a call into an area you did not ask for raises an error that names the permission it needs.

domains

string[]
The host names reskate.http.request may reach, such as ["api.example.com"]. At most 16. Needs the net.http permission.
Each entry is a bare host name:
  • letters, digits, . and -, at most 253 characters, with at least one dot;
  • not starting or ending with a dot, and no ..;
  • no scheme, port, path or *.
ReSkate lowercases each name. A request goes only to a host listed here, exactly: example.com does not cover api.example.com.

content

string[]
The folders your plugin reads in every mod that is on, such as ["parks"]: other mods ship files for it there, with no code. At most 8. Needs the mods.read permission. Read them with reskate.mods.content and read_content.
Each name is a folder name: 1 to 32 letters, digits, _ and -. ReSkate lowercases each, and keeps each once. A mod brings files for your plugin by having that folder beside its manifest.json:

variants

object
The variants your mod holds: several takes on the same game data, such as several deck models for the one deck every board has. One of them is in the game at a time.
Board Break’s manifest declares its decks (shortened):
Each folder <folder>/<name>/ with a layout.toc in it is the variant <name>, laid out like a mod folder of its own. A folder without a layout.toc, or whose name has characters other than letters, digits, _ and -, is not a variant. ReSkate compares every name here in lower case. Which variant loads. One variant of your mod is in the game at a time:
  1. the one the player chose, when it is still there;
  2. else the first in order that is there;
  3. else another variant your mod has.
It loads ahead of every other mod, whatever the mod list’s order. When your mod’s variants folder has none, none loads. What is set aside. While a variant loads, these mods are left out of the game, whole, for that run:
  • your mod’s other variants;
  • every other mod whose layout.toc, or a .toc file in its Win32 folder, names a bundle in displaces (without case, anywhere in the file);
  • your own mod, when its own layout.toc or Win32 files name one. Keep what a variant replaces inside the variants.
A mod set aside stays switched on in the mod list. It comes back when your mod is switched off, or no longer displaces what it brings. The choice is kept per mod. Your plugin chooses a variant with reskate.package.choose, which needs the variants permission, and reads them with reskate.package.variants. ReSkate keeps the choice for your mod’s folder name, in %LOCALAPPDATA%\ReSkate\variants.json, and loads it at every launch. A renamed mod folder starts with no choice.
variants is read by ReSkate’s mod loader, not the plugin host: a variants that breaks these rules does not stop the plugin from loading. The mod then has no variants, and the log says why: Mod <folder>: reskate-plugin.json's variants could not be read (<why>).

resident

object[]
Assets of your mod that the game picks while it runs, with nothing in the game data naming them: world objects your plugin places with reskate.entities, or HUD widgets the throwdown kit picks by name. Listed here, they stay in the game when another mod, such as a map, replaces the bundle they are in. At most 16 entries.
Each name is 1 to 260 characters of printable ASCII, with / between folders and no \; ReSkate compares them in lower case. Without this list, an asset only your plugin asks for is lost when a map brings its own copy of the bundle: the entity or widget is simply not there.
Like variants, resident is read by ReSkate’s mod loader: a list that breaks these rules does not stop the plugin, the mod keeps nothing resident, and the log says why: Mod <folder>: reskate-plugin.json's resident list could not be read (<why>).

effects

string[]
The particle effects and decals your mod ships that reskate.effects may play: at most 128 exact asset names. Needs the effects permission.
A particle effect’s name starts with effects/reskate/, and a decal’s with world/materials/decal/reskate_: the game’s own effects and store assets are refused. Every name must be covered by a resident entry for the bundle win32/levels/game/dingolevel_root/dingolevel_root. Effects has an example. Unlike variants and resident, effects is checked with the rest of the manifest. A list without the permission, longer than 128, with a name that breaks the rules or that no resident root covers, stops the plugin from loading. For a plugin with effects, a resident list that cannot be read stops it too.

Errors

When the manifest breaks a rule, the plugin does not load. The log says why, and so does plugin list (as the plugin’s reason):
Problems with the entry file itself come after the manifest passed. The plugin stops, and its reason starts with the entry’s path: plugin/main.lua not found, plugin/main.lua is larger than 1 MB, a syntax error, or plugin/main.lua raised an error as it ran (the error itself is in the log line before).

A plugin that comes with assets

A plugin that needs game data of its own, such as a deck model, items or sounds, ships inside that asset mod. Put reskate-plugin.json and the plugin’s folder at the top of the mod’s folder, beside its manifest.json (and its layout.toc, when it has one at the top). The mod is then a plugin too: switching it on or off in the mod list does the same to the plugin. The Board Break plugin comes this way, inside its deck pack (contrib/plugins/board-break in the ReSkate repository):
Its decks are variants, so each has its own layout.toc. The plugin reads the pack’s other files, such as sounds/ and decks/<name>/deck.ini, with reskate.package: paths there start at the mod’s folder.
A plugin’s id is its mod’s folder name, so it is the asset mod’s folder name here. Its storage, its data folder and its console commands go under that id. Moving a plugin into another mod’s folder gives it a new id, with empty storage and an empty data folder.

manifest.json and the plugin’s channel

manifest.json is the mod’s own description, as Thunderstore packages carry it. ReSkate’s plugin host reads one field of it: name.
string
The plugin’s channel: the name its messages go under. When manifest.json has no name, or it is empty, the mod’s folder name is used.
The channel ties the copies of one plugin together across games:
  • reskate.net.send delivers only to the same channel on other games, compared without case. Two players can name the folder differently, and their copies still hear each other.
  • Other plugins can find yours by its channel or by its folder name, without case, in reskate.require_plugin and reskate.on_plugin.
Two different plugins with the same name share a channel and hear each other’s messages. Pick a name that is yours, such as the one you publish under on Thunderstore.