Hands-On Usage
all_allied_country is well-suited for use inside trigger blocks in events or decisions when you need to verify that every ally simultaneously meets a given condition — for example, confirming that all alliance members have researched a specific technology or reached a stability threshold before granting a special reward. It is also commonly used in available conditions for peace-deal or diplomatic events to ensure that no ally is currently at war before the effect is allowed to fire.
# Fire a diplomatic event only when all allies are not at war and have stability above the baseline
country_event = {
id = my_mod.1
trigger = {
all_allied_country = {
NOT = { has_war = yes }
has_stability > 0.5
}
}
}
Synergy
- any_allied_country:
all_allied_country requires every ally to satisfy the condition, whereas any_allied_country requires only at least one. The two are frequently used side by side to distinguish between "all qualify" and "at least one qualifies" logic branches.
- is_ally_with: Use
is_ally_with in the outer scope first to confirm that an alliance relationship with a specific country actually exists, then use all_allied_country to run a bulk check across the entire ally set — this makes the logic more airtight.
- has_war: The most common inner condition. It checks whether every member of the ally group is (or is not) at war, making it the single most frequent pairing with
all_allied_country.
- has_stability: Paired with a stability check, this combination is typically used to assess whether an entire alliance bloc is in a "collectively healthy" state, and is a classic trigger condition for diplomatic events.
Common Pitfalls
- Assuming the trigger includes the country itself:
all_allied_country iterates over allies only — it does not include the country that owns the trigger. If you also need to constrain the executing country, you must write the corresponding conditions separately in the same trigger block; otherwise the executing country's state will never be evaluated.
- Using the trigger outside a COUNTRY scope: This trigger is only valid in a COUNTRY scope. Calling it from a state, province, or any other scope will cause it to silently fail or throw an error. Make sure the outer scope has already been switched to a country scope via
OWNER, CONTROLLER, or a similar accessor before using this trigger.