Principia Lua Scripting

Principia contains a LuaScript object which can be scripted using Lua. This allows for more complex creations and games, being able to draw arbitrary graphics and more.

Lua is a small programming language that focuses on being easily embeddable within other programs. You may have stumbled upon it being used somewhere else. Every program implements its own API on top of the Lua standard library, including Principia. Don't expect any non-standard Lua standard library extensions provided in other programs to necessarily exist in Principia.

Principia uses Lua version 5.2, so any generic tutorials for Lua 5.2 should apply to Principia as well. For general information about the programming language see the Lua 5.2 Reference Manual.

Some resources specific to Principia and its Lua API:


Need help with Lua scripting in Principia? Feel free to ask in #lua in the Discord server or in the Lua forum.