Lua is a powerful, fast, lightweight, embeddable scripting language used to extend the functionality of software and games.
The official website has this to say:
Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.
To learn how to program Lua, the Lua-users wiki might be a good place to start, or just Google search, "Learning Lua." There are many good, free, online options.
The Lua API consists mostly of tables that contain references to the required functions.
Hooks & Callbacks
Entities like NPCs, objects and monsters require some functions to work.
Tips & Tricks
This article is a stub. You can help Starbound's official Wiki by expanding it!
There are a lot of obscure details to modding Starbound that bypass some of the limited functionality provided by the Devs. These Tips & Tricks will provide work-arounds for the limited functionality, common mistakes, as well as provide examples.
|Tips & Tricks||Example Code|
These are libraries containing "utilitary" functions and scripts, for coding convenience.
Starbound already provides a bunch in /scripts/
- Tech Keybinds is an easy to use library that allows tech modders to bind input values to functions.
If you could not find a function documented here, chances are that you will find some documentation in the following sources:
- The official documentation, which can be found in the game folder: /Starbound/doc/lua
- Searching how a function is used in the assets, with tools such as Agent Ransack or similar on Windows, or the
grep -rcommand on Linux and Mac.
- Any .lua file used by the default assets or other modders.