trigger · is_in_home_area
Definition
- Supported scope:
STATE - Supported target:
any
Description
Checks if the first province in the state is connected to the capital of its owner
is_in_home_areaSTATEanyChecks if the first province in the state is connected to the capital of its owner
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_in_home_area 常用于判断某个州是否处于其所有者的"核心补给范围"内,适合在补给惩罚类 mod、占领政策 mod 或动态修正系统中筛选"本土连接"与"海外孤立"两种状态。例如,可以在决策的 available 块里限制只有与首都连通的州才能推进某项建设:
available = {
is_in_home_area = yes
is_owned_by = ROOT
has_state_category = rural
}
[is_owned_by](/wiki/trigger/is_owned_by) — 通常先确认州的归属国再判断连通性,避免对敌占州触发逻辑。[is_controlled_by](/wiki/trigger/is_controlled_by) — 补充检查实际控制权,因为 is_in_home_area 只看所有者的首都连通,不考虑控制方。[add_state_modifier](/wiki/effect/add_state_modifier) — 当确认州处于(或不处于)本土区域后,为其添加对应的动态惩罚/奖励修正。[has_state_category](/wiki/trigger/has_state_category) — 联合过滤州的规模类型,精细化控制哪类州受本土连通条件影响。is_in_home_area 只在 STATE scope 下有效,若不小心写在国家事件的顶层条件块(而非 any_owned_state 等迭代块内),脚本会静默报错或始终返回假。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.
is_in_home_area is commonly used to determine whether a state is within its owner's "core supply range," making it ideal for supply penalty mods, occupation policy mods, or dynamic modifier systems to filter between "domestic connection" and "overseas isolated" states. For example, you can restrict a decision's available block so that only states connected to the capital can proceed with certain constructions:
available = {
is_in_home_area = yes
is_owned_by = ROOT
has_state_category = rural
}
[is_owned_by](/wiki/trigger/is_owned_by) — Usually confirm state ownership first before checking connectivity to avoid triggering logic on enemy-occupied states.[is_controlled_by](/wiki/trigger/is_controlled_by) — Supplement by checking actual control, since is_in_home_area only checks the owner's capital connectivity and does not account for the controlling faction.[add_state_modifier](/wiki/effect/add_state_modifier) — After confirming a state is (or is not) in the home region, apply corresponding dynamic penalties/bonuses to it.[has_state_category](/wiki/trigger/has_state_category) — Filter states by size category in combination to fine-tune which state types are affected by home connectivity conditions.is_in_home_area is only valid in STATE scope. If accidentally placed in the top-level condition block of a country event (rather than inside iteration blocks like any_owned_state), the script will silently error or always return false.