Wiki

effect · every_faction_member

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Executes children effects on every faction member of the country's faction in scope (if country does not have a faction it will only work on itself) (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_faction_member = {
		tooltip = my_loc_key # Optional
		random_select_amount = 3 # Optional
		display_individual_scopes = yes # Optional - default = no
		... country scope effects ...
	}
}

实战 · 配合 · 坑

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

实战用法

every_faction_member 常用于阵营联动场景,例如战争爆发时为阵营所有成员统一添加国策思潮、触发事件或发放资源,实现"一键同步"的阵营福利/惩罚系统。也可配合 limit 筛选出满足条件的成员国,对其单独施加效果,比如只给尚未拥有某科技的成员补充研究槽。

GER = {
    every_faction_member = {
        limit = {
            has_war = yes
            has_idea = war_economy
        }
        add_war_support = 0.05
        add_stability = 0.03
        add_manpower = 10000
    }
}

配合关系

  • is_in_faction —— 在外层判断目标国是否已加入阵营,避免对无阵营国家调用时产生预料外的仅作用于自身的行为。
  • has_war —— 在 limit 内过滤正在交战的成员,精确控制效果只作用于参战国。
  • add_ideas —— 最常见的配合,对阵营全员批量添加思潮(如战时动员令),一次性完成多国状态同步。
  • country_event —— 对每个成员触发定制事件,实现阵营内部的逐一通知或选择分支。

常见坑

  1. 误以为无阵营时效果会静默跳过:根据官方描述,若触发国自身没有加入任何阵营,every_faction_member 只会作用于触发国本身而非什么都不做,容易导致意外地对目标国自身执行了效果,调试时应额外用 [is_in_faction](/wiki/trigger/is_in_faction) 做前置保护。
  2. limit 写在块外而非块内limit 必须写在 every_faction_member = { } 块的内部第一行,写在块外不会生效且不报错,新手容易将其误放到上层 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

every_faction_member is most commonly used in faction-wide synchronization scenarios — for example, when a war breaks out, applying a national spirit, firing an event, or distributing resources to every faction member all at once, effectively building a "one-click" faction-wide buff or penalty system. It also pairs well with limit to filter down to members that meet specific conditions, applying effects only to those countries — such as granting extra research slots only to members who have not yet researched a particular technology.

GER = {
    every_faction_member = {
        limit = {
            has_war = yes
            has_idea = war_economy
        }
        add_war_support = 0.05
        add_stability = 0.03
        add_manpower = 10000
    }
}

Synergy

  • is_in_faction — Check in the outer scope whether the target country has actually joined a faction, preventing unexpected self-only behavior when the command is called on a country with no faction.
  • has_war — Use inside limit to filter for members currently at war, ensuring effects only apply to active belligerents.
  • add_ideas — The most common pairing: batch-apply a national spirit to every faction member (e.g., a wartime mobilization idea), syncing the status of multiple countries in a single pass.
  • country_event — Fire a custom event for each member individually, enabling per-country notifications or branching choices within the faction.

Common Pitfalls

  1. Assuming the effect silently does nothing when there is no faction: According to the official documentation, if the triggering country does not belong to any faction, every_faction_member will apply its effects to the triggering country itself rather than doing nothing at all. This can cause the effects to run on the target country unexpectedly. Always add a is_in_faction guard beforehand when debugging.
  2. Placing limit outside the block instead of inside it: limit must be written as the first line inside the every_faction_member = { } block. Placing it outside the block will silently have no effect and will not throw an error — a common beginner mistake that causes the filter logic to be completely ignored, since the limit ends up in the wrong parent scope.