Packages

API packages

API packages provide functions that can be called by scripts. I.e. it is a script-to-engine interaction. A package can be loaded with require('<package name>'). It can not be overloaded even if there is a lua file with the same name. The list of available packages is different for global and for local scripts. Player scripts are local scripts that are attached to a player.

Package

Context

Description

ambient

menu player

Controls background sounds for given player.

animation

local

Animation controls.

async

global menu local load

Timers and callbacks.

camera

player

Controls camera.

content

load

Content manipulation.

core

global menu local load

Functions that are common for both global and local scripts

debug

player

Collection of debug utils.

input

menu player

User input.

interfaces

global menu local load

Public interfaces of other scripts.

markup

global menu local load

API to work with markup languages.

menu

menu

Main menu functionality, such as managing game saves

nearby

local

Read-only access to the nearest area of the game world.

postprocessing

player

Controls post-process shaders.

self

local

Full access to the object the script is attached to.

storage

global menu local load

Storage API. In particular can be used to store data between game sessions.

types

global menu local

Functions for specific types of game objects.

ui

menu player

Controls user interface.

util

global menu local load

Defines utility functions and classes like 3D vectors, that don’t depend on the game world.

vfs

global menu local load

Read-only access to data directories via VFS.

world

global

Read-write access to the game world.