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.
The mod’s folder name, or the name it gives itself (its title), without regard to case.
reskate.mods.list()
Every mod in the Mods folder.
A list of tables, one for each mod, in the order the mod list has them:
folder(string): its folder name inMods.title(string): the name it gives itself in itsmanifest.json(orreskate-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 olderversion), 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.
Items’ keys, as
reskate.menu.grid gives them: at most 4000, each at most 255 characters.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.reskate.Enums.ItemSource.
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’scontent, 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.
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 inMods.title(string): the name it gives itself, or its folder name when it gives none. On a dedicated server, thenamein itsmanifest.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.
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.
The mod’s folder name, as
content lists it, without regard to case. 1 to 64 characters.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".Needs
mods.read. A mod that is off is not read.