Wiki

trigger · core_compliance

Definition

  • Supported scope:COUNTRY
  • Supported target:any

Description

Compares the core (average of all occupied states) compliance value of occupied_country_tag that is occuppied by the country in current scope.
Example: 
core_compliance = { 
 occupied_country_tag = ITA 
 value > 35 
}

实战 · 配合 · 坑

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

实战用法

core_compliance 常用于殖民或占领系统的 mod 中,当你想根据本国对某个被占领国家的平均合规度来解锁特定决策或国策时非常有用。例如,可以用它来判断玩家是否已将意大利的合规度提升到足够高,才允许进行进一步的吞并或自治调整。

# 示例:只有当本国对意大利的核心合规度超过 50 时,才允许触发该决策
available = {
    core_compliance = {
        occupied_country_tag = ITA
        value > 50
    }
}

配合关系

  • [has_collaboration](/wiki/trigger/has_collaboration):合规度与协作度往往同步增长,两者一起检查可以更精确地判断占领政策的推进阶段。
  • [any_occupied_country](/wiki/trigger/any_occupied_country):先用 any_occupied_country 遍历找到目标被占领国,再在其 scope 内配合 core_compliance 做精细条件筛选。
  • [add_collaboration](/wiki/effect/add_collaboration):当合规度达标时,作为 effect 奖励进一步提升协作度,形成"合规→奖励→更高协作"的正向循环。
  • [add_autonomy_score](/wiki/effect/add_autonomy_score):合规度满足条件后,给予自治度分数变化,常用于实现"高合规解锁自治变更"的 mod 机制。

常见坑

  1. value 比较运算符写错:新手常写成 value = 50 而非 value > 50= 在数值比较中表示完全等于,实际上合规度精确等于某个整数的概率极低,条件几乎永远不会触发,应使用 ><>= 等比较符。
  2. scope 指向错误core_compliance 的主 scope 必须是拥有占领权的国家(即占领方),occupied_country_tag 填的是被占领方。新手容易把 scope 切换到被占领国后再使用该 trigger,导致逻辑反转或直接报错。

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

core_compliance is commonly used in mods involving occupation or annexation systems. It's particularly useful when you want to unlock specific decisions or national focuses based on your nation's average compliance level in an occupied country. For example, you can use it to check whether the player has raised Italy's compliance to a sufficiently high level before allowing further annexation or autonomy adjustments.

# Example: Only allow this decision to trigger if your nation's core compliance with Italy exceeds 50
available = {
    core_compliance = {
        occupied_country_tag = ITA
        value > 50
    }
}

Synergy

  • [has_collaboration](/wiki/trigger/has_collaboration): Compliance and collaboration typically increase in tandem. Checking both together allows more precise determination of your occupation policy progression stage.
  • [any_occupied_country](/wiki/trigger/any_occupied_country): Use any_occupied_country to iterate through and find your target occupied nation, then apply core_compliance within its scope for fine-grained condition filtering.
  • [add_collaboration](/wiki/effect/add_collaboration): When compliance thresholds are met, use it as an effect reward to further increase collaboration, creating a positive feedback loop of "compliance → reward → higher collaboration".
  • [add_autonomy_score](/wiki/effect/add_autonomy_score): Once compliance conditions are satisfied, award autonomy score changes, commonly used to implement "high compliance unlocks autonomy changes" mod mechanics.

Common Pitfalls

  1. Incorrect value comparison operators: Beginners often write value = 50 instead of value > 50. The = operator checks for exact equality in value comparisons; the probability of compliance being precisely equal to an integer is extremely low, making the condition almost never trigger. Use comparison operators like >, <, >= instead.
  2. Incorrect scope targeting: The primary scope for core_compliance must be the nation holding occupation rights (the occupier), while occupied_country_tag specifies the occupied nation. Beginners often mistakenly switch the scope to the occupied country before using this trigger, resulting in inverted logic or outright errors.