Lua bindings for Total War: Attila

Load the DLL from the campaign script — campaigns/<campaign>/scripting.lua — exactly as the test suite does.

twdll hooks game singletons (world, campaign UI, campaign model) on first load; those are only constructed once a campaign world exists. Calling singleton-dependent functions any earlier (e.g. from the main menu or a global script) can return nil or crash.

Not every function requires this: plain utilities (twdll.core.Log, twdll.core.GameBuild) and functions that read fixed module offsets work regardless of where they are called. This is how the current hook architecture works, not a permanent contract — it may change in the future.

Modules

twdll.battle
twdll.cai
twdll.campaign_ui
twdll.core
twdll.model
twdll.tweakers Engine tweakers and campaign variables runtime access.
twdll.world
ARTSET_SCRIPT_INTERFACE
CAMPAIGN_POLITICAL_PARTY_SCRIPT_INTERFACE
CHARACTER_SCRIPT_INTERFACE
FACTION_SCRIPT_INTERFACE
MILITARY_FORCE_SCRIPT_INTERFACE
POLITICAL_PARTY_LIST_SCRIPT_INTERFACE
REGION_SCRIPT_INTERFACE
RELIGION_LIST_SCRIPT_INTERFACE
RELIGION_SCRIPT_INTERFACE
SLOT_SCRIPT_INTERFACE
UNIT_SCRIPT_INTERFACE

Topics

engine_tweakers_inventory.md
generated by LDoc 1.5.0