trigger · civilwar_target
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
civilwar target is ( for civil wars checks )
civilwar_targetCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcivilwar target is ( for civil wars checks )
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
civilwar_target 常用于内战相关的 focus/decision 条件中,用来识别当前内战的目标方(即交战的另一个派系国家),从而对其进行针对性判断。例如在 mod 中设计内战剧情时,可以在 trigger 块里检测某个国家是否就是本次内战的对立方,再决定是否触发特定事件或解锁选项。
# 在内战相关决策的 available 块中使用
available = {
civilwar_target = {
tag = FROM
}
}
[has_civil_war](/wiki/trigger/has_civil_war):通常先用此 trigger 确认当前国家确实处于内战状态,再用 civilwar_target 进一步判断内战对手是谁,两者形成「先判断内战存在,再定位目标」的标准组合。[add_civil_war_target](/wiki/effect/add_civil_war_target):负责在 effect 侧为某国添加内战目标,与 civilwar_target 在 trigger 侧读取内战目标形成「写入-读取」的完整闭环。[declare_war_on](/wiki/effect/declare_war_on):在确认内战目标后,可在 effect 块中对其正式宣战,civilwar_target 提供的目标 scope 直接作为宣战对象,避免硬编码标签。[any_enemy_country](/wiki/trigger/any_enemy_country):当内战目标不止一个或需要泛化枚举敌方时,可配合此 trigger 做更广泛的敌方检索,与 civilwar_target 互补使用。civilwar_target 只在处于内战状态的国家 scope 下有意义,如果宿主国并没有正在进行的内战,该 trigger 将直接返回 false 且不报错,导致条件静默失败,新手容易误以为是其他逻辑出了问题。civilwar_target 的 target 应填写 THIS/ROOT/FROM 等动态 scope 指针,而不是直接写死某个国家标签(如 GER),内战目标是动态生成的派系国家,硬编码标签几乎必然匹配失败。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.
civilwar_target is commonly used in focus/decision conditions related to civil wars to identify the target faction of the current civil war (the opposing faction country in the conflict). This allows for targeted judgments against it. For example, when designing civil war storylines in a mod, you can check in a trigger block whether a certain country is the opposing party in this civil war, and then decide whether to trigger specific events or unlock options.
# Using civilwar_target in the available block of civil war-related decisions
available = {
civilwar_target = {
tag = FROM
}
}
[has_civil_war](/wiki/trigger/has_civil_war): Typically use this trigger first to confirm that the current country is indeed in a state of civil war, then use civilwar_target to further determine who the civil war opponent is. These two form the standard combination of "first confirm civil war exists, then locate the target."[add_civil_war_target](/wiki/effect/add_civil_war_target): Responsible for adding a civil war target to a country on the effect side. It forms a complete "write-read" loop with civilwar_target reading the civil war target on the trigger side.[declare_war_on](/wiki/effect/declare_war_on): After confirming the civil war target, you can formally declare war on it in the effect block. The target scope provided by civilwar_target directly serves as the declaration of war target, avoiding hardcoded tags.[any_enemy_country](/wiki/trigger/any_enemy_country): When there are multiple civil war targets or when you need to broadly enumerate enemies, you can use this trigger in conjunction for broader enemy retrieval, complementing civilwar_target.civilwar_target only has meaning under the scope of a country that is in a state of civil war. If the host country does not have an ongoing civil war, this trigger will directly return false without error, causing the condition to fail silently. Newcomers often mistakenly believe the problem lies elsewhere in the logic.civilwar_target should be filled with dynamic scope pointers like THIS/ROOT/FROM, not hardcoded country tags directly (such as GER). Civil war targets are dynamically generated faction countries, so hardcoded tags will almost certainly fail to match.