trigger · has_terrain
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Checks if a country has any province of the specified terrain type.
Example: has_terrain = mountain
has_terrainCOUNTRYnoneChecks if a country has any province of the specified terrain type.
Example: has_terrain = mountain
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
has_terrain 常用于地理主题 mod 中,根据国家是否拥有特定地形省份来解锁专属决议、国策或顾问——例如"山地国家"才能研究特定山地战学说,或沙漠国家才能获得某种后勤加成。也可用在 available 块中动态限制某些内容对地形匮乏的国家不可见。
# 只有拥有山地省份的国家才能激活此决议
available = {
has_terrain = mountain
}
[any_owned_state](/wiki/trigger/any_owned_state) — 若需要检查更细粒度的地形条件(如某个州同时满足地形与资源要求),可与 has_terrain 在不同层级互补使用。[controls_state](/wiki/trigger/controls_state) — 结合使用可区分"拥有"与"控制",避免玩家通过占领他国山地省份意外触发本国专属内容。[add_ideas](/wiki/effect/add_ideas) — 当 has_terrain 条件满足后,常用于授予对应地形风格的国家精神(如山地作战加成)。[add_tech_bonus](/wiki/effect/add_tech_bonus) — 搭配地形判断给予特定科技折扣,例如拥有沙漠地形的国家获得步兵装备研究加速。has_terrain 只能在 COUNTRY scope 下使用,新手有时误将其写进 STATE scope(如 any_owned_state 的子块内),导致脚本报错或静默失效——在州 scope 检查地形应使用州层级的地形相关写法。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.
has_terrain is commonly used in geography-themed mods to unlock exclusive decisions, national focuses, or advisors based on whether a country owns provinces with specific terrain types—for example, only "mountainous nations" can research particular mountain warfare doctrines, or desert nations can gain certain logistics bonuses. It can also be used in available blocks to dynamically restrict certain content from being visible to countries lacking that terrain.
# Only countries owning mountain provinces can activate this decision
available = {
has_terrain = mountain
}
[any_owned_state](/wiki/trigger/any_owned_state) — If you need to check more granular terrain conditions (such as a state satisfying both terrain and resource requirements simultaneously), you can use has_terrain at different scope levels to complement each other.[controls_state](/wiki/trigger/controls_state) — Using them together can distinguish between "owns" and "controls," preventing players from accidentally triggering faction-exclusive content by occupying enemy mountain provinces.[add_ideas](/wiki/effect/add_ideas) — Once the has_terrain condition is met, it is commonly used to grant national spirits matching that terrain's style (such as mountain combat bonuses).[add_tech_bonus](/wiki/effect/add_tech_bonus) — Pair terrain checks with specific technology discounts; for example, countries with desert terrain gain accelerated infantry equipment research.has_terrain can only be used under COUNTRY scope. Beginners sometimes mistakenly place it within STATE scope (such as inside any_owned_state sub-blocks), causing script errors or silent failures. To check terrain at state level, you should use state-level terrain-related syntax instead.