Core group

Classes

MwArray Array type used in ManiaPlanet.

MwBuffer Buffer type used in ManiaPlanet.

MwBufferCat Buffer cat type used in ManiaPlanet.

MwRefBuffer Reference buffer type used in ManiaPlanet, which contains a static 32 item buffer.

array The main array type used in Openplanet.

string The string class used in Openplanet as well as Maniaplanet.

wstring The wide string class used primarily in Maniaplanet for unicode strings.

dictionary The main dictionary type used in Openplanet.

MemoryBuffer A buffer of memory. Can be used in IO or Import calls. You can write to this or read from it, which moves the cursor within the buffer.

Global functions

string string::Join(const string[]&in arr, const string&in delimiter) Join an array of strings into a single where each item is separated using the given delimiter.

void print(const string&in) Prints a line to Openplanet's log.

void warn(const string&in) Prints a warning to Openplanet's log.

void error(const string&in) Prints an error to Openplanet's log.

void sleep(uint64 ms) Yields the current execution for a given period of time. Execution will be resumed after that time.

void yield() Yields the current execution. Execution will be resumed the next game tick.

void startnew(CoroutineFunc@ func) Starts a new yieldable coroutine from the given function. Function should be a declaration of 'void Func()'.

void startnew(CoroutineFuncUserdata@ func, ref userdata) Starts a new yieldable coroutine from the given function which also provides a userdata handle parameter. Function should be a declaration of 'void Func(ref@)'.

void ExploreNod(const ?&in) Opens the Nod Explorer with the given nod.

CGameCtnApp@ GetApp() Gets the main game app object.

CSystemFid@ GetFidFromNod(const ?&in) Gets the fid of the given nod, if it's set.

string GetLocalLogin() Gets the logged in user's username.

void RegisterLoadCallback(uint id) Tells the scripting to invoke the currently executing plugin when nods are loaded with the given class ID.

void UnregisterLoadCallback(uint id) Tells the scripting to stop invoking the currently executing plugin when nods are loaded with the given class ID.