modules/ directory and are loaded according to modules/init.txt. Because your changes stay separate from the core files, upgrading the server is straightforward and your customizations are easy to track.
There are three module types, each suited to a different kind of change:
| Type | File extension | When it runs | Use for |
|---|---|---|---|
| Lua | .lua | Runtime, on server start | Overriding game logic, NPC behavior, spells, abilities |
| C++ | .cpp | Compile time | New packet handlers, low-level engine extensions |
| SQL | .sql | Database update (dbtool update) | Item data, mob drops, spawn points, NPC records |
Folder structure
Loading modules with init.txt
modules/init.txt controls which modules are active. It is tracked in git but marked with --assume-unchanged so your local edits are not committed accidentally.
init.txt
- One entry per line. Empty lines and lines beginning with
#are ignored. - A folder path loads all valid files inside it (
*.lua,*.cpp,*.sql). - A file path loads only that file.
- The trailing
/on folder names is optional.
When to use each module type
Use a Lua module when you want to change gameplay logic that is already implemented in Lua — overriding a spell’s effect, adjusting NPC dialogue, tweaking experience rates, or adding new commands. Lua modules load at runtime and do not require a server rebuild. Use a C++ module when you need to intercept or extend the engine itself — replacing a packet handler, hooking into low-level systems, or adding new server-side bindings. C++ modules require recompiling the server. Use a SQL module when you need to change data stored in the database — adding items, modifying mob drop tables, relocating spawn points, or inserting custom NPC records. SQL modules are applied when you rundbtool update.
Mounting modules in Docker
For Lua and SQL modules, bind-mount your localmodules/ directory into the container. No rebuild needed.
docker-compose.yml:
docker-compose.yml
Module pages
Lua modules
Override game logic at runtime. No rebuild required.
C++ modules
Extend the engine with new packet handlers and bindings.
SQL modules
Modify database content such as drops, spawns, and items.
Era accuracy modules
Revert content to match a specific expansion era.