Wiki

trigger · fighting_army_strength_ratio

Definition

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

Description

Compares the total army fighting strength between the scope country and the one set with 'tag'

Example 1:
fighting_army_strength_ratio = {
	tag = TAG
	ratio > 0.7 # can be '<','>' or '='
}

Example 2:
fighting_army_strength_ratio = {
	tag = TAG
	ratio > VARIABLE # can be '<','>' or '='
}

实战 · 配合 · 坑

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

实战用法

fighting_army_strength_ratio 常用于 AI 决策或外交事件中,判断己方与目标国的实际交战兵力对比,从而决定是否发起进攻、请求停战或触发特定剧情。例如在一个"战局评估"事件中,当我方战斗兵力超过敌方 1.5 倍时才触发优势进攻选项:

# 在事件 option 的 trigger 中判断是否具备兵力优势
trigger = {
    fighting_army_strength_ratio = {
        tag = ENG
        ratio > 1.5
    }
}

配合关系

  • [enemies_strength_ratio](/wiki/trigger/enemies_strength_ratio)fighting_army_strength_ratio 衡量的是实际交战部队,而 enemies_strength_ratio 衡量所有敌方总兵力,两者联合使用可区分"全局劣势但局部占优"的战况,做出更精准的 AI 判断。
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with):先确认与目标国处于防御战状态,再结合兵力比判断是否该转守为攻,逻辑更严谨。
  • [any_enemy_country](/wiki/trigger/any_enemy_country):在遍历敌国时配合兵力比 trigger,筛选出己方明显占优的具体对手,便于 AI 集中打击薄弱目标。
  • [create_wargoal](/wiki/effect/create_wargoal):当兵力比满足条件后作为 effect 触发宣战目标生成,实现"强则进攻"的完整逻辑闭环。

常见坑

  1. 与总兵力比混淆:该 trigger 比较的是正在交战的部队强度,而非全国总军力。若两国之间并无实际战斗,返回值可能不符合预期,不能用它替代 alliance_strength_ratio 来做纯军力对比。
  2. tag 填写自身 tag:将 tag 设为 scope 国家自身会导致比率恒为 1,条件永远以固定值成立或不成立,新手应确保 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

fighting_army_strength_ratio is commonly used in AI decisions or diplomatic events to assess the actual combat strength ratio between your forces and a target country, thereby determining whether to launch an attack, request a ceasefire, or trigger specific events. For example, in a "battle assessment" event, an offensive advantage option is triggered only when your fighting strength exceeds the enemy's by 1.5 times:

# Check for combat strength advantage in event option trigger
trigger = {
    fighting_army_strength_ratio = {
        tag = ENG
        ratio > 1.5
    }
}

Synergy

  • [enemies_strength_ratio](/wiki/trigger/enemies_strength_ratio): fighting_army_strength_ratio measures only actively engaged combat forces, while enemies_strength_ratio measures total enemy military strength. Using both together allows you to distinguish between "global disadvantage but local superiority" scenarios, enabling more precise AI judgments.
  • [has_defensive_war_with](/wiki/trigger/has_defensive_war_with): First confirm a defensive war status with the target country, then combine it with the strength ratio trigger to determine whether to transition from defense to offense—a more rigorous logical flow.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): When iterating through enemy countries, pair this with the strength ratio trigger to identify opponents where you hold a clear advantage, making it easier for AI to concentrate attacks on weaker targets.
  • [create_wargoal](/wiki/effect/create_wargoal): Once the strength ratio condition is met, use this as an effect to generate war goals, completing the full logical loop of "strength leads to attack."

Common Pitfalls

  1. Confusion with total military strength: This trigger compares only the strength of actively engaged forces, not total national military capacity. If there is no actual combat between the two countries, the return value may not match expectations, and it cannot be used as a substitute for alliance_strength_ratio for pure military comparisons.
  2. Using your own tag in the tag field: Setting tag to your own country's scope results in a ratio that is always 1, causing the condition to always resolve to a fixed true or false value. Beginners should ensure the tag field points to the opposing country.