Getters functions

GetDisplayResolution()

Returns the width and height (respectively) of the game window in pixels.

Definition

GetDisplayResolution() -> float, float

Usage example

init.lua
width, height = GetDisplayResolution()
print(width, height)
<console>
> 1920 1080

GetMod()

Returns the return value of the mod with the given name.

circle-exclamation

Definition

GetMod(modName: string) -> object

Usage example

init.lua
mod = GetMod('MyMod')

GetSingleton()

Returns the singleton for the given type name if it exists, otherwisenil.

circle-info

A singleton is the sole instance of a type, often used for global operations.

Definition

Usage example

GetVersion()

Returns the current CET build's commit hash.

Definition

Usage example

ModArchiveExists()

Returns whether the specified .archive file is present in the archive/pc/mod folder

Definition

Usage example

Last updated