Skip to main content
reskate.mods tells your plugin which mods are installed, so it can work with another mod or warn about one. It needs the mods.read permission. The list is the game’s Mods folder, read again every 2 seconds. A mod is “on” unless the player switched it off. On a dedicated server, installed and list know no mods; the shared content is read there from the server’s own Mods folder.

reskate.mods.installed(name)

Whether a mod is installed, and whether it is on.
string
required
The mod’s folder name, or the name it gives itself (its title), without regard to case.
string or nil
"on", "off", or nil when no mod has that folder name or title.

reskate.mods.list()

Every mod in the Mods folder.
table
A list of tables, one for each mod, in the order the mod list has them:
  • folder (string): its folder name in Mods.
  • title (string): the name it gives itself in its manifest.json (or reskate-mod.json), or its folder name when it gives none.
  • on (boolean): whether it is on.
  • author (string): the author its manifest names, at most 64 characters. Left out when it names none.
  • version (string): the version its manifest names (version_number, or the older version), at most 32 characters. Left out when it names none.
Needs mods.read.

reskate.mods.item_origins(keys)

Where each of these cosmetic items comes from: a mod, the game, or a mod that changes one of the game’s items. For an item picker that groups or filters by mod, or a card that names the mod an item is from.
table
required
Items’ keys, as reskate.menu.grid gives them: at most 4000, each at most 255 characters.
table
Keyed by each key you gave. Each value is a table:A field the mod does not name is left out.
boolean
false until ReSkate has read which mod each item came from and the game’s item catalogues are loaded. Until then every key is "unknown", never "game": ask again later.
The four words are reskate.Enums.ItemSource.
A list that is not a table of strings, has more than 4000 keys, or a key longer than 255 characters raises an error.
Needs mods.read. ReSkate reads which mod an item came from again when the mods change, at most every 2 seconds.

Shared content

Other mods can ship data for your plugin with no code of their own: parks for a game mode, routes, presets. Name a folder in your manifest’s content, such as "parks", and any mod that has a parks/ folder beside its manifest.json brings files your plugin can list and read. Only mods that are on count. On a dedicated server, your plugin’s server copy reads the mods the server has: every folder in the Mods folder beside it, by folder name (the server has no mod list or order of its own; hidden folders, whose names start with ., are left out). The limits are the same as in the game. A race mode can read its start and finish from a park mod this way on the server, where the players’ games read the same files.

reskate.mods.content(folder)

Every file in that folder of every mod that is on.
string
required
One of the names in your manifest’s content, without regard to case.
table
A list of tables, mod by mod in the mod list’s order (on a dedicated server, by folder name), each mod’s files by path:
  • mod (string): the mod’s folder name in Mods.
  • title (string): the name it gives itself, or its folder name when it gives none. On a dedicated server, the name in its manifest.json.
  • path (string): where the file is in the mod’s folder for it, with / between folders, such as "sanvan/bridge.json". A file in more than four folders inside it is left out.
  • size (number): its size in bytes.
At most 1000 files in all.
A folder your manifest does not name raises an error: reskate.mods.content("x"): name "x" in the manifest's "content" first.
Needs mods.read. The mods are read again every 2 seconds. Your own mod’s folder counts too, when it has one.

reskate.mods.read_content(mod, folder, path)

One of those files, as text.
string
required
The mod’s folder name, as content lists it, without regard to case. 1 to 64 characters.
string
required
One of the names in your manifest’s content.
string
required
The file’s path in that folder, as content lists it: / between folders, no ...
string or nil
The file’s bytes. At most 1 MB.
string
When text is nil: "not found", "no such mod is on", "outside the mod's folder" (a link that leads out of it), "the file is larger than 1 MB" or "the file cannot be read".
A folder your manifest does not name, or a path that could leave the folder, raises an error.
Needs mods.read. A mod that is off is not read.