Wiki

effect · character_list_tooltip

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Display in tooltip every character  (or "random_select_amount" of random characters if specified) that fulfills the "limit" trigger.

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

character_list_tooltip 常用于决策或事件选项中,向玩家展示当前满足特定条件的角色列表,例如列出所有拥有某特定 trait 的将领或顾问,以便玩家在选择前做出判断。配合 random_select_amount 可以在弹窗中只展示随机数量的角色,适合制作"随机招募"类决策的预览提示。

activate_targeted_decision = {
    target = ROOT
    decision = my_recruit_decision
    custom_effect_tooltip = my_recruit_decision_tt
}
character_list_tooltip = {
    limit = {
        has_trait = skilled_staffer
    }
    random_select_amount = 3
}

配合关系

  • [any_character](/wiki/trigger/any_character) — 在编写 limit 块之前,先用此触发器验证是否存在满足条件的角色,避免弹出空列表的尴尬提示。
  • [every_character](/wiki/effect/every_character) — 通常与该 effect 共用相同的 limit 筛选条件,一个负责展示列表,一个负责对筛选出的角色批量执行操作,逻辑上形成"预览 + 执行"的配对。
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — 角色列表提示常附属于决策的 custom_effect_tooltip 旁,向玩家提前说明决策会影响哪些角色。
  • [has_character](/wiki/trigger/has_character) — 作为外层 trigger 使用,确保目标角色确实存在于该国,防止 limit 过滤后显示内容为空。

常见坑

  1. 把它用在非 COUNTRY scope 下:该 effect 仅在 COUNTRY scope 生效,若误放在 STATE 或 UNIT_LEADER scope 中不会报错但会静默失效,检查时极难发现。
  2. 误以为它会真正执行操作character_list_tooltip 只生成 tooltip 文本显示,不会对列出的角色产生任何实际效果;新手常误以为它能同时触发角色相关的逻辑,应配合 every_character 等 effect 另行处理实际操作。

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

character_list_tooltip is commonly used in decisions or event options to display to the player a list of characters currently meeting specific conditions, such as listing all generals or advisors with a particular trait, allowing the player to make an informed choice before selecting. Combined with random_select_amount, you can display only a random number of characters in the popup, making it suitable for creating preview tooltips for "random recruitment" style decisions.

activate_targeted_decision = {
    target = ROOT
    decision = my_recruit_decision
    custom_effect_tooltip = my_recruit_decision_tt
}
character_list_tooltip = {
    limit = {
        has_trait = skilled_staffer
    }
    random_select_amount = 3
}

Synergy

  • [any_character](/wiki/trigger/any_character) — Before writing the limit block, use this trigger first to verify whether characters meeting the conditions exist, avoiding the awkwardness of displaying an empty list.
  • [every_character](/wiki/effect/every_character) — Usually shares the same limit filtering conditions with this effect; one is responsible for displaying the list while the other executes operations in bulk on the filtered characters, logically forming a "preview + execute" pairing.
  • [activate_targeted_decision](/wiki/effect/activate_targeted_decision) — Character list tooltips are typically attached alongside a decision's custom_effect_tooltip, informing the player in advance which characters will be affected by the decision.
  • [has_character](/wiki/trigger/has_character) — Used as an outer trigger to ensure the target character actually exists in that country, preventing the limit filter from resulting in empty display content.

Common Pitfalls

  1. Using it outside COUNTRY scope: This effect only works within COUNTRY scope. If mistakenly placed in STATE or UNIT_LEADER scope, it will not error but will silently fail, making it extremely difficult to detect during debugging.
  2. Mistakenly assuming it executes operations: character_list_tooltip only generates tooltip text for display and does not produce any actual effects on the listed characters; beginners often incorrectly believe it can simultaneously trigger character-related logic and should be paired with effects like every_character to handle actual operations separately.