trigger · alliance_strength_ratio
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Compares the estimated army strength between the scope country, his allies and his enemies.
alliance_strength_ratioCOUNTRYnoneCompares the estimated army strength between the scope country, his allies and his enemies.
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.
alliance_strength_ratio is commonly used in AI decision-making logic or event triggers to determine whether your faction has military superiority or inferiority relative to the enemy, thereby deciding whether to initiate war, seek alliances, or sign armistice agreements. For example, in an "intelligent diplomacy mod", you can have the AI actively seek assistance rather than take rash action when the overall force ratio is too low:
# Trigger a diplomatic aid event when your alliance's combined military strength is significantly weaker than the enemy
country_event = {
id = smart_diplomacy.1
trigger = {
alliance_strength_ratio < 0.6
has_defensive_war = yes
}
}
[fighting_army_strength_ratio](/wiki/trigger/fighting_army_strength_ratio): alliance_strength_ratio measures the estimated overall power of the alliance, while this trigger measures the actual strength of forces currently engaged in combat. Combined, they allow you to distinguish between "paper strength gap" and "actual combat gap", avoiding misjudgments.[enemies_strength_ratio](/wiki/trigger/enemies_strength_ratio): Directly compares enemy force ratios. Using it together with alliance_strength_ratio enables constructing more granular multi-condition force assessment logic.[any_allied_country](/wiki/trigger/any_allied_country): Checks whether any ally meets specific conditions. Combined with alliance force comparison, it allows further filtering of which allies need support when overall alliance strength is insufficient.[add_to_faction](/wiki/effect/add_to_faction): When the alliance's overall strength ratio is inadequate, you can recruit new members into the faction within an effect block to strengthen it, forming a decision feedback loop with the judgment results of this trigger.COUNTRY scope. If mistakenly placed in STATE or CHARACTER scopes (such as within a sub-block of any_owned_state), the game will silently skip it or throw an error. Ensure the outer scope is always a country.