Wiki

trigger · all_country_with_original_tag

Definition

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

Description

check if all country with current scope's original tag meets the trigger. Example:
all_country_with_original_tag = { 
  original_tag_to_check = ENG # the trigger check all countries that has this original tag 
  # ... triggers to check 
}

实战 · 配合 · 坑

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

实战用法

all_country_with_original_tag 适合在多国标签场景下做全面检查,例如判断"所有曾经是英国的国家(包括傀儡、分裂政权等)是否全部处于战争状态",或验证某个文明标签的所有衍生国是否都满足特定条件后再触发事件。常见于处理内战、傀儡独立、多政权并存的 mod 中。

# 检查所有原始标签为 GER 的国家是否都已加入某阵营
all_country_with_original_tag = {
    original_tag_to_check = GER
    is_in_faction = yes
    has_war = no
}

配合关系

  • original_tag:用于在循环体内或平行条件中比对某国的原始标签,与 all_country_with_original_tag 共同构成"标签族"判断逻辑。
  • has_war:最常见的内部条件之一,配合本 trigger 判断某一标签族的所有国家是否全部陷入或脱离战争。
  • is_in_faction:检查该标签族的所有国家是否都已加入阵营,常用于阵营完整性检验。
  • exists:在检查前先确认对应国家是否在局内存在,避免因国家不存在导致条件判断结果出现非预期的真值。

常见坑

  1. 忽略 original_tag_to_check 字段all_country_with_original_tag 必须在块内显式写明 original_tag_to_check = XXX,省略该字段会导致脚本报错或逻辑完全失效,不会自动继承当前 scope 的标签。
  2. 将其与 any_country_with_original_tag 混淆:本 trigger 要求所有满足该原始标签的国家都通过条件才返回真;如果只需要其中任意一个满足,应改用对应的 any 变体,否则条件会比预期严苛得多。

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_country_with_original_tag is well-suited for comprehensive checks in multi-tag scenarios — for example, verifying that "all countries that were originally Britain (including puppets, splinter regimes, etc.) are currently at war," or confirming that every derivative nation of a given civilisation tag meets certain conditions before firing an event. It appears frequently in mods that deal with civil wars, puppet independence, and multi-regime coexistence.

# Check whether all countries with original tag GER have joined a faction
all_country_with_original_tag = {
    original_tag_to_check = GER
    is_in_faction = yes
    has_war = no
}

Synergy

  • original_tag: Used inside loop bodies or parallel conditions to compare a country's original tag against a target value; together with all_country_with_original_tag it forms the core of "tag-family" evaluation logic.
  • has_war: One of the most common inner conditions, used alongside this trigger to determine whether every country in a given tag family is currently in — or out of — a war.
  • is_in_faction: Checks whether all countries in the tag family have joined a faction; commonly used to validate faction completeness.
  • exists: Confirms that the relevant country actually exists in the current game session before the check runs, preventing unexpected true-value results caused by evaluating conditions against non-existent countries.

Common Pitfalls

  1. Omitting the original_tag_to_check field: all_country_with_original_tag requires original_tag_to_check = XXX to be explicitly declared inside the block. Leaving it out will cause a script error or render the logic entirely non-functional — the field is never inherited automatically from the current scope's tag.
  2. Confusing it with any_country_with_original_tag: This trigger returns true only when all countries sharing the specified original tag pass the inner conditions. If you only need any one of them to satisfy the conditions, use the corresponding any variant instead — otherwise your condition will be far more restrictive than intended.