Wiki

effect · every_other_country

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Executes children effects on every Country different from the one in scope (or \"random_select_amount\" of random country if specified) that fulfills the \"limit\" trigger.
tooltip=key can be added to override tooltip title.
By default the effects are only displayed once, you may display them for each matching country with display_individual_scopes.
ex:
SOV = {
	every_other_country = {
		tooltip = my_loc_key # Optional
		random_select_amount = 3 # Optional
		display_individual_scopes = yes # Optional - default = no
		... country scope effects ...
	}
}

实战 · 配合 · 坑

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

实战用法

every_other_country 常用于事件或决策中需要对所有其他国家批量施加效果的场景,例如全球性事件触发后让所有参战国或所有大国降低战争支持,或在某国宣布新秩序时对其他所有国家添加威胁。下面示例展示苏联激活某决策后,对所有其他主要参战国降低战争支持并添加威胁:

SOV = {
    every_other_country = {
        limit = {
            has_war = yes
            is_major = yes
        }
        add_war_support = -0.05
        add_named_threat = {
            threat = 2
            name = SOV_global_pressure_threat
        }
    }
}

配合关系

  • has_war:在 limit 块中筛选处于战争状态的国家,是最常见的过滤条件,避免对和平国家误施效果。
  • is_major:与 every_other_country 配合,将作用范围精确限定为主要大国,减少不必要的性能开销。
  • add_named_threat:常在遍历所有其他国家时同步增加威胁值,模拟某国扩张引发的全球警惕。
  • set_country_flag:在遍历过程中对满足条件的国家打上标记,供后续 limit 或事件触发器引用,实现多步骤逻辑。

常见坑

  1. 忘记 limit 导致遍历全图:不加 limit 时效果会作用于游戏内所有其他国家(包括尚未生成的释放国),既可能引发意外的游戏状态改变,又会带来严重的性能问题,务必用 limit 缩小范围。
  2. 将 scope 内的 effect 误写为当前 scope 的命令:进入 every_other_country 块后 scope 已切换到被遍历的目标国家,若仍想对原始国家(如 SOV)执行操作,需用 ROOT = { ... } 显式引用,否则命令会错误地作用在被遍历的国家上。

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

every_other_country is commonly used in events or decisions where you need to apply effects to all other countries in bulk — for example, reducing war support for all belligerents or major powers after a global event fires, or adding threat to every other country when a nation declares a new order. The example below shows the Soviet Union activating a decision that reduces war support and adds threat for all other major belligerents:

SOV = {
    every_other_country = {
        limit = {
            has_war = yes
            is_major = yes
        }
        add_war_support = -0.05
        add_named_threat = {
            threat = 2
            name = SOV_global_pressure_threat
        }
    }
}

Synergy

  • has_war: Used inside a limit block to filter for countries currently at war — the most common filtering condition, preventing effects from accidentally hitting peaceful nations.
  • is_major: Paired with every_other_country to narrow the scope strictly to major powers, reducing unnecessary performance overhead.
  • add_named_threat: Frequently used while iterating over all other countries to simultaneously raise threat values, simulating global alarm triggered by one nation's expansion.
  • set_country_flag: Used during iteration to tag countries that meet certain conditions, so that subsequent limit blocks or event triggers can reference those flags for multi-step logic.

Common Pitfalls

  1. Forgetting limit causes iteration over the entire map: Without a limit, the effect applies to every other country in the game (including nations not yet released), which can cause unintended game-state changes and serious performance issues. Always use limit to narrow the scope.
  2. Writing effects intended for the current scope inside the iterated scope: Once inside an every_other_country block, the scope has switched to the target country being iterated. If you still need to perform operations on the original country (e.g. SOV), you must reference it explicitly with ROOT = { ... } — otherwise the command will incorrectly execute on the iterated country instead.