effect · show_unit_leaders_tooltip
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
show unit leader's name
show_unit_leaders_tooltipCOUNTRYnoneshow unit leader's name
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
show_unit_leaders_tooltip 常用于自定义事件或决策的 tooltip 展示中,当玩家需要直观了解某国当前指挥官列表时触发,例如在一个"检阅部队"类型的决策 option 里调用它来显示该国所有单位领袖的名字。它本质上是一个纯展示性 effect,不改变任何游戏状态,仅用于 UI 信息反馈。
country_event = {
id = my_mod.1
title = my_mod.1.t
desc = my_mod.1.d
option = {
name = my_mod.1.a
# 向玩家展示本国的单位领袖名单
show_unit_leaders_tooltip = yes
}
}
[every_unit_leader](/wiki/effect/every_unit_leader):在用 every_unit_leader 批量操作指挥官(如添加特性)之后,紧接着调用本 effect 可以让玩家立即看到被影响的领袖列表,形成操作+反馈的完整流程。[add_trait](/wiki/effect/add_trait):为单位领袖添加特质后,配合本 effect 向玩家直观展示谁获得了改变,增强可读性。[character_list_tooltip](/wiki/effect/character_list_tooltip):两者都是纯展示类 effect,可搭配使用以同时呈现角色列表和单位领袖名单,提供更全面的 tooltip 信息。[any_unit_leader](/wiki/trigger/any_unit_leader):在触发条件中用 any_unit_leader 判断是否存在符合条件的领袖,满足条件后再调用本 effect 展示,避免在无领袖时显示空白 tooltip。hidden_effect 中调用则完全没有意义,因为隐藏块里的 tooltip 展示根本不会显示给玩家。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.
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
}
}
[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.hidden_effect block is completely pointless, since tooltips in hidden blocks will never display to the player.