trigger · is_owned_by
Definition
- Supported scope:
STATE - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check if state is owned by
is_owned_bySTATETHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck if state is owned by
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_owned_by 常用于占领/转移领土类 mod 中,判断某个州是否归指定国家所有,从而触发特定事件或决议。例如在和平条约脚本或领土争夺决议中,只有当目标州归属正确时才允许玩家执行后续操作。
# 决议的 available 条件:只有当 42 号州归属德国时才可用
available = {
42 = {
is_owned_by = GER
}
}
[is_controlled_by](/wiki/trigger/is_controlled_by):所有权与控制权往往需要同时验证,仅拥有但未控制的州在占领情境下逻辑不完整,两者配合可精确描述"实际掌控"状态。[is_core_of](/wiki/trigger/is_core_of):判断一个州既是某国核心领土又被其拥有,常用于合法性/吞并条件的双重校验。[set_state_owner_to](/wiki/effect/set_state_owner_to):is_owned_by 作为前置条件确认当前归属,set_state_owner_to 随后执行转让,是领土转移逻辑的标准搭档。[transfer_state_to](/wiki/effect/transfer_state_to):与上条类似,先用 is_owned_by 限定触发范围,再用 transfer_state_to 完成实际移交,避免对非目标国的州产生误操作。is_owned_by 必须在 STATE scope 下调用,新手有时在 COUNTRY scope 内直接写此 trigger,导致脚本报错或静默失效;正确做法是先用州 ID 或 capital_scope 等方式切入对应州的 scope。is_owned_by 只检查主权归属,不检查实际控制权——战争中一个州可能仍归 A 国所有却被 B 国控制,若场景需要同时满足两者,必须额外搭配 is_controlled_by 或 is_fully_controlled_by,单靠本 trigger 会产生逻辑漏洞。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_owned_by is commonly used in territorial conquest/transfer mods to check whether a specific state belongs to a designated nation, thereby triggering particular events or decisions. For example, in peace treaty scripts or territorial dispute decisions, subsequent operations are only permitted when the target state has the correct owner.
# available condition in a decision: only usable when state 42 is owned by Germany
available = {
42 = {
is_owned_by = GER
}
}
[is_controlled_by](/wiki/trigger/is_controlled_by): Ownership and control often need to be verified together. A state that is merely owned but not controlled presents incomplete logic in occupation scenarios; using both triggers together precisely describes the state of "actual control."[is_core_of](/wiki/trigger/is_core_of): Determines whether a state is both a core territory and owned by a nation, commonly used for dual verification in legitimacy/annexation conditions.[set_state_owner_to](/wiki/effect/set_state_owner_to): is_owned_by serves as a precondition confirming current ownership, while set_state_owner_to executes the transfer afterward—the standard pairing for territory transfer logic.[transfer_state_to](/wiki/effect/transfer_state_to): Similar to the above; first use is_owned_by to limit the trigger scope, then use transfer_state_to to complete the actual transfer, avoiding unintended operations on non-target states.is_owned_by must be called within STATE scope; beginners sometimes write this trigger directly within COUNTRY scope, causing script errors or silent failures. The correct approach is to first switch into the appropriate state scope using state ID or capital_scope and similar methods.is_owned_by only checks sovereign ownership, not actual control—during war a state may remain owned by nation A but be controlled by nation B. If the scenario requires both conditions to be met simultaneously, you must additionally pair it with is_controlled_by or is_fully_controlled_by; relying on this trigger alone will introduce logic gaps.