trigger · has_occupation_modifier
Definition
- Supported scope:
STATE - Supported target:
any
Description
compares occupied country that creates resistance to a tag. Example: has_occupation_modifier = modifier_name
has_occupation_modifierSTATEanycompares occupied country that creates resistance to a tag. Example: has_occupation_modifier = modifier_name
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
has_occupation_modifier 常用于占领系统相关的 mod 中,例如根据某个占领修正的存在来决定是否触发特定事件、激活决策或限制某些操作。典型场景是:当占领国对该州施加了特定修正时,才允许执行抵抗相关的决策链或解锁额外的合规度奖励。
# 仅当该州存在特定占领修正时,才允许触发抵抗事件
state_event = {
id = resistance_flavor.1
trigger = {
has_occupation_modifier = brutal_occupation_modifier
}
}
[has_active_resistance](/wiki/trigger/has_active_resistance):常与 has_occupation_modifier 联用,在确认某占领修正存在的同时,进一步判断该州是否有活跃抵抗,双重条件收窄触发范围。[compliance](/wiki/trigger/compliance):占领修正往往影响合规度阈值判断,两者配合可实现"只有在特定修正且合规度低于某值时才触发"的精细逻辑。[add_state_modifier](/wiki/effect/add_state_modifier):在 trigger 条件满足后,通过 effect 块叠加新的州修正,实现占领修正链式升级的设计。[occupation_law](/wiki/trigger/occupation_law):占领法令与占领修正经常共同定义一个占领政策的完整状态,两者搭配可精确描述当前占领环境。has_occupation_modifier 的值必须与 occupation_modifier 定义文件中的修正名完全一致(区分大小写),写错名字不会报错,只会让条件永远返回 false,极难排查。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_occupation_modifier is commonly used in mods related to the occupation system, such as deciding whether to trigger specific events, activate decisions, or restrict certain actions based on the existence of a particular occupation modifier. Typical scenarios include: allowing resistance-related decision chains to execute or unlocking additional compliance bonuses only when the occupying country has applied a specific modifier to the state.
# Only trigger resistance events when the state has a specific occupation modifier
state_event = {
id = resistance_flavor.1
trigger = {
has_occupation_modifier = brutal_occupation_modifier
}
}
[has_active_resistance](/wiki/trigger/has_active_resistance): Frequently used together with has_occupation_modifier to confirm the presence of an occupation modifier while further checking whether the state has active resistance, narrowing the trigger scope with dual conditions.[compliance](/wiki/trigger/compliance): Occupation modifiers often affect compliance threshold evaluations; combining them enables fine-grained logic such as "only trigger when a specific modifier is present and compliance is below a certain value."[add_state_modifier](/wiki/effect/add_state_modifier): After trigger conditions are met, use effect blocks to stack new state modifiers, enabling cascading upgrade designs for occupation modifier chains.[occupation_law](/wiki/trigger/occupation_law): Occupation laws and occupation modifiers frequently work together to define the complete state of an occupation policy; pairing them allows precise descriptions of the current occupation environment.has_occupation_modifier must exactly match the modifier name in the occupation_modifier definition file (case-sensitive). Misspelling the name will not produce an error but will cause the condition to always return false, making it extremely difficult to debug.