trigger · num_occupied_states
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
check the number of states occupied by nation
num_occupied_statesCOUNTRYnonecheck the number of states occupied by nation
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
num_occupied_states 常用于判断一个国家是否已通过战争占领了足够数量的敌方州,从而触发特殊事件、解锁决议或推进国策。例如在扩张型 mod 中,当某国占领达到一定规模时,给予政治点或激活特定意识形态奖励。
# 当本国占领的州数量达到或超过 10 个时,允许激活某项决议
available = {
num_occupied_states > 9
}
[any_occupied_country](/wiki/trigger/any_occupied_country):先用 num_occupied_states 判断总占领规模,再用 any_occupied_country 遍历具体哪些被占领国满足附加条件,两者配合可实现"大规模占领 + 针对特定目标"的双重筛选。[controls_state](/wiki/trigger/controls_state):占领(occupied)与控制(control)在游戏逻辑中是不同状态,常并列使用以区分"战时临时占领"和"实际控制"的场景边界。[add_political_power](/wiki/effect/add_political_power):当占领州数达标时奖励政治点,是最典型的"扩张即时激励"写法。[add_war_support](/wiki/effect/add_war_support):配合占领规模检查来动态调整战争支持度,模拟"占领越多、国内士气越高/越低"的剧情设计。num_occupied_states 统计的是被本国占领(occupied)的州,而非本国控制(controlled)的州。新手常误以为两者等价,导致条件在战争中未如期触发——控制但未占领(如盟友代为占领)的州不计入此数。ROOT/FROM 等指向国家的引用。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.
num_occupied_states is commonly used to determine whether a country has occupied a sufficient number of enemy states through war, thereby triggering special events, unlocking decisions, or advancing national focuses. For example, in expansion-oriented mods, when a certain country's occupation reaches a defined threshold, you can grant political power or activate specific ideology bonuses.
# Allow activation of a decision when this country's occupied states reach or exceed 10
available = {
num_occupied_states > 9
}
[any_occupied_country](/wiki/trigger/any_occupied_country): First use num_occupied_states to check the total occupation scale, then use any_occupied_country to iterate through which specific occupied countries meet additional conditions. Together, they enable dual-layer filtering for "large-scale occupation + targeting specific enemies".[controls_state](/wiki/trigger/controls_state): Occupation (occupied) and control (control) are distinct states in game logic and are often used in parallel to differentiate between "temporary wartime occupation" and "actual control" scenarios.[add_political_power](/wiki/effect/add_political_power): Granting political power when occupied states reach the threshold is the most typical pattern for "expansion-based instant incentives".[add_war_support](/wiki/effect/add_war_support): Pair occupation scale checks to dynamically adjust war support, simulating narrative designs like "more occupation equals higher/lower domestic morale".num_occupied_states counts states occupied (occupied) by this country, not states controlled (controlled) by it. Beginners often mistake the two as equivalent, causing conditions to fail triggering during war—states that are controlled but not occupied (such as those occupied by allies on your behalf) do not count toward this metric.ROOT/FROM.