Wiki

trigger · pc_is_state_claimed_by

Definition

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

Description

Check if state is claimed in conference by TAG
Example:
pc_is_state_claimed_by = SOV/ROOT/ROOT.FROM

实战 · 配合 · 坑

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

实战用法

pc_is_state_claimed_by 主要用于和平会议相关的 mod 场景,例如判断某省份是否已被特定国家在会议桌上认领,从而触发额外事件或限制某些决议的可用性。常见于自定义和平会议逻辑、战后领土分配事件链,以及在 available 块中动态屏蔽与已认领领土冲突的决策。

# 在某个决策的 available 块中,检查目标州是否被苏联在会议中认领
available = {
    ROOT = {
        pc_is_state_claimed_by = SOV
    }
}

配合关系

  • [pc_is_state_claimed](/wiki/trigger/pc_is_state_claimed) —— 先用它确认该州在会议中是否被任何国家认领,再用 pc_is_state_claimed_by 精确判断认领方,两步过滤逻辑更清晰。
  • [pc_is_state_claimed_and_taken_by](/wiki/trigger/pc_is_state_claimed_and_taken_by) —— 与本 trigger 形成递进关系:前者仅检查"认领",后者同时检查"认领且已实际获得",常并排写在同一事件的不同 option 触发条件中。
  • [is_owned_by](/wiki/trigger/is_owned_by) —— 配合使用可区分"会议上认领"与"实际主权归属",避免把外交桌上的索赔误判为真实控制。
  • [add_claim_by](/wiki/effect/add_claim_by) —— 当上述 trigger 返回假(目标州尚未被认领)时,在 effect 块中为特定国家补充索赔,形成"检查→补充"的完整逻辑闭环。

常见坑

  1. Scope 用错:本 trigger 必须在 STATE scope 下调用,若直接写在国家 scope 的事件根级而未先切换到州 scope(如用 ROOT = { ... } 包裹),会导致 trigger 静默失败或报错,且很难从日志中定位原因。
  2. target 与 TAG 混淆:值可以填具体国家 TAG(如 SOV)或支持的 scope 关键字(如 ROOT),但不能填变量或动态 TAG 字符串;新手常尝试用 var:some_tag 传入动态国家,这在该 trigger 中是无效写法。

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

pc_is_state_claimed_by is primarily used in peace conference-related mod scenarios, such as determining whether a state has already been claimed by a specific nation at the negotiation table, thereby triggering additional events or restricting the availability of certain decisions. It is commonly found in custom peace conference logic, post-war territorial allocation event chains, and dynamically blocking decisions in the available block that would conflict with already-claimed territories.

# In the available block of a decision, check if the target state was claimed by the Soviet Union in the conference
available = {
    ROOT = {
        pc_is_state_claimed_by = SOV
    }
}

Synergy

  • [pc_is_state_claimed](/wiki/trigger/pc_is_state_claimed) — Use this first to confirm whether the state has been claimed by any nation in the conference, then use pc_is_state_claimed_by for precise identification of the claimant. This two-step filtering logic is clearer.
  • [pc_is_state_claimed_and_taken_by](/wiki/trigger/pc_is_state_claimed_and_taken_by) — Forms a progressive relationship with this trigger: the former only checks "claimed," while the latter checks both "claimed and actually obtained." These are commonly placed side-by-side in different option trigger conditions within the same event.
  • [is_owned_by](/wiki/trigger/is_owned_by) — Use together to distinguish between "claimed at the negotiation table" and "actual sovereignty ownership," avoiding mistaking diplomatic table claims for real control.
  • [add_claim_by](/wiki/effect/add_claim_by) — When the above triggers return false (the target state has not yet been claimed), use the effect block to add claims for the specific nation, forming a complete "check → supplement" logical loop.

Common Pitfalls

  1. Incorrect Scope Usage: This trigger must be called within a STATE scope. If written directly at the root level of a country-scoped event without first switching to a state scope (such as wrapping with ROOT = { ... }), it will cause the trigger to fail silently or throw an error, making it difficult to pinpoint the issue from logs.
  2. Confusion Between target and TAG: The value can be filled with a concrete country TAG (such as SOV) or supported scope keywords (such as ROOT), but cannot accept variables or dynamic TAG strings. Beginners often attempt to pass dynamic nations using var:some_tag, which is an invalid syntax for this trigger.