mods

Other mods: their exports, the list, reloading.

Functions

# mods.get(id) → table|nil

Another script mod's exports (call it in or after mods_loaded).

ParameterType
idstringa mod id
Returns
table|nilits mod.exports
on("mods_loaded", function()
  local scores = mods.get("scoreboard")
  if scores then scores.addPoints(10) end
end)

# mods.list() → table

Every installed mod.

Returns
tablea list of {id, name, version, author, description, enabled, scripted, loaded, files}

# mods.has(id) → boolean

Whether a mod is installed and on.

ParameterType
idstring
Returns
boolean

# mods.reload()

Reloads every script mod at the next frame (as F9).