Directory
Scripts go inDocuments\Starline\scripts, which is created on first inject. Each top-level .lua file is a script. Shared modules go in scripts\lib.
Example
Reload
Saving the file reloads an enabled script, as long as the Scripts tab is open. Widget values survive the reload (matched by tab/group/label; renamed widgets reset).Libraries
Shared.lua files go in scripts\lib\. require("name") loads scripts\lib\name.lua and returns whatever it returns.
_, and -. Results are cached during each refresh pass. Editing a module takes effect when a dependent script reloads. Module globals stay in the module’s environment. Cyclic imports error.
Output
print writes to the game console. Errors appear there in red.
Standard library
Available:base, table, string, math, bit, jit.
Stripped: io, os, debug, package (require is provided, see above), bytecode loading, and the filesystem loaders loadfile / dofile. load and loadstring still work. For saving state and settings use file.
The JIT compiler is off. Scripts run interpreted.
FFI
ffi is a global; no require needed. See the LuaJIT FFI docs for API and semantics.
ffi.load is disabled. Prefer entity.* for schema fields.