Skip to content

APIs⚓︎

Lua⚓︎

MWSE exposes it's APIs via Lua programming language. The available version of Lua is 5.1 with many extensions from Lua 5.2 and some from Lua 5.3. To see the extensions available from Lua 5.2 and 5.3 browse under "Extensions from Lua 5.2" and "Extensions from Lua 5.3" in LuaJIT's extensions page.

Additional MWSE libraries⚓︎

MWSE implements some Lua modules useful for modding, that aren't available in the global scope. These have to be required before use.

Library Documentation Notes
logging.logger Logging guide Logging module.
Unitwind Available at implementation site. Unit testing module. It's implementation is found in MWSE\\core\\lib\\unitwind.

Third-party libraries⚓︎

In addition, MWSE ships with some third-party libraries useful for modding. Their APIs aren't covered here. The table below lists all third-party libraries available and links to their respective documentation.

Library Documentation Notes
BitOp BitOp Documentation Module for bitwise operations. It's available in global scope (it doesn't have to be required before use).
LuaJIT's FFI FFI Documentation Foreign functions interface module. Use as local ffi = require("ffi").
semver.lua Documentation Utility module for semantic versioning. Use as local semver = require("semver").
inspect.lua Documentation Module for converting Lua tables to human-readable representation. Useful for debugging. Use as local inspect = require("inspect").
ansicolors.lua Documentation Module to print to the console in color. Use as local ansicolors = require("logging.colors").
luasocket Documentation Network support module. Use as local socket = require("socket").
luasec Documentation Lua binding for OpenSSL library. Use as local ssl = require("ssl").