Docs / Plugins / Lua plugins
The launcher's plugin list
The launcher's Plugins page lists every plugin of the plugins folders (Lua, .oop and
.opl). Players switch each on or off there without moving its files, see what the last game
made of it, and change the settings it declared with plugin.settings:
The plugins switched off are in
~/.openomsi/plugins-off.txt, one a line, in lower case, each by its path underplugins:foo.lua, a folder plugin's folder with a/after it (foo/forfoo/main.lua),foo.oop, and an.opl's path (pablo/mbas.opl). Sofoo.luaandfoo/main.luaare two plugins, switched and set apart.A bare stem an older launcher wrote (
foo) still leaves out every Lua or.oopplugin of that stem. The game reads it before it loads the plugins and leaves those out.- After loading, the game writes
~/.openomsi/plugins-status.json: every plugin, by the same name, with itsstate(loaded,off,failedwith the load error, e.g. a syntax error) and, when one is switched off during the game for its errors,switched_offwith the error. plugin.settings(...)also writessettings.schema.jsoninto the plugin's data folder, besidesettings.json:{title, settings: [{key, type, label, default, min, max, step, choices}]}. The launcher makes a form of it and writes the values intosettings.json, which the plugin gets back fromplugin.settingsthe next time it starts. A plugin that has not run yet has no settings to show.
Publishing a plugin in the catalog#
The page's Browse tab lists the plugins of
openOMSI-org/openOMSI-Plugins: a folder
plugin (main.lua and its files) with a plugin.json (name, author, version, description,
an open source licence), sent as a pull request and read by a maintainer before it is merged.
The launcher installs it as plugins/<id>/ only when each file's size and SHA-256 are the ones
in the repository's catalog.json, offers an update when version goes up, and keeps
plugins/<id>/data/ (settings and saved data) on an update. The repository's CONTRIBUTING.md
has the rules.
Something wrong or missing? Fix it on GitHub or open an issue.