Wiki

trigger · all_other_country

Definition

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

Description

check if all other countries meets the trigger. Excludes current country. tooltip=key can be defined to override title

实战 · 配合 · 坑

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

实战用法

all_other_country 常用于检查全球性条件是否成熟,例如判断"当前国家以外的所有国家是否都已陷入战争"或"是否所有其他大国都已承认某意识形态为主流",适合用在事件触发条件或焦点的 available 块中。

# 检查除本国外所有国家是否都处于战争状态 —— 用于某末日事件的触发条件
trigger = {
    all_other_country = {
        has_war = yes
    }
}
# 焦点可用条件:所有其他国家都未拥有某科技
available = {
    all_other_country = {
        NOT = { has_tech = electronic_mechanical_engineering }
    }
}

配合关系

  • any_enemy_countryall_other_country 验证全体满足某条件,any_enemy_country 则检查至少一个敌国满足条件,二者组合可构建"全局 vs 局部"的复合判断逻辑。
  • has_war:最常见的内层 trigger,用于在 all_other_country 内判断每个国家是否正在参战,构成"全世界都在打仗"类条件。
  • has_government:嵌套在 all_other_country 内,检查所有其他国家的执政党意识形态,常用于意识形态统一胜利类成就判断。
  • is_major:搭配使用时可在 all_other_country 内部用 limit 等方式筛选大国,再叠加其他条件,精确控制检查范围。

常见坑

  1. 误以为包含当前国家:该 trigger 明确排除当前 scope 所在国家(Excludes current country),若需要连同本国一起检查,需要额外在外层单独对 THIS 做条件判断,否则会得到错误的逻辑覆盖。
  2. 在非国家 scope 下使用时未确认 scope 正确all_other_country 支持 any scope,但若当前脚本上下文处于州(state)或省份 scope 内,需要先用 OWNER/CONTROLLER 等跳转到国家 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_other_country is commonly used to check whether a global condition has been met — for example, determining whether every country except the current one is at war, or whether all other major powers have recognized a certain ideology as dominant. It fits naturally inside event trigger conditions or a focus's available block.

# Check whether all countries except the current one are at war — used as a trigger for a doomsday event
trigger = {
    all_other_country = {
        has_war = yes
    }
}
# Focus availability condition: no other country has researched a specific technology
available = {
    all_other_country = {
        NOT = { has_tech = electronic_mechanical_engineering }
    }
}

Synergy

  • any_enemy_country: While all_other_country verifies that every country satisfies a condition, any_enemy_country checks that at least one enemy country does. Combining the two lets you build compound "global vs. local" logic.
  • has_war: The most common inner trigger used inside all_other_country — checks whether each country is currently at war, forming conditions like "the whole world is at war."
  • has_government: Nested inside all_other_country to check the ruling party ideology of every other country; frequently used in achievement checks for ideological-domination victory conditions.
  • is_major: Can be used together with all_other_country — typically via limit — to filter down to major powers before stacking additional conditions, giving you precise control over the scope of the check.

Common Pitfalls

  1. Assuming the current country is included: This trigger explicitly excludes the country in the current scope (Excludes current country). If you need to include your own country in the check, you must separately evaluate conditions against THIS outside the trigger; otherwise your logic will have an unintended gap.
  2. Using it inside a non-country scope without verifying the scope first: all_other_country supports the any scope, but if the current scripting context is a state or province scope, you must first transition to a country scope via OWNER, CONTROLLER, or a similar keyword — otherwise the behavior may not match your intent, or the trigger may fail to fire at all.