Skip to main content
This page explains what a plugin is, how ReSkate runs it and how you manage plugins from the console. It needs no permission; the pages it links to say which permission each part of the API needs.

What a plugin is

A plugin is a mod with two extra things in its folder:
  • a reskate-plugin.json beside the mod’s manifest.json, which makes the mod a plugin (see the manifest), and
  • Luau scripts, starting with the entry file the manifest names, such as plugin/main.lua.
Plugins are written in Luau, Roblox’s dialect of Lua 5.1. ReSkate gives each plugin its own Luau VM, sandboxed. Nothing a plugin does reaches the game except through the reskate table, and every call into it checks its arguments and its permission before anything happens.

What a plugin can do

What a plugin may touch depends on the permissions its manifest lists. With none, it gets the base set: logging, events such as tick and level_loaded, timers, its own files, JSON, and functions and events shared with other plugins. Each permission then unlocks one area, for example:
  • reading the skater, its tricks, its bails and its physics steps (skater.read, events.tricks, events.skater, events.physics),
  • drawing on the screen and in the world, a page of its own in the menu, and full-screen screens (overlay, menu, ui.screen),
  • moving the skater, the camera and the board, and playing animation clips (skater.teleport, skater.control, camera, board, skater.animation),
  • talking to the same plugin on other players’ games, and web requests to hosts it names (net.session, net.http),
  • running a session as its authority: kicking, announcing and moving players (server).
Permissions lists all 59 and what each one unlocks.

What a plugin can never do

Some things are left out of the API on purpose, whatever a manifest asks for:
  • Write cosmetics, entitlements or progression. progression.read only reads. outfit wears tattoos, moles and eyewear over your outfit, and never a paid store item.
  • Run ReSkate’s console commands. A plugin adds its own commands. ReSkate refuses a command name whose first word is one of ReSkate’s, plugin or help.
  • Reach game memory, files or programs. There is no API for memory, no io, no os.execute, and no loading of code but the plugin’s own Luau source. A plugin reads only files inside its own package.
  • Use the microphone, voice audio or the clipboard. voice.control sets how loud another player is to you, nothing more.
  • Change how loud the game is. reskate.settings.set refuses every sound setting: volumes, mute, music, voice and speakers.
  • Flash the screen. How much light a plugin’s drawing adds over the screen can only rise so fast, so a fast full-screen flash comes out faint. See the overlay.
Limits covers the sandbox and the limits that stop a plugin before it can harm the game.

How ReSkate finds plugins

ReSkate looks through the Mods folder beside the game every 2 seconds. A mod is a plugin when:
  1. it is switched on (mods.json does not list it as off; a folder mods.json does not list is on),
  2. it has a reskate-plugin.json at the top of its folder,
  3. the player has turned the plugin on (see turning a plugin on), and
  4. when its folder is a Thunderstore package, Thunderstore lists that package as a plugin (see plugins and Thunderstore).
A new plugin loads at the next game tick after ReSkate finds it and the player turns it on, without a restart. When you switch its mod off or remove it, it unloads.
If mods.json cannot be read, the game loads no mods at all, and no plugins either.

Turning a plugin on

A plugin does not run until the player says so. The first time ReSkate finds one, the game asks, with what the plugin can do in plain words, from the permissions its manifest lists. Keep off (also Esc or B) leaves it off; only Turn on starts it. The rest of its mod, such as cosmetics or a map, loads either way. The answer is kept for the plugin’s own files: reskate-plugin.json and everything in the folder of its entry (plugin/ for "entry": "plugin/main.lua"). When any of them changes, an update included, the game asks again. The answers are kept in %LOCALAPPDATA%\ReSkate\plugin_approvals.json, outside the Mods folder, so no mod can answer for the player. Insert > Plugins > Plugin Manager lists every plugin with everything it may do, and switches each on or off.
While you work on a plugin, turn on developer mode: plugin dev on in the console, or the switch in the launcher’s settings. A plugin you have turned on then stays on when you change its files. A plugin you have never answered for still asks.

Plugins and Thunderstore

A mod folder named as a Thunderstore package (Owner-Name, as the launcher installs it, or Owner-Name-1.2.3 from a zip) runs its plugin only while ReSkate’s community on Thunderstore lists that package in the Plugins category. So a package uploaded as cosmetics, a map or anything else cannot run code. Its other content still loads.
  • A package Thunderstore lists without Plugins does not run its plugin, nor one Thunderstore’s moderators rejected.
  • A package that was on Thunderstore and has been taken down stops running its plugin.
  • A folder that is not named as a package, or a package Thunderstore has never had (a plugin you have not uploaded yet), is not Thunderstore’s to say: it runs once the player turns it on.
The game asks thunderstore.io about each package on a thread of its own, keeps the answers in %LOCALAPPDATA%\ReSkate\plugin_listings.json, and asks again every six hours. Until a package has been looked up once, its plugin waits, usually a second or two. When Thunderstore cannot be reached (you are offline, or it is down) and the game has no answer for the package yet, the check is skipped and the plugin runs; the game asks again every minute, and once Thunderstore answers, its answer holds. A plugin that is refused shows a notice in the game, and the log says why:
Uploading a mod with a plugin? Tick Plugins among its categories on Thunderstore, whatever else it is. See categories.

Hot reload

ReSkate notices when any file of a plugin’s folder changes (a name, a size or a write time). The plugin then unloads (its unload handlers run) and loads again from its files. Its storage is saved before it unloads and read back when it loads. The log says:
ReSkate looks for changes every 2 seconds. A change made while the game window does not have the focus waits until it does, so a plugin you edit in another window reloads once, when you come back to the game, and not at every save. The log says Plugins: a change waits for the game to have the focus. meanwhile. When the game starts, the plugins load at once, focused or not. A plugin you switched off with plugin off stays off when its files change.

Packages that are refused

A plugin never ships a program. ReSkate refuses to load a plugin whose folder holds:
  • a Windows executable, found by its first bytes (MZ) whatever its name, or
  • a file with one of these extensions: .exe, .dll, .sys, .scr, .com, .cpl, .msi, .msp, .bat, .cmd, .ps1, .psm1, .vbs, .vbe, .js, .jse, .wsf, .wsh, .hta, .lnk, .pif or .reg, or
  • more than 20000 files.
The log then says, for example:
.js is on the list: a plugin cannot ship JavaScript files, even ones it never runs.

The plugin console commands

Open ReSkate’s console to see and control plugins. <id> is the plugin’s mod folder name, or <folder>@server for a server copy while this game hosts a lobby. plugin list prints one line a plugin:
plugin reload and plugin on answer Plugin <id> reloaded. or Plugin <id> started. when it runs, and error: Plugin <id> did not start: <why> when it does not. For a server copy the answer names its folder, without @server.
In the game, plugin reload, plugin off and plugin on act on a plugin’s client copy, and on its server copy when you add @server to its id: plugin reload referee@server. Server copies run only while this game hosts a lobby; at other times <folder>@server answers error: server copies run only while this game hosts a lobby. A dedicated server’s console has the same plugin commands for its own plugins, with no @server.
After a plugin stops over a limit, fix it and save a file: the change reloads it. plugin on <id> starts it again without a change.

Client and server copies

A plugin can run in two places:
  • The client copy runs on a player’s game. It draws, reads the local skater and plays sounds.
  • The server copy is the session’s authority. It runs on the game of a lobby’s host (while that game hosts a lobby that is not on a dedicated server) and on a dedicated server, which loads plugins from a Plugins folder beside it. A server copy draws nothing.
The manifest’s side picks where a plugin runs: "client" (the default), "server" or "both". A "both" plugin on a lobby’s host runs twice there, as two separate VMs. On a lobby’s host, the server copy has an id of its own, <folder>@server, and reskate.id says so. Everything it holds in the game goes under that id, as do its log lines ([<folder>@server] ...), its storage and its console commands. The two copies share nothing in the game: when the server copy stops, or the game stops hosting, the client copy keeps its camera, its sounds, its outfit items, its board changes and the rest. On a dedicated server, the server copy’s id is its folder name, with no @server. Your code tells the copies apart with reskate.side: "server" in the server copy, "client" in the client copy.
Only the server copy can use the server functions (kick, ban, announce, tell, move a player, set what a player may do). Client copies talk to it with reskate.net.send("server", ...), and it answers to "all" or to one player. The same plugin on every game shares one message channel: the name in its manifest.json.

Where to go next

Quickstart

Make a first plugin with a console command and a speed readout.

Manifest

Every field of reskate-plugin.json, and the rules it is checked against.

Permissions

All 64 permissions: what each unlocks and what other players see.

Limits

The sandbox, every limit, and what happens when a plugin goes over one.

Events

The 26 events, when they fire and what they hand your handler.

Base API

reskate.id, reskate.side, reskate.Enums, reskate.log, reskate.on and require.