Avorion Script API Documentation

Server Script Predefined Functions

Tip: Scroll down for an example script!

function onStartUp()

Called when the server starts up, after databases were initialized.

Server Function: This function is only called on the server.

function onShutDown()

Called when the server shuts down, after players were disconnected.

Server Function: This function is only called on the server.

function update(timeStep)

Called every tick by the server, before sector and player updates start.

Server Function: This function is only called on the server.

Parameters

timeStep The amount of time passed since the last tick


Server Example Script

-- Called when the server starts up, after databases were initialized.
-- Server Function: This function is only called on the server.
function onStartUp()

end

-- Called when the server shuts down, after players were disconnected.
-- Server Function: This function is only called on the server.
function onShutDown()

end

-- Called every tick by the server, before sector and player updates start.
-- Server Function: This function is only called on the server.
function update(timeStep)

end
Overview
Home Functions Search
Search:

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.7 c8e4beec84f7