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.
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
alliance_strength_ratio 常用于 AI 决策或事件触发逻辑中,判断己方阵营相对于敌方是否处于军事优势或劣势,从而决定是否发起战争、寻求结盟或签署停战协议。例如在一个"智能外交 mod"中,可以让 AI 在综合兵力比例过低时主动寻求援助而非冒进开战:
# 当己方联盟综合军力远弱于敌方时,触发求援外交事件
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 衡量联盟整体估算实力,而该 trigger 衡量当前实际交战部队强度,二者组合可区分"账面实力差"和"实战差",避免误判。[enemies_strength_ratio](/wiki/trigger/enemies_strength_ratio):直接对比敌方兵力比例,与 alliance_strength_ratio 共同使用可构建更精细的多条件兵力评估逻辑。[any_allied_country](/wiki/trigger/any_allied_country):用于检查是否存在盟友满足特定条件,与联盟兵力比较配合,可在联盟实力不足时进一步筛查哪个盟友需要支援。[add_to_faction](/wiki/effect/add_to_faction):当联盟整体实力比不足时,可在 effect 块中拉拢新成员加入阵营以补强,与本 trigger 的判断结果形成决策闭环。COUNTRY scope 下使用,若误放在 STATE 或 CHARACTER 等 scope 内(如写在 any_owned_state 的子块中),游戏会静默跳过或抛出错误,需确保外层 scope 始终是国家。