Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Core API

The engine exposes limited access to subsystems and constants through the core library.

Version constants

These values match the game and engine version. See core/version.hh for the C++ equivalent.

ValueExampleDescription
core.VERSION_MAJOR17Major version number
core.VERSION_MINOR0Minor version number
core.VERSION_PATCH0Patch version number
core.VERSION_SCM_BRANCHmainSCM branch name
core.VERSION_SCM_REVISIONdeadbeefSCM revision (git commit hash)
core.VERSION_SEMANTIC17.0.0Semantic version string
core.VERSION17.0.0-main [deadbeef]Full build-system version string

Current namespace

As noted in the overview, namespaced identifiers may omit the namespace. The engine fills in a default. For mods, that default is also available as core.NAMESPACE.

Sides

ValueDescription
core.IS_CLIENTTrue on the client
core.IS_SERVERTrue on the server

Use these to guard APIs that exist on one side only. See Sides.