Wiki

trigger · has_enemy_naval_control

Definition

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

Description

Checks if any enemy has enough naval dominance to assert control in certain strategic region.

### Examples

TAG = { has_enemy_naval_control = REGION_ID }

实战 · 配合 · 坑

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

实战用法

has_enemy_naval_control 常用于沿海国家的决策或任务脚本中,判断敌方是否已夺得制海权,从而触发相应的战略应对逻辑,例如封锁补给、限制登陆反制或开放特殊决策。典型场景是为岛国或半岛国家编写"被封锁"状态下的特殊事件链,或在 available 块中阻止某些依赖海路补给的行动。

# 当敌方控制本国首都所在战略海区时,激活紧急补给决策
available = {
    NOT = {
        has_enemy_naval_control = PACIFIC_STRATEGIC_REGION
    }
}

配合关系

  • [convoy_threat](/wiki/trigger/convoy_threat):制海权丧失往往伴随着高护航威胁,两者配合可更精确地判断补给线是否陷入危机。
  • [enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio):用于量化敌我海军实力差距,与 has_enemy_naval_control 组合可同时检测"现象"与"根因",逻辑更完整。
  • [controls_state](/wiki/trigger/controls_state):海控触发器通常与陆上控制区判断联动,例如同时检测敌方是否控制了关键沿岸州,以判断是否面临两栖登陆威胁。
  • [add_ideas](/wiki/effect/add_ideas):在确认敌方已掌握制海权后,通过 effect 为本国添加"海上封锁"类 idea,向玩家反映战略劣势状态。

常见坑

  1. 忘记 scope 必须是 COUNTRY:新手有时在 state scope 或 unit_leader scope 下直接调用此 trigger,导致脚本报错或静默失效——务必确保外层 scope 是国家标签或通过 OWNER/CONTROLLER 等目标跳转到国家 scope 后再使用。
  2. 误将省份 ID 或州 ID 填入参数:此 trigger 的参数是战略海区(Strategic Region)ID,而非普通地块或州的 ID;填错 ID 后游戏不会给出明显报错,只会永远返回假,排查时需对照 map/strategicregions/ 文件夹确认正确的 REGION_ID

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

has_enemy_naval_control is commonly used in decision and mission scripts for coastal nations to determine whether an enemy has gained naval superiority, thereby triggering corresponding strategic response logic—such as supply blockades, landing restrictions, or unlocking special decisions. Typical scenarios include scripting a "blockaded" status event chain for island or peninsular nations, or using it in an available block to prevent actions that depend on sea-line supply routes.

# Activate emergency supply decision when enemy controls the strategic region containing this nation's capital
available = {
    NOT = {
        has_enemy_naval_control = PACIFIC_STRATEGIC_REGION
    }
}

Synergy

  • [convoy_threat](/wiki/trigger/convoy_threat): Loss of naval control is often accompanied by high escort threat; combining these two triggers enables more precise judgment of whether supply lines are in crisis.
  • [enemies_naval_strength_ratio](/wiki/trigger/enemies_naval_strength_ratio): Used to quantify the naval strength disparity between you and enemies; combined with has_enemy_naval_control, it detects both the "symptom" and the "root cause," making the logic more complete.
  • [controls_state](/wiki/trigger/controls_state): Naval control triggers typically work in conjunction with land control checks—for example, simultaneously verifying whether the enemy controls key coastal states to assess amphibious landing threats.
  • [add_ideas](/wiki/effect/add_ideas): After confirming the enemy has achieved naval superiority, use effects to add "naval blockade"-type ideas to your nation, reflecting strategic disadvantage status to the player.

Common Pitfalls

  1. Forgetting that scope must be COUNTRY: Beginners sometimes invoke this trigger directly under state scope or unit_leader scope, causing script errors or silent failures—always ensure the outer scope is a country tag or jump to country scope via OWNER/CONTROLLER before use.
  2. Mistakenly filling in province ID or state ID as the parameter: This trigger's parameter is a Strategic Region ID, not a regular province or state ID; using the wrong ID will not produce an obvious error message, but the trigger will silently return false. When debugging, cross-reference the map/strategicregions/ folder to confirm the correct REGION_ID.