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
Putreskate-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.
api
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.
reskate.api_version.
entry
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./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.
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
"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 readsreskate.sideto know which it is.
not loaded (it is a server plugin). See client and server copies.
permissions
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:
domains
The host names
reskate.http.request may reach, such as ["api.example.com"]. At most 16. Needs the net.http permission.- 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
*.
example.com does not cover api.example.com.
content
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._ and -. ReSkate lowercases each, and keeps each once. A mod brings files for your plugin by having that folder beside its manifest.json:
variants
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.
<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:
- the one the player chose, when it is still there;
- else the first in
orderthat is there; - else another variant your mod has.
- your mod’s other variants;
- every other mod whose
layout.toc, or a.tocfile in itsWin32folder, names a bundle indisplaces(without case, anywhere in the file); - your own mod, when its own
layout.tocorWin32files name one. Keep what a variant replaces inside the variants.
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
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./ 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
The particle effects and decals your mod ships that
reskate.effects may play: at most 128 exact asset names. Needs the effects permission.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 doesplugin 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. Putreskate-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):
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.
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.
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.reskate.net.senddelivers 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_pluginandreskate.on_plugin.