Wiki

trigger · has_war_with_major

Definition

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

Description

is country at war with a major

实战 · 配合 · 坑

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

实战用法

has_war_with_major 常用于判断某国是否已陷入大国战争,从而触发特定事件、解锁决议或限制外交行动。例如在自定义专注树中,当玩家与任意大国交战时才允许执行某项战时动员决议:

available = {
    has_war_with_major = yes
}

也可以反向使用(= no)来限制仅在和平时期才能触发的外交专注。

配合关系

  • [has_defensive_war](/wiki/trigger/has_defensive_war):常与 has_war_with_major 联用,进一步区分玩家是主动进攻还是被大国入侵,用于差异化触发条件。
  • [any_enemy_country](/wiki/trigger/any_enemy_country):在确认与大国交战后,用此 trigger 遍历敌国做更精细的判断,例如检查是否某个特定大国是交战方。
  • [has_war_support](/wiki/trigger/has_war_support)(注意:白名单中为 has_bombing_war_support / has_casualties_war_support 等子类)或 [has_capitulated](/wiki/trigger/has_capitulated):与 has_war_with_major 组合,判断大国战争进入特定阶段后是否满足某些条件。
  • [add_war_support](/wiki/effect/add_war_support):作为结果 effect,当确认与大国交战时给予额外战争支持加成,模拟举国动员的氛围。

常见坑

  1. 混淆"大国"判定标准:游戏内"major"由引擎根据综合实力动态评定,并非固定国家列表。新手有时以为只有默认七大国才算 major,实际上游戏进程中实力膨胀的国家也可能被升格为 major,导致 trigger 在意料之外的情况下返回 yes
  2. 忘记指定 = yes= no:该 trigger 必须明确赋值,直接写 has_war_with_major 而不加 = yes 会导致脚本解析报错或静默失效,尤其在嵌套条件块中容易被漏掉。

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

has_war_with_major is commonly used to determine whether a country is engaged in war with a major power, triggering specific events, unlocking decisions, or restricting diplomatic actions. For example, in a custom focus tree, a wartime mobilization decision can only be executed when the player is at war with any major power:

available = {
    has_war_with_major = yes
}

It can also be used in reverse (= no) to restrict diplomatic focuses that only trigger during peacetime.

Synergy

  • [has_defensive_war](/wiki/trigger/has_defensive_war): Frequently combined with has_war_with_major to further distinguish whether the player is actively attacking or being invaded by a major power, enabling differentiated trigger conditions.
  • [any_enemy_country](/wiki/trigger/any_enemy_country): After confirming war with a major power, use this trigger to iterate through enemy countries for more granular checks, such as verifying whether a specific major power is a combatant.
  • [has_war_support](/wiki/trigger/has_war_support) (note: the whitelist includes subtypes like has_bombing_war_support / has_casualties_war_support) or [has_capitulated](/wiki/trigger/has_capitulated): Combine with has_war_with_major to check whether certain conditions are met after a major power war enters a specific stage.
  • [add_war_support](/wiki/effect/add_war_support): As a result effect, grant additional war support bonuses when confirming war with a major power, simulating the atmosphere of total national mobilization.

Common Pitfalls

  1. Confusing the "major power" classification standard: The "major" designation in-game is dynamically evaluated by the engine based on overall strength, not a fixed country list. Newcomers sometimes assume only the default seven major powers qualify, but in reality, countries that grow in power during gameplay may also be promoted to major status, causing the trigger to return yes in unexpected circumstances.
  2. Forgetting to specify = yes or = no: This trigger requires explicit assignment. Writing has_war_with_major without = yes will cause script parsing errors or silent failure, especially easy to overlook in nested conditional blocks.