Wiki

effect · strategic_province_location

Definition

  • Supported scope:STATE
  • Supported target:none

Description

Add a strategic location to a province using state scope
The available strategic locations is defined in strategic_locations and is specified with a province id.
Can contain multiple strategic locations
Ex:
strategic_location = {
  my_strategic_area = 3258 # Province ID
  my_other_area = 1234
}
}

实战 · 配合 · 坑

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

实战用法

strategic_province_location 常用于动态战略地图 mod 中,当玩家完成特定事件或决策后,向某个州添加新的战略位置标记,从而改变 AI 或玩家的战略规划重心。例如,在一个修改战略轰炸系统的 mod 里,可以通过事件触发为某个工业州动态注册多个关键省份的战略意义:

# 在州 scope 的 option 块中
strategic_province_location = {
    industrial_hub_zone = 3258
    rail_junction_zone  = 1204
}

配合关系

  • [has_state_flag](/wiki/trigger/has_state_flag):先检查该州是否已设置某个标记,避免重复添加战略位置造成逻辑混乱。
  • [set_state_flag](/wiki/effect/set_state_flag):添加战略位置后打上标记,防止后续事件重复执行同一效果。
  • [add_province_modifier](/wiki/effect/add_province_modifier):对同一省份叠加省份修正,与战略位置一起强化该区域的特殊属性表现。
  • [is_controlled_by](/wiki/trigger/is_controlled_by):判断州的控制权归属,只在特定国家控制时才注册战略位置,使效果更具条件针对性。

常见坑

  1. 省份 ID 填写错误:省份 ID 必须属于当前 STATE scope 所对应的州,若填入其他州的省份 ID,游戏不会报错但战略位置将无法正确注册,排查时极难发现。
  2. strategic_state_location(白名单中的同类 effect)混淆:两者名称高度相似,strategic_province_location 以单个省份 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

strategic_province_location is commonly used in dynamic strategic map mods. When a player completes a specific event or decision, it adds new strategic location markers to a state, thereby shifting the strategic focus of AI or player planning. For example, in a mod that modifies the strategic bombing system, you can dynamically register multiple key provinces' strategic significance for an industrial state through event triggers:

# Within the option block in state scope
strategic_province_location = {
    industrial_hub_zone = 3258
    rail_junction_zone  = 1204
}

Synergy

  • [has_state_flag](/wiki/trigger/has_state_flag): Check if the state already has a specific flag before adding strategic locations, avoiding logical confusion from duplicate additions.
  • [set_state_flag](/wiki/effect/set_state_flag): Mark the state after adding strategic locations to prevent subsequent events from executing the same effect repeatedly.
  • [add_province_modifier](/wiki/effect/add_province_modifier): Stack province modifiers on the same province alongside strategic locations to reinforce the region's special attribute representation.
  • [is_controlled_by](/wiki/trigger/is_controlled_by): Determine state ownership before registering strategic locations only when controlled by specific nations, making the effect more conditionally targeted.

Common Pitfalls

  1. Incorrect province ID entry: The province ID must belong to the state corresponding to the current STATE scope. If you enter a province ID from another state, the game will not report an error but the strategic location will fail to register correctly, making it extremely difficult to debug.
  2. Confusion with strategic_state_location (a similar effect in the whitelist): The two names are highly similar. strategic_province_location specifies locations at the granularity of individual province IDs. Using the other command by mistake may cause the action level to not match, resulting in unexpected behavior.