trigger · is_controlled_by
Definition
- Supported scope:
STATE - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if state is controlled by
is_controlled_bySTATETHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if state is controlled by
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_controlled_by 常用于占领与傀儡相关的决议或事件中,判断某省份/地区当前是否由特定国家实际控制(而非仅仅拥有主权),例如在抵抗运动 mod 里限定只有当占领国确实控制某州时才触发特定事件或决策。也常用于解放战争场景:当某州被友军夺回控制权后,才允许执行后续的行政重建 effect。
# 仅在该州由德国控制时,允许激活某占领决策
available = {
is_controlled_by = GER
}
[is_owned_by](/wiki/trigger/is_owned_by):控制权与所有权往往需要同时检查,拥有主权但不控制(或反之)是占领机制的核心,两者联用能精准描述"敌占我土"状态。[is_owned_and_controlled_by](/wiki/trigger/is_owned_and_controlled_by):作为 is_owned_by + is_controlled_by 的组合快捷判断,在不需要分开区分时可替代前两者,对比使用有助于理解三者语义边界。[set_state_controller_to](/wiki/effect/set_state_controller_to):当触发 effect 需要改变控制权时,通常先用 is_controlled_by 在 limit 块中确认当前控制方,再执行该 effect 进行转移,形成"判断→操作"的标准结构。[has_active_resistance](/wiki/trigger/has_active_resistance):抵抗运动强度往往与占领国挂钩,联用可以筛选出"由特定国家控制且存在活跃抵抗"的州,用于触发镇压或事件逻辑。is_controlled_by 来判断一个国家"拥有"某州,实际上和平时期两者一致,但战争中己方州可能被敌方控制,所有权不变;若逻辑需要的是主权判断,应改用 is_owned_by,否则会在非占领情形下得到意外的假值。is_controlled_by = XXX 而未先切换到州 scope(如通过 any_neighbor_state 或 state 等),脚本将报错或静默失效,必须确保当前 scope 为具体的州。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.
is_controlled_by is commonly used in decisions or events related to occupation and puppets to check whether a specific state/region is currently under actual control by a particular nation (rather than merely possessing sovereignty). For example, in resistance movement mods it can restrict triggering specific events or decisions only when the occupying power truly controls a state. It's also frequently used in liberation war scenarios: after a state's control is reclaimed by friendly forces, subsequent administrative reconstruction effects are permitted to execute.
# Allow activation of an occupation decision only if the state is controlled by Germany
available = {
is_controlled_by = GER
}
[is_owned_by](/wiki/trigger/is_owned_by): Control and ownership often need to be checked simultaneously. Possessing sovereignty without control (or vice versa) is core to the occupation mechanic; using both together precisely describes the "enemy-occupied home territory" state.[is_owned_and_controlled_by](/wiki/trigger/is_owned_and_controlled_by): Functions as a combined shortcut for is_owned_by + is_controlled_by. When distinction isn't needed, it can replace the previous two; comparative usage helps clarify the semantic boundaries between all three.[set_state_controller_to](/wiki/effect/set_state_controller_to): When an effect needs to change control, typically first use is_controlled_by in a limit block to confirm the current controller, then execute this effect to transfer it, forming a standard "check→execute" pattern.[has_active_resistance](/wiki/trigger/has_active_resistance): Resistance movement intensity typically ties to the occupying power. Combined use filters states that are "controlled by a specific nation and have active resistance," useful for suppression or event logic triggers.is_controlled_by to judge whether a nation "owns" a state. In fact, the two coincide in peacetime, but during war your own states may be controlled by enemies while ownership remains unchanged. If your logic requires sovereignty checks, switch to is_owned_by instead, otherwise you'll get unexpected false values in non-occupation scenarios.is_controlled_by = XXX directly in the top-level trigger block of a country event without first switching to state scope (via any_neighbor_state, state, etc.), the script will error or silently fail. Always ensure your current scope is a specific state.