Module twdll.campaign_ui

Campaign UI singleton accessor for Total War: Attila.

Functions

ClearMaxSlots () Clears custom settlement slot UI limits and restores the vanilla game defaults (6 for major, 4 for minor).
GetEncyclopediaUrl () Returns the currently active base URL prefix for the in-game encyclopedia.
GetMaxSlotsMajor () Returns the currently configured major settlement slot display override, or nil if using the game default (6).
GetMaxSlotsMinor () Returns the currently configured minor settlement slot display override, or nil if using the game default (4).
GetMemoryAddress () Returns the memory address of the CAMPAIGN_UI singleton as a hexadecimal string.
RefreshSettlements () Forces an immediate visual re-render of all settlement building models across the campaign map.
SetEncyclopediaUrl (url) Sets the base URL prefix for the in-game encyclopedia (defaults to "http://Atenc.totalwar.com/#").
SetMaxSlotsMajor (slots) Overrides the maximum number of building slots displayed on major (provincial capital) settlement cards.
SetMaxSlotsMinor (slots) Overrides the maximum number of building slots displayed on minor settlement cards in the settlement panel.


Functions

ClearMaxSlots ()
Clears custom settlement slot UI limits and restores the vanilla game defaults (6 for major, 4 for minor).

Usage:

    twdll.campaign_ui.ClearMaxSlots()
GetEncyclopediaUrl ()
Returns the currently active base URL prefix for the in-game encyclopedia.

Returns:

    string current base encyclopedia URL

Usage:

    local enc_url = twdll.campaign_ui.GetEncyclopediaUrl()
GetMaxSlotsMajor ()
Returns the currently configured major settlement slot display override, or nil if using the game default (6).

Returns:

    integer or nil configured max slots, or nil if default

Usage:

    local major_slots = twdll.campaign_ui.GetMaxSlotsMajor()
GetMaxSlotsMinor ()
Returns the currently configured minor settlement slot display override, or nil if using the game default (4).

Returns:

    integer or nil configured max slots, or nil if default

Usage:

    local minor_slots = twdll.campaign_ui.GetMaxSlotsMinor()
GetMemoryAddress ()
Returns the memory address of the CAMPAIGN_UI singleton as a hexadecimal string.

Returns:

    string or nil memory address (e.g. "0x12345678"), or nil if not yet initialised

Usage:

    local addr = twdll.campaign_ui.GetMemoryAddress()
RefreshSettlements ()
Forces an immediate visual re-render of all settlement building models across the campaign map.

Usage:

    twdll.campaign_ui.RefreshSettlements()
SetEncyclopediaUrl (url)
Sets the base URL prefix for the in-game encyclopedia (defaults to "http://Atenc.totalwar.com/#"). All in-game encyclopedia hyperlinks (unit cards, building tree, tech tree, faction help) will open using this base URL. Passing nil or an empty string restores the vanilla URL.

Parameters:

  • url string or nil new base encyclopedia URL (e.g. "http://localhost:8080/#"), or nil to restore default

Returns:

    string the currently applied base URL

Usage:

    -- Point encyclopedia to a local offline documentation server:
    twdll.campaign_ui.SetEncyclopediaUrl("http://localhost:8080/#")
    
    -- Restore default official web URL:
    twdll.campaign_ui.SetEncyclopediaUrl(nil)
SetMaxSlotsMajor (slots)
Overrides the maximum number of building slots displayed on major (provincial capital) settlement cards. Clamped between 1 and 20. Applies from the next panel open/refresh onwards.

Parameters:

  • slots integer max slot count to display (1 to 20)

Returns:

    integer or nil applied override value, or nil if invalid

Usage:

    -- Show up to 8 slots for provincial capitals:
    twdll.campaign_ui.SetMaxSlotsMajor(8)
SetMaxSlotsMinor (slots)
Overrides the maximum number of building slots displayed on minor settlement cards in the settlement panel. Clamped between 1 and 20. Applies from the next panel open/refresh onwards.

Parameters:

  • slots integer max slot count to display (1 to 20)

Returns:

    integer or nil applied override value, or nil if invalid

Usage:

    -- Show up to 6 slots for minor settlements:
    twdll.campaign_ui.SetMaxSlotsMinor(6)
generated by LDoc 1.5.0