trigger · is_leader_visible
Definition
- Supported scope:
COUNTRY - Supported target:
any
Description
Checks if the leader is visible to its owner (is_visible trigger in the leader's script)
is_leader_visibleCOUNTRYanyChecks if the leader is visible to its owner (is_visible trigger in the leader's script)
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_leader_visible 常用于国家领袖相关的事件或决策中,用来判断某位领袖是否对其国家"可见"(即其 is_visible 脚本条件为真),从而决定是否触发与该领袖相关的剧情、决策解锁或顾问激活逻辑。例如在一个隐藏领袖重新登场的 mod 中,可以用它作为解锁条件门槛。
# 在某个决策的 available 块中,仅当当前国家领袖可见时才允许激活
activate_decision = {
available = {
has_country_leader = {
ruling_only = yes
}
is_leader_visible = yes
has_stability > 0.5
}
}
is_leader_visible 进一步判断其可见性,两者组合构成完整的领袖状态检查。limit 块中,限制事件只对特定政体下可见的领袖生效。is_leader_visible 包裹在 hidden_trigger 中,可在不向玩家显示条件细节的情况下进行后台领袖可见性校验。is_leader_visible 只能在 COUNTRY scope 下使用,若写在 character 或 state scope 内则不会生效,新手容易在 every_character 块内部直接调用而忘记切回国家 scope。is_leader_visible = yes 即可;试图写成 is_leader_visible = { character = XXX } 会导致解析错误,其可见性判断来源于领袖脚本中的 is_visible 定义,无法在此处覆盖指定目标。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.
is_leader_visible is most commonly used in events or decisions related to country leaders, checking whether a given leader is "visible" to their country (i.e., their is_visible scripted condition evaluates to true). This determines whether to trigger leader-specific story beats, unlock decisions, or fire advisor activation logic. For example, in a mod where a hidden leader makes a comeback, this trigger serves as the gating condition for the unlock.
# Inside a decision's available block — only allows activation when the current country leader is visible
activate_decision = {
available = {
has_country_leader = {
ruling_only = yes
}
is_leader_visible = yes
has_stability > 0.5
}
}
is_leader_visible to further verify their visibility — together they form a complete leader state check.limit block to restrict events so they only fire for visible leaders under a specific government type.is_leader_visible inside a hidden_trigger allows background visibility checks without exposing the condition details to the player.activate_advisor to bring that leader in as an advisor — a standard pattern in "hidden character resurfaces" style mods.is_leader_visible can only be used within a COUNTRY scope. Writing it inside a character or state scope will cause it to silently do nothing. A common beginner mistake is calling it directly inside an every_character block without switching back to the country scope first.is_leader_visible = yes and nothing more. Attempting to write is_leader_visible = { character = XXX } will cause a parse error. The visibility check is driven entirely by the is_visible definition in the leader's script and cannot be overridden by specifying a target here.