Wiki

trigger · alliance_naval_strength_ratio

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Compares the estimated naval strength between the scope country, his allies and his enemies.

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

alliance_naval_strength_ratio is commonly used to evaluate whether a player's or AI nation's combined naval strength relative to enemies is advantageous. Typical applications include naval expansion decisions, diplomatic events, or war preparation focuses as unlock conditions. Common scenarios include: preventing AI from rashly starting wars when allied naval superiority hasn't been established, or triggering emergency reinforcement events when facing naval inferiority.

# Only allow this decision to execute when allied naval strength is at least 1.2x that of enemies
available = {
    alliance_naval_strength_ratio > 1.2
}

Synergy

  • [alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio): Measures combined land military strength. Often evaluated alongside this trigger to ensure both naval and land supremacy are satisfied before triggering offensive decisions.
  • [enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio): Evaluates naval power from the enemy perspective. Complements this trigger with mutual validation, avoiding misjudgments caused by duplicate counting of ally contributions.
  • [has_defensive_war](/wiki/trigger/has_defensive_war): Determines if currently in a defensive war. Typically used with this trigger—naval inferiority combined with defensive war status can trigger emergency AI reinforcement strategies or special aid events.
  • [add_ai_strategy](/wiki/effect/add_ai_strategy): When naval ratio is insufficient, use this effect to inject increased naval construction weight into AI strategic priorities, forming a "judgment→response" feedback loop with this trigger.

Common Pitfalls

  1. Overlooking the dynamic nature of allies: This trigger calculates the current sum of allies. If allies leave the faction or are occupied during script execution, the ratio will shift dramatically, invalidating previously satisfied conditions. It's recommended to pair this with [any_allied_country](/wiki/trigger/any_allied_country) to confirm key allies still exist beforehand.
  2. Reversing the threshold direction: Beginners often mistakenly write < 1.0 instead of > 1.0 to represent "my side has superiority." Clarify that a ratio greater than 1 means the allied side is stronger than enemies, while less than 1 means inferiority. Inverted logic will make conditions work opposite to expectations.