Wiki

trigger · any_navy_leader

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Checks if at least one Navy Leader of the Country in scope matches the triggers.
tooltip=key can be defined to override title.
ex: GER = {
  any_navy_leader = {
	tooltip = my_loc_key # Optional
	include_invisible = yes # Optional - default = no
    ... character scope triggers ...
  }
}

实战 · 配合 · 坑

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

实战用法

any_navy_leader 常用于检测某国是否拥有符合特定条件的海军将领,例如在事件或决策的 available 块中判断是否存在高技能或拥有特定特质的海军指挥官,从而解锁特殊奖励或剧情分支。也可用于成就 mod 中验证玩家是否培养出了符合条件的海军精英。

# 检测德国是否有至少一名技能 ≥ 4 且拥有 navy_chief_decisive_battle_1 特质的海军将领
GER = {
    any_navy_leader = {
        skill >= 4
        has_trait = navy_chief_decisive_battle_1
    }
}

配合关系

  • is_navy_leader:在进入 character scope 后用于二次确认身份,与 any_navy_leader 嵌套使用时可避免误判兼任多职的角色。
  • has_trait:最常见的内部条件,用来筛选拥有特定海军特质的将领。
  • skill:配合技能数值检查,快速过滤出高级别海军将领。
  • has_nationality:在流亡或多国将领场景下,进一步限定将领国籍,防止将流亡将领也纳入判断范围。

常见坑

  1. 作用域写错any_navy_leader 只能在 COUNTRY scope 下调用,若当前 scope 已经是 character 或 state,必须先用 owner / ROOT 等切回国家 scope,否则脚本报错或静默失效。
  2. is_navy_leader 混淆any_navy_leader 是在国家 scope 内遍历海军将领的迭代触发器,而 is_navy_leader 是在 character scope 内判断"当前角色是否为海军将领"的布尔触发器;两者不可互相替换,在错误 scope 下使用会导致条件永远为假。

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

any_navy_leader is commonly used to check whether a country has at least one navy leader meeting specific criteria — for example, inside an available block of an event or decision to determine whether a high-skill or specially-traited naval commander exists, thereby unlocking special rewards or story branches. It is also useful in achievement mods to verify that the player has developed a qualifying naval elite.

# Check whether Germany has at least one navy leader with skill >= 4 and the navy_chief_decisive_battle_1 trait
GER = {
    any_navy_leader = {
        skill >= 4
        has_trait = navy_chief_decisive_battle_1
    }
}

Synergy

  • is_navy_leader: Used after entering a character scope to confirm the character's role a second time. When nested with any_navy_leader, it prevents false positives on characters who hold multiple positions simultaneously.
  • has_trait: The most common inner condition, used to filter leaders who possess a specific naval trait.
  • skill: Paired with a numeric skill check to quickly narrow results down to high-ranking navy leaders.
  • has_nationality: In exile or multi-country leader scenarios, further restricts the leader's nationality to prevent exiled leaders from being included in the evaluation.

Common Pitfalls

  1. Wrong scope: any_navy_leader can only be called within a COUNTRY scope. If the current scope is already a character or state, you must first switch back to a country scope using owner, ROOT, or similar, otherwise the script will error out or silently fail.
  2. Confusion with is_navy_leader: any_navy_leader is an iterative trigger that loops over navy leaders from within a country scope, whereas is_navy_leader is a boolean trigger used inside a character scope to check whether the current character is a navy leader. The two are not interchangeable — using either in the wrong scope will cause the condition to evaluate as permanently false.