Quick Download
All files in one package: libtwdll-0.7.0.zip
Changelog
Added
- Live campaign/battle hooks: ctor/dtor hooks for the
WORLD,CAMPAIGN_UI,CAMPAIGN_MODELandBATTLE(EMPIREBATTLE::MANAGER) singletons, installed on first load and uninstalled automatically when the Lua state is collected. - New
twdll.worldmodule:GetFactionCount,GetMaxUnitsInArmy/SetMaxUnitsInArmy,GetMaxUnitsInNavy/SetMaxUnitsInNavy,GetReinforcementCap/SetReinforcementCap(pass-1to restore the game default). - New
twdll.modelmodule:DisbandUnits— save/load-safe unit removal using the game's own disband path. - New
twdll.battlemodule:GetBattleInfo— live battle object, reinforcements manager, cap and queue size. - New
twdll.campaign_uimodule:GetMemoryAddress. - Extended the game's unit interface (
UNIT_SCRIPT_INTERFACE) withGetNumMen/SetNumMen,GetMaxNumMen/SetMaxNumMen,GetActionPoints/SetActionPoints. - Extended the game's faction interface (
FACTION_SCRIPT_INTERFACE) withGetTreasury/SetTreasuryandSetFactionLeader(supports the succession and heir-comes-of-age event variants). - New Lua runtime signatures:
lua_getfield,lua_type,lua_settop. - Reworked test suite (9 cases: singletons, unit/faction interfaces,
SetFactionLeader, treasury,DisbandUnits, army/navy caps, reinforcement cap,GetBattleInfo).
Changed
- API restructure: all modules now live under a single
twdlltable —twdll.core,twdll.unit,twdll.faction,twdll.military_force,twdll.model,twdll.world,twdll.battle,twdll.campaign_ui. Old flat entry points moved accordingly (twdll.Log→twdll.core.Log,twdll.set_max_units_in_army→twdll.world.SetMaxUnitsInArmy). - Property accessors rewritten from macros to template
Property/Getter/GlobalGetterclasses, with offset-based getters for embedded fields. - Hooks install once per Lua state instead of on every DLL load.
- Build/tooling: MSVC toolset bumped to 14.51, GH Actions submodule init fixes, new CodeQL workflow,
tools/twdll.ps1sets CPU affinity on Win11, docs build fixes.
Removed
- The
twdll_characterandtwdll_battle_unitmodules are no longer registered in the new single-table layout.