Wiki

trigger · all_claimant

Definition

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

Description

Checks if the provided trigger is true for all countries that claims the state in scope.
`tooltip` supports bindable localization.

### Example

all_claimant = { tooltip = my_loc # Optional bindable localization has_war_goal = yes }

实战 · 配合 · 坑

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

实战用法

all_claimant 常用于领土争端相关的决议或焦点条件中,例如判断"对某州拥有领土主张的所有国家是否都处于战争状态",从而触发特定的外交或军事事件。典型场景包括:在释放傀儡或转让州时,检查所有主张方是否满足某个前置条件,避免逻辑冲突。

# 检查对某争议州所有主张国是否都处于战争中,才允许执行转让
available = {
    42 = {  # 某争议州 scope
        all_claimant = {
            has_war = yes
        }
    }
}

配合关系

  • any_claimany_claim 用于先快速判断"是否存在至少一个主张国",再配合 all_claimant 做更严格的全量检查,避免 all_claimant 在无主张国时意外返回真。
  • has_war:最常见的内部判断,用来检查每个主张国当前是否处于战争状态,构成战争前置条件。
  • is_in_faction:在 all_claimant 内部使用,验证所有主张国是否均已加入阵营,常用于多方结盟场景的解锁条件。
  • controls_state:在 all_claimant 内部检查主张国是否实际控制了争议州,区分"名义主张"与"实际占领"。

常见坑

  1. 无主张国时触发器返回真:当某个州没有任何国家提出主张时,all_claimant 遵循"全称量词对空集成立"的逻辑,会返回 true,可能导致条件意外满足。建议在外层配合 any_claim = yes 做保底判断。
  2. Scope 层级写错all_claimant 必须在 STATE scope 下调用,新手容易在 country scope 直接写,导致脚本报错或静默失效;需要先用州 TAG 或 capital_scope 切换到正确的 state 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

all_claimant is commonly used in decisions or focus conditions related to territorial disputes — for example, checking whether all countries that hold a claim on a given state are currently at war, in order to trigger specific diplomatic or military events. Typical use cases include verifying that all claimants meet a prerequisite before releasing a puppet or transferring a state, preventing logic conflicts.

# Only allow the transfer if every claimant on the disputed state is at war
available = {
    42 = {  # disputed state scope
        all_claimant = {
            has_war = yes
        }
    }
}

Synergy

  • any_claim: Use any_claim first to quickly check whether at least one claimant exists, then follow up with all_claimant for a stricter all-or-nothing check — this prevents all_claimant from unexpectedly returning true when no claimants are present.
  • has_war: The most common inner condition; checks whether each claimant is currently at war, forming a war prerequisite.
  • is_in_faction: Used inside all_claimant to verify that every claimant has already joined a faction — often used as an unlock condition in multi-party alliance scenarios.
  • controls_state: Used inside all_claimant to check whether each claimant actually controls the disputed state, distinguishing a nominal claim from physical occupation.

Common Pitfalls

  1. Trigger returns true when no claimants exist: When a state has no claimants at all, all_claimant follows the "universal quantifier over an empty set is vacuously true" logic and returns true, which can cause conditions to be satisfied unexpectedly. It is recommended to pair it with any_claim = yes in the outer scope as a safety check.
  2. Wrong scope level: all_claimant must be called from within a STATE scope. Beginners often write it directly inside a country scope, causing script errors or silent failures. You must first switch to the correct state scope via a state TAG or capital_scope before calling it.