Modules and importing
See the Wren documentation for how imports work in general. However, the exact way that the import strings are resolved to files is specific to SuperBLT.
For the given import statement:
... there's a few rules for which these imports are tested under. These are:
Anything starting with ./ means relative to this module (Wren terminology for file).
... will import
Anything starting with .../ means relative to this mod.
... will import
Notably, for files that aren't inside extra folders (such as
a/b in the example above) this is the same as
Anything starting with base/ refers to files in the basemod or DLL.
The valid files are:
base/nativecontains the core native APIs, such as those for logging.
base/native/DB_001contains the asset database hook API.
base/native/LuaInterface_001contains the Wren side of the Wren-Lua IO API.
(there are other files that start with
internal, however they may change between SuperBLT versions
and mods should never use them)
Other mod API imports
Anything starting with mods/ refers to published files in another mod - yet to figure out how this will work.
For now just ignore this, but do know some kind of mod-to-mod API system should arrive in the future.
Meta and Random modules
The 'meta' and 'random' modules from Wren can be used by name, as per usual.
Raw file loads
Anything starting with __raw_force_load/ refers to the rest of that string directly. The
rest of the string must in the form of
Please don't abuse this! It requires hard-coding the mod folder name, so if someone renames your mod and you use this then the game will crash on startup as it fails to resolve the import.