Wiki

trigger · all_occupied_country

Definition

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

Description

check if all occupied countries meets the trigger. tooltip=key can be defined to override title

实战 · 配合 · 坑

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

实战用法

all_occupied_country 常见于战争胜利条件检测、和平谈判前置判断,或成就解锁场景——例如检查玩家占领的所有国家是否都已被彻底征服、满足某种意识形态条件,再触发后续事件或决议。在大型战役 mod 中也常用于确认某一阵营是否将敌方全部沦为占领地。

# 仅当所有被占领国都不是主要国家时,解锁某决议
available = {
    all_occupied_country = {
        is_major = no
    }
}

配合关系

  • any_enemy_country — 常与 all_occupied_country 搭配,先用 any_enemy_country 确认存在交战对象,再用本触发器验证所有被占领国是否满足统一标准。
  • has_government — 在 all_occupied_country 的子块中使用,检查每个被占领国的政府类型,适合意识形态征服目标的条件判断。
  • controls_state — 验证占领关系的补充手段;当需要精确到具体州省时与本触发器配合使用以缩小范围。
  • has_war — 通常作为外层前置条件,确保当前仍处于战争状态,再由 all_occupied_country 进行被占领国的批量检查。

常见坑

  1. scope 方向混淆all_occupied_country 的 scope 是 COUNTRY,子块内的 scope 已自动切换为被占领国,新手容易在子块里再写 ROOT = 之类的反向引用而忘记 ROOT 此时仍指最初的调用国,导致判断逻辑错乱,需谨慎区分 THISROOT 的指向。
  2. 与"控制"混淆:被占领(occupied)指该国领土被己方占领但尚未吞并,与 controls_state 的"控制单个州"概念不同;若目标国已通过 annex_country 被吞并,则不再属于"被占领国",该触发器将不会遍历到它,新手常因此出现条件永久不满足的问题。

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

all_occupied_country is commonly used in victory condition checks, pre-peace-deal validation, or achievement unlock scenarios — for example, verifying that every country the player has occupied is fully conquered or meets some ideological condition before triggering a follow-up event or decision. In large campaign mods it is also frequently used to confirm whether a faction has reduced all enemy nations to occupied territories.

# Unlock a decision only when none of the occupied countries are major nations
available = {
    all_occupied_country = {
        is_major = no
    }
}

Synergy

  • any_enemy_country — Frequently paired with all_occupied_country: use any_enemy_country first to confirm that at least one belligerent exists, then use this trigger to verify that every occupied country meets a uniform condition.
  • has_government — Used inside the all_occupied_country sub-block to check the government type of each occupied country; well-suited for ideological conquest objective conditions.
  • controls_state — A complementary way to verify occupation; combine with this trigger when you need to narrow the check down to specific states rather than whole countries.
  • has_war — Typically placed as an outer prerequisite to ensure the country is still at war before all_occupied_country performs its bulk check on occupied nations.

Common Pitfalls

  1. Scope direction confusion: The scope of all_occupied_country is COUNTRY, and inside the sub-block the scope automatically switches to the occupied country. Beginners often write reverse references such as ROOT = inside the sub-block while forgetting that ROOT still points to the original calling country, which leads to broken logic. Always be careful to distinguish what THIS and ROOT refer to at each level.
  2. Conflating "occupied" with "controlled": Occupied (occupied) means the country's territory has been seized by your forces but the country has not yet been annexed — this is different from controls_state, which targets a single state. If a country has already been annexed via annex_country, it is no longer considered an "occupied country" and will not be iterated over by this trigger. Beginners frequently run into conditions that are permanently unsatisfied because of this distinction.