Wiki

effect · every_subject_country

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Executes children effects on every subject Country of the country 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_subject_country = {
		tooltip = my_loc_key # Optional
		random_select_amount = 3 # Optional
		display_individual_scopes = yes # Optional - default = no
		... country scope effects ...
	}
}

实战 · 配合 · 坑

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

实战用法

every_subject_country 常用于宗主国向所有傀儡国批量施加效果的场景,例如战争结束后统一给附庸国解除战争目标、添加国策树,或在宗主国完成某研究时为所有附庸同步技术加成。下面示例演示苏联对所有附属国批量添加战争支持并标记国家旗帜:

SOV = {
    every_subject_country = {
        limit = {
            has_war = yes
        }
        add_war_support = 0.05
        set_country_flag = received_soviet_support
    }
}

配合关系

  • is_subject_of:在 limit 块中进一步筛选仅针对某类附属关系(如仅限傀儡而非自治领),使效果更精准。
  • has_war:过滤出当前正在参战的附属国,避免将战时效果施加到未参战的国家。
  • add_ideas:对所有符合条件的附属国批量添加国策或顾问思潮,是最常见的批量状态修改搭配。
  • set_autonomy:配合 every_subject_country 批量调整附属国的自治等级,常见于剧本事件触发后的批量解放或收紧控制场景。

常见坑

  1. 忘记作用域已切换every_subject_country 的子块中作用域已经切换到各个附属国,若需要在子块内引用宗主国自身(如宣战、转移状态),必须显式用 ROOTPREV 来引用,否则会对附属国自身执行错误的操作。
  2. limit 条件写在错误的作用域层级limit 块内的触发器已经以附属国为作用域,新手容易误将宗主国的条件(如宗主国的 has_war)直接写入 limit,导致逻辑判断对象错位,应使用 ROOT = { has_war = yes } 这类嵌套方式引用宗主国属性。

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_subject_country is most commonly used when a overlord needs to apply effects to all its subjects in bulk — for example, clearing war goals for all puppets after a war ends, granting national focus trees, or syncing technology bonuses to every subject when the overlord completes a research project. The example below demonstrates the Soviet Union adding war support and setting a country flag on all subjects currently at war:

SOV = {
    every_subject_country = {
        limit = {
            has_war = yes
        }
        add_war_support = 0.05
        set_country_flag = received_soviet_support
    }
}

Synergy

  • is_subject_of: Use inside a limit block to further filter for a specific subject type (e.g. puppets only, excluding dominions), making the effect more targeted.
  • has_war: Filters down to only those subjects currently at war, preventing wartime effects from being applied to non-belligerent subjects.
  • add_ideas: Bulk-adds national ideas or advisor ideologies to all qualifying subjects — the most common pairing for mass state modification.
  • set_autonomy: Combined with every_subject_country to adjust the autonomy level of subjects in bulk; frequently seen in scripted events that trigger mass liberation or tighten overlord control.

Common Pitfalls

  1. Forgetting that the scope has already switched: Inside the every_subject_country block, the scope is already each individual subject country. If you need to reference the overlord itself (e.g. to declare war or transfer a state), you must explicitly use ROOT or PREV — otherwise the operation will be executed on the subject instead.
  2. Writing limit conditions at the wrong scope level: Triggers inside the limit block are evaluated from the subject country's scope. A common beginner mistake is writing overlord-side conditions (such as the overlord's has_war) directly inside limit, causing the logic to evaluate against the wrong country. Use a nested form like ROOT = { has_war = yes } to reference overlord properties correctly.