Installing a plugin
Put each plugin in aPlugins folder beside ReSkateServer.exe, beside its Mods folder:
- A plugin is a folder with its
reskate-plugin.jsonat the top. - Only plugins whose
"side"is"server"or"both"run on a server. A plugin for players’ games alone ("side": "client", the default) does nothing there. - Copy the whole mod folder,
manifest.jsonincluded, so the server’s messages to players go under the same name as their copies of the plugin.
"both" sides also has a copy on each player’s game, and players need the same mod installed for that copy: the server sends them nothing to install. Tell your players which mods the server uses.
The server refuses a plugin whose folder holds a program or a script Windows runs, as the game does: see plugins that ship programs.
Reloading
The server checks thePlugins folder every 2 seconds. A new plugin loads, a changed one reloads, and a removed one unloads, without a restart.
Storage and logs
- A server copy keeps its storage in
data/plugins, beside the server’s config file. - What plugins log and print goes to the server’s log,
ReSkateServer.log.
Commands
Type these in the server’s window:
A plugin’s own console command, such as
trickrace reset, runs from the window only for a line the server does not know itself, so a plugin can never hide one of the server’s commands. The server answers Ran by a plugin. when one ran.
With no plugins, plugin list says where it looks: No server plugins. A plugin is a folder in <folder> with a reskate-plugin.json ("side" "server" or "both").
What a server plugin can do
A plugin asks for what it uses with permissions in its manifest. On a dedicated server:- Players.
reskate.session.players()lists everyone on the server; the server is not one of them. With theserverpermission, a plugin kicks, bans and moves players, speaks in chat as itself ([Its name] ...) or to one player, and reads and sets what each player may do, aslockdoes. - Chat. With
chat.read, it hears every player’s chat line, the server’s own lines, and the/commandsthe server does not know itself, so players can talk to it:/race join. While a plugin hears chat, the server does not answer thoseUnknown command; the plugin answers. - The map. With
session.read,reskate.session.world()names the map the server runs, and the plugin hearslevel_loadedwhen it changes. Withtravel, it lists the server’s maps and changes the map for everyone, asmapdoes. - Time of day. With
world.environment, it sets the time of day for everyone, astoddoes, when the server has its world layers andlayer-syncis on. - Roles. It reads each player’s role, so its own commands can follow the server’s roles.
- Cards and polls. It shows players cards and polls of its own, and hears the answers.
- Parks. With
server.parks, it lists, spawns and removes the server’s park mods. - Mods. With
mods.read, it reads the content of every mod in the server’sModsfolder, such as a park mod’s parks.
reskate.server functions also work differently on a lobby’s host: see lobby host and dedicated server.
A server copy makes at most 20 reskate.server calls a second, and one say line a second. See limits.