trigger · area
Definition
- Supported scope:
STATE - Supported target:
none
Description
check state's strategic area id
areaSTATEnonecheck state's strategic area id
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
area 常用于判断某个州是否属于特定战略区域,从而实现按地理分区触发事件、决策或国策效果。例如在"占领特定战略区域后解锁建设选项"或"限定某个国策只影响某一战略区域内的州"时非常实用。
# 决策的 available 块:仅当目标州位于战略区 118(东地中海)时才可用
available = {
FROM = {
area = 118
}
}
[region](/wiki/trigger/region):region 判断州所属的地区(region),而 area 判断战略区(strategic area),两者常叠用来精确限定地理范围,形成"大区 + 小区"双重过滤。[is_owned_by](/wiki/trigger/is_owned_by):判断该战略区域内的州是否归属特定国家,常与 area 组合在 any_neighbor_state 或事件条件中使用。[has_state_category](/wiki/trigger/has_state_category):在锁定战略区后,进一步筛选州的规模等级,避免对小州触发高消耗效果。[set_state_category](/wiki/effect/set_state_category):在 effect 块中对满足 area 条件的州批量修改州等级,是区域性开发类 mod 的典型写法。area 对应游戏地图编辑器里的"战略区"(strategic area),其 ID 与"地区"(region)的 ID 是完全独立的两套数字,新手常把两者的 ID 互相代入,导致条件永远不成立。area 只在 STATE scope 下有效,若忘记先切换到州 scope(如通过 capital_scope、every_owned_state 等进入),直接在国家 scope 下写 area = ... 会被引擎静默忽略或报错,逻辑完全失效。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.
area is commonly used to check whether a state belongs to a specific strategic area, enabling you to trigger events, decisions, or national focus effects based on geographic regions. It's particularly useful for scenarios like "unlocking construction options after occupying a specific strategic area" or "limiting a national focus to affect only states within a certain strategic area."
# available block in a decision: only available when the target state is in strategic area 118 (Eastern Mediterranean)
available = {
FROM = {
area = 118
}
}
[region](/wiki/trigger/region): region checks the region a state belongs to, while area checks the strategic area. These are often stacked together to precisely define geographic scope, creating a "macro region + micro region" dual filter.[is_owned_by](/wiki/trigger/is_owned_by): checks whether states within a strategic area are controlled by a specific country. Commonly combined with area in any_neighbor_state or event conditions.[has_state_category](/wiki/trigger/has_state_category): after locking a strategic area, further filters states by size category to avoid triggering high-cost effects on minor states.[set_state_category](/wiki/effect/set_state_category): in effect blocks, batch-modify state categories for states meeting area conditions. This is a typical pattern in regional development mods.area corresponds to "strategic area" in the game's map editor, and its ID system is completely separate from "region" IDs. Beginners often swap these IDs, causing conditions to never evaluate as true.area only works under STATE scope. If you forget to switch to state scope first (e.g., via capital_scope, every_owned_state), writing area = ... directly under country scope will be silently ignored by the engine or cause errors, breaking your logic entirely.