Hands-On Usage
every_enemy_country is commonly used in war-related mod events — for example, when a country triggers nuclear deterrence or strategic bombing, applying penalties (such as reduced war support or adding ideas) to all belligerents simultaneously. It is also well-suited for victory condition scripts that need to bulk-apply white peace or strip war goals from every enemy country at once.
GER = {
every_enemy_country = {
limit = {
has_war_support < 0.3
is_major = no
}
add_war_support = -0.05
add_ideas = demoralized_nation # idea must be defined in the ideas file beforehand
}
}
Synergy
- any_enemy_country: Use
any_enemy_country first as a condition check to confirm that at least one qualifying enemy exists, then use every_enemy_country to apply effects in bulk — this avoids unnecessary triggers firing on an empty set.
- white_peace: Pair with this in war-ending events to execute white peace against each enemy country individually.
- set_country_flag: Stamp a flag on each enemy country so that subsequent events or decisions can filter by
has_country_flag.
- has_war_with: Use inside a
limit block to precisely target countries that are still actively at war, preventing the effect from applying to former enemies whose wars have already ended.
Common Pitfalls
- Wrong scope target: The "enemy countries" resolved by
every_enemy_country are determined relative to the country in the current scope, not the country that owns the file where the effect is written. If you write it directly inside an event option without explicitly switching scope (e.g. GER = { ... }), the enemy set is derived from the event's FROM or ROOT. When that does not match your intent, use ROOT = { every_enemy_country = { ... } } to make the scope explicit.
- Using effect commands inside
limit: Beginners sometimes write effect commands such as add_war_support or add_ideas inside a limit = { } block, causing script errors or silent failures. The limit block only accepts triggers (e.g. has_war, is_major, has_idea); effects are never valid there.