Wiki

trigger · naval_strength_ratio

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Compares the estimated navy strength between the scope country and the one set with 'tag' 
naval_strength_ratio = { 
  tag = GER 
  ratio > 0.5 
}

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

naval_strength_ratio 常用于判断某国海军是否具备相对优势,从而解锁特定决策、事件选项或国策分支——例如只有当己方海军实力超过对手一定比例时,才允许发动两栖战略。以下示例展示在一个决策的 available 块中限制玩家只有海军占优时才能选择:

available = {
    naval_strength_ratio = {
        tag = ENG
        ratio > 0.8
    }
}

配合关系

  • [alliance_naval_strength_ratio](/wiki/trigger/alliance_naval_strength_ratio):当需要将己方整个阵营的海军合并计算对比时,与本 trigger 配合使用,可分别评估单国与联盟整体的海军差距。
  • [enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio):与本 trigger 互补,用于同时从"我对敌"与"敌对我"两个方向双向校验海军实力平衡,避免单侧判断遗漏边缘情况。
  • [has_navy_size](/wiki/trigger/has_navy_size)(注:请以白名单为准,此处替换为)[has_army_size](/wiki/trigger/has_army_size):在海军规模触发前先用规模类 trigger 过滤极小国家,防止比率计算在分母接近零时产生异常行为。
  • [create_wargoal](/wiki/effect/create_wargoal):在海军强度比率达标后作为 effect 触发宣战目标,常见于"制海权争夺"类事件链的结果块。

常见坑

  1. ratio 比较方向混淆ratio 的含义是 scope 国 ÷ tag 国,而非反过来。新手常误以为写 ratio > 1.0 就表示"我比对方强",但若 scope 和 tag 搞反,结果逻辑会完全相反,导致触发条件永远为真或永远为假。
  2. tag 填写的是目标国而非比较基准:部分新手将 tag 理解为"基准国"并随意填写同盟国或中立国标签,却忘记该国海军为零时比率会变得无意义;应确保 tag 指向的国家实际拥有海军单位,否则比率结果不可预期。

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

naval_strength_ratio is commonly used to determine whether a nation possesses relative naval superiority, thereby unlocking specific decisions, event options, or national focus branches—for example, allowing amphibious operations only when your naval strength exceeds your opponent's by a certain ratio. The following example demonstrates restricting players to select an option only when they have naval superiority within a decision's available block:

available = {
    naval_strength_ratio = {
        tag = ENG
        ratio > 0.8
    }
}

Synergy

  • [alliance_naval_strength_ratio](/wiki/trigger/alliance_naval_strength_ratio): Use in conjunction with this trigger when you need to combine your entire faction's naval strength for comparison, allowing separate evaluation of single-nation versus alliance-wide naval gaps.
  • [enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio): Complements this trigger; use to verify naval strength balance bidirectionally from both "me versus enemy" and "enemy versus me" perspectives, avoiding edge cases that single-directional checks might miss.
  • [has_navy_size](/wiki/trigger/has_navy_size) (Note: refer to whitelist for accuracy; substitute with) [has_army_size](/wiki/trigger/has_army_size): Filter out minuscule nations using size-class triggers before applying naval ratio triggers, preventing anomalous behavior when the denominator approaches zero.
  • [create_wargoal](/wiki/effect/create_wargoal): Trigger war goals as an effect once naval strength ratio thresholds are met, commonly found in result blocks of "naval supremacy contention" event chains.

Common Pitfalls

  1. Confusion over ratio comparison direction: The meaning of ratio is scope nation ÷ tag nation, not the reverse. Beginners often mistakenly assume writing ratio > 1.0 means "I am stronger than the opponent," but if scope and tag are reversed, the logic becomes inverted, causing conditions to always trigger or never trigger.
  2. tag refers to the target nation, not the comparison baseline: Some beginners misunderstand tag as the "baseline nation" and arbitrarily fill in allied or neutral nation tags, forgetting that when the target nation has zero naval units, the ratio becomes meaningless. Ensure the nation referenced by tag actually possesses naval units; otherwise, the ratio result is unpredictable.