openOMSI GitHub Discord

Docs / Plugins / Lua plugins

Tips

1 min readEdit this pagedocs/PLUGINS.md

  • Watch game.log (in ~/.openomsi/) while you write a plugin: every omsi.log line and every error is there.
  • OMSI_WATCH_VARS=Velocity,throttle logs changes of bus variables - useful to find the names a bus uses; the bus's .osc scripts list them all, omsi.vars() too.
  • Keep on_frame light; use omsi.every, omsi.watch and the events for everything that does not need every frame. Read what you need (omsi.bus.velocity(), omsi.info_value("delay")) rather than whole tables every frame.
  • omsi.ui.update changes one element of a panel; setting the whole panel every frame costs more.

Something wrong or missing? Fix it on GitHub or open an issue.

↑↓ to move↵ to open