Wiki

trigger · has_core_occupation_modifier

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

has an occupation modifier that applies to average resistance/compliance
Example: 
has_core_occupation_modifier = { 
 occupied_country_tag = ITA 
 modifier = token 
}

实战 · 配合 · 坑

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

实战用法

该 trigger 常用于判断某个被占领国家当前是否存在特定的占领修正,从而决定是否触发后续决议或事件——例如在占领合规度系统的 mod 中,检测玩家是否已对意大利施加了某种"殖民管制"修正,再解锁进一步的镇压或怀柔选项。

# 示例:仅当对ITA施加了"harsh_occupation"修正时,该决议才可用
available = {
    has_core_occupation_modifier = {
        occupied_country_tag = ITA
        modifier = harsh_occupation
    }
}

配合关系

  • [core_compliance](/wiki/trigger/core_compliance):常与之搭配,先用 has_core_occupation_modifier 确认修正存在,再用 core_compliance 检查合规度是否达到阈值,两者共同构成完整的占领状态判断逻辑。
  • [core_resistance](/wiki/trigger/core_resistance):与抵抗度配合使用,验证某占领修正下抵抗度是否超过危险线,用于触发镇压事件。
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier):当占领修正以动态修正形式叠加时,两者联用可交叉验证修正层级,避免遗漏判断。
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier):在 effect 块中配合使用——先用 has_core_occupation_modifier 检查旧修正是否存在,再决定是否通过 add_dynamic_modifier 叠加新的占领政策。

常见坑

  1. modifier 填写的是 token 名而非修正的显示名称:新手容易把本地化字符串(如 "严酷占领")填入 modifier 字段,正确做法是填写脚本中定义该修正时使用的 token 标识符(如 harsh_occupation),否则条件永远不会返回真。
  2. scope 混淆:该 trigger 属于 COUNTRY scope,必须在施加占领修正的占领国(而非被占领国)的 scope 下调用;若误写在被占领国的 scope 下,条件判断会静默失败,且不会报错,难以排查。

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

This trigger is commonly used to determine whether an occupied country currently has a specific occupation modifier, allowing you to conditionally trigger subsequent decisions or events—for example, in a mod with an occupation compliance system, you might check whether the player has imposed a certain "colonial control" modifier on Italy before unlocking further suppression or appeasement options.

# Example: This decision is only available when the "harsh_occupation" modifier has been applied to ITA
available = {
    has_core_occupation_modifier = {
        occupied_country_tag = ITA
        modifier = harsh_occupation
    }
}

Synergy

  • [core_compliance](/wiki/trigger/core_compliance): Often paired together—use has_core_occupation_modifier to confirm the modifier exists, then use core_compliance to check whether compliance reaches a threshold. Both together form a complete occupation state evaluation logic.
  • [core_resistance](/wiki/trigger/core_resistance): Used in conjunction with resistance level checks to verify whether resistance under a given occupation modifier exceeds a danger threshold, triggering suppression events.
  • [has_dynamic_modifier](/wiki/trigger/has_dynamic_modifier): When occupation modifiers stack as dynamic modifiers, using both together allows cross-validation of modifier tiers and prevents oversight.
  • [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): Used alongside in effect blocks—first check with has_core_occupation_modifier whether an old modifier exists, then decide whether to stack a new occupation policy via add_dynamic_modifier.

Common Pitfalls

  1. The modifier field expects a token identifier, not the display name: Beginners often mistakenly insert localization strings (such as "Harsh Occupation") into the modifier field. The correct approach is to use the token identifier defined when the modifier was scripted (such as harsh_occupation). Otherwise, the condition will never evaluate to true.
  2. Scope confusion: This trigger belongs to COUNTRY scope and must be called within the scope of the occupying country (not the occupied one). If mistakenly written in the occupied country's scope, the condition check will silently fail without error, making it difficult to debug.