Run custom C++ code inside Total War: Rome II and Attila's Lua engine.
- Download latest release from Releases
- Extract
twdll_rome2.dllortwdll_attila.dllto your game folder - The DLL only activates when called by a mod
Load the DLL in your Lua script:
-- For Rome 2
package.loadlib("twdll_rome2.dll", "luaopen_twdll")()
-- For Attila
package.loadlib("twdll_attila.dll", "luaopen_twdll")()
-- Use the API
twdll.Log("Hello from C++!")- Visual Studio 2022 (C++)
- CMake 3.29+
# Rome 2
cmake --preset rome2
cmake --build --preset rome2
# Attila
cmake --preset attila
cmake --build --preset attilasrc/
├── main.cpp # DLL entry point
├── common/ # Shared utilities
├── rome2/ # Rome 2 specific code
└── attila/ # Attila specific code
- Update
CHANGELOG.md - Commit and push to master
- Create git tag:
git tag v1.0.0 && git push origin v1.0.0 - GitHub Actions builds and releases automatically