Wiki

trigger · any_claim

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

check if there is a claim between a country and all others

实战 · 配合 · 坑

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

实战用法

any_claim 常用于判断某国是否对任何其他国家持有领土主张,适合在外交事件、焦点树条件或决议解锁中用于检测侵略性扩张意图。例如在一个反修正主义联盟的 mod 里,可以用它来判断某国是否具备战争野心,从而触发警告事件。

# 仅当该国持有任何领土主张时,允许其他大国发出外交警告
trigger = {
    tag = GER
    any_claim = {
        target = ROOT
        has_government = fascism
    }
}

此处 any_claim 的子块中 target 指向被核查的声索方,has_government 用于进一步筛选满足条件的对象。


配合关系

  • has_war_with — 通常与 any_claim 联用,确认某国不仅持有主张,而且已经对该目标开战,二者组合描述"已将主张付诸武力"的完整状态。
  • owns_state — 配合使用可区分"拥有主张但尚未占领"与"已实际控制"两种情形,在焦点树解锁条件中常见。
  • has_war — 用于排除已处于战争状态的国家,避免重复触发基于主张的外交惩罚逻辑。
  • add_state_claim — 在 effect 侧为国家添加新主张后,常在后续 trigger 块里用 any_claim 验证主张是否生效,形成"添加→验证"的标准写法。

常见坑

  1. 混淆 scope 层级any_claim 必须在 COUNTRY scope 下调用;若直接写在 statecharacter scope 内会静默失败,脚本不报错但条件永远不满足,排查时极难发现。
  2. 误以为无需子块:部分新手直接写 any_claim = yes 想判断"有任何主张",但该 trigger 需要一个完整的条件子块来描述被检查的目标国,留空或写 yes 会导致语法错误或逻辑异常。

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_claim is commonly used to check whether a country holds territorial claims against any other nation. It fits naturally into diplomatic events, focus tree conditions, or decision unlock requirements where you want to detect aggressive expansionist intent. For example, in a mod featuring an anti-revisionist alliance, you could use it to determine whether a country harbors war ambitions and trigger a warning event accordingly.

# Allow other major powers to issue a diplomatic warning only if this country holds any territorial claim
trigger = {
    tag = GER
    any_claim = {
        target = ROOT
        has_government = fascism
    }
}

Here, target inside the any_claim sub-block refers to the claimant being checked, while has_government further filters which targets satisfy the condition.


Synergy

  • has_war_with — Frequently paired with any_claim to confirm that a country not only holds a claim but has already gone to war over it, together expressing the complete state of "a claim backed by force."
  • owns_state — Used alongside any_claim to distinguish between "holds a claim but has not yet occupied" and "already in actual control," a pattern common in focus tree unlock conditions.
  • has_war — Used to exclude countries already at war, preventing duplicate triggering of claim-based diplomatic penalty logic.
  • add_state_claim — After adding a new claim on the effect side, it is standard practice to follow up with any_claim in a subsequent trigger block to verify the claim took effect, forming the canonical "add → verify" pattern.

Common Pitfalls

  1. Confusing scope levels: any_claim must be called within a COUNTRY scope. Writing it directly inside a state or character scope causes a silent failure — the script throws no error, but the condition is never satisfied, making it extremely difficult to track down during debugging.
  2. Assuming no sub-block is needed: Some newcomers write any_claim = yes expecting it to simply check "has any claim," but this trigger requires a full condition sub-block describing the target country to evaluate. Leaving it empty or writing yes will result in a syntax error or logical anomaly.