Lua API#

EG-Overlay does not define any globals, unlike many other programs that interface via Lua. Instead certain functionality is exposed via embedded Lua C modules, and others through bundled Lua files. This allows for customization and substitution without rebuilding the core program.

EG-Overlay Modules#

Lua Types#

Various Lua types are referenced throughout this documentation. Each module documentation contains any specific types/classes and Lua provides the standard types below:

nil#

nil is most often used to represent the absence of a value. The only thing that equates to nil is nil, although nil will also evaluate to false.

boolean#

boolean has two values, true and false.

alias integer: number#
alias float: number#
number#

number can hold both integer and floating-point numbers, however the two are not interchangeable in many instances. Module documentation will specify integer when only an integer is appropriate.

Warning

Supplying a real (floating-point) value in place of an integer may result in a Lua error.

string#

string can hold character or binary data as bytes, including nulls.

function#

Any Lua function.

table#

A Lua object or sequence. Modules may expect specific table structures or fields and many will return data using tables.

alias sequence: table#