Hands-On Usage
every_allied_country is most commonly used in faction-wide coordination scenarios — for example, after the host country completes a research project or passes a national focus, you can use it to bulk-grant aid, set flags, or adjust relations for all allies at once. It is also well-suited for end-of-war events where you want to apply uniform reward or penalty logic across every member of the alliance.
GER = {
every_allied_country = {
limit = {
has_war = yes
is_in_faction = yes
}
add_war_support = 0.05
add_stability = 0.03
set_country_flag = received_axis_bonus
}
}
Synergy
- any_allied_country: Typically used first to check whether any ally meets the desired conditions before calling
every_allied_country for bulk execution, avoiding unnecessary iterations.
- add_ideas: Applies the same national spirit or idea to every ally — the classic pattern for giving the entire faction a uniform buff.
- has_war: Used inside a
limit block to filter down to allies that are actually at war, preventing effects from accidentally firing on peaceful minor nations.
- set_country_flag: Stamps a flag on each iterated ally, enabling phased logic in subsequent events or
has_country_flag checks.
Common Pitfalls
- Forgetting scope direction: Inside
every_allied_country the scope has already switched to the ally. If you still need to reference data from the original country (such as a host-nation flag), you must either save it in an outer scope beforehand or use ROOT/PREV to refer back to it — otherwise conditions and effects will evaluate against the iterated ally rather than the host.
- Mixing it up with
every_country: Beginners often mistakenly use every_country to loop over all countries and then add ally conditions inside a limit block. This wastes performance and requires extra arguments for triggers like is_ally_with. Using every_allied_country directly already implies the "is allied with the current scope country" constraint, so no additional filtering is needed.