Import group

The Import API is an advanced API which allows you to load external DLL's and execute its exported functions. You must have some knowledge about how DLL's work and how its functions are exported before you should use this API.

Also consider whether you really need a DLL or not! In a lot of cases you probably don't. If you're missing a feature that you believe should be in Openplanet, please suggest it on Discord.


The calling convention to use for this call on 32 bit builds. Convention options don't matter on 64 bit builds.

Import::CallConvention::cdecl = 0
Import::CallConvention::stdcall = 1

Import::Library A library representing a DLL. Instances of Library exist in between multiple plugins, and have to be loaded using Import::GetLibrary. When all instances of Library are destroyed, the dll is freed and unloaded.

Import::Function An imported symbol from a library.

Import::Ref A reference to a script variable.

Global functions

Import::Library@ Import::GetLibrary(const string&in path) Gets a library. If it's already loaded, this will return a handle to the already loaded library.