Wiki

effect · show_unit_leaders_tooltip

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

show unit leader's name

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

show_unit_leaders_tooltip is commonly used in custom event or decision tooltips to provide players with a direct view of a nation's current commander roster. For example, it can be invoked in a "Review Troops" type decision option to display all unit leaders of that nation. It is fundamentally a display-only effect that does not alter any game state, serving solely for UI information feedback.

country_event = {
    id = my_mod.1
    title = my_mod.1.t
    desc = my_mod.1.d

    option = {
        name = my_mod.1.a
        # Display the unit leaders list to the player
        show_unit_leaders_tooltip = yes
    }
}

Synergy

  • [every_unit_leader](/wiki/effect/every_unit_leader): After performing bulk operations on commanders with every_unit_leader (such as adding traits), immediately calling this effect allows players to see the affected leaders list in real-time, creating a complete action-and-feedback workflow.
  • [add_trait](/wiki/effect/add_trait): After adding traits to unit leaders, combining this effect with the display provides players with clear visibility of who has been modified, enhancing readability.
  • [character_list_tooltip](/wiki/effect/character_list_tooltip): Both are pure display effects that can be used together to present both character lists and unit leader rosters simultaneously, providing more comprehensive tooltip information.
  • [any_unit_leader](/wiki/trigger/any_unit_leader): Use any_unit_leader in trigger conditions to check whether qualifying leaders exist, then call this effect to display them only when conditions are met, avoiding empty tooltip displays when no leaders are present.

Common Pitfalls

  1. Misusing as a functional effect: Beginners often mistakenly believe this effect will "summon" or "create" leaders, when in reality it only renders tooltip text without modifying any game data. Placing it inside a hidden_effect block is completely pointless, since tooltips in hidden blocks will never display to the player.
  2. Scope confusion: This effect can only be called within COUNTRY scope. Using it within STATE or CHARACTER scope will cause script errors or silent failures. Always ensure the execution block operates within the correct country scope.