trigger · or
Definition
- Supported scope:
any - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
at least one entry inside trigger must be true
oranyTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALat least one entry inside trigger must be true
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
or 常用于需要多个满足条件之一即可触发的判断场景,例如判断某个国家是否属于某一阵营成员之一、是否拥有多个可能的意识形态之一,或是否达成了若干胜利条件中的任意一个。在事件、国策 available、科技 allowed 等条件块中尤为常见。
available = {
or = {
tag = GER
tag = ITA
tag = JAP
}
}
or 与 and 嵌套使用,可以构造出"A 或 (B 且 C)"这类复合逻辑,是最常见的组合方式。not 包裹在 or 外部,等价于"所有子条件均不满足",用来实现排除逻辑。or 作为 limit 的一部分,可以灵活筛选符合任一标准的国家。or 内部条件较复杂时,用 custom_trigger_tooltip 包裹来提供对玩家友好的 UI 提示文本。or 内只能写两个条件:or 支持任意数量的子条件,只要其中一个为真即整体为真;新手有时会写多个平行的 or 块而非把所有子条件放在同一个 or 内,导致逻辑等价于 and(多个 or 块同级并列时,游戏会将它们视为 and 关系逐一校验)。or 内直接使用 effect 命令:or 是纯条件判断块,不能在其中写 add_to_variable 等 effect 命令,否则会导致脚本报错或静默失效;需要根据判断结果执行操作时,应在外部使用 if + limit 的结构。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.
or is commonly used in conditional judgments where triggering requires meeting any one of multiple conditions. Examples include determining whether a country belongs to one of several faction members, possesses one of multiple possible ideologies, or has achieved any of several victory conditions. It is particularly prevalent in condition blocks such as event available, national focus available, and technology allowed.
available = {
or = {
tag = GER
tag = ITA
tag = JAP
}
}
or with and allows constructing compound logic such as "A or (B and C)", which is the most common combination pattern.not around the outside of or is equivalent to "all subconditions are false", used to implement exclusion logic.or as part of limit within a looping scope allows flexible filtering of countries matching any one criterion.or are complex, wrap them with custom_trigger_tooltip to provide player-friendly UI hint text.or can only contain two conditions: or supports any number of subconditions; the entire block evaluates to true if any one is true. Beginners sometimes write multiple parallel or blocks instead of placing all subconditions in a single or, inadvertently creating logic equivalent to and (when multiple or blocks appear at the same nesting level, the game validates them sequentially as if connected by and).or: or is a pure conditional judgment block and cannot contain effect commands like add_to_variable within it, otherwise the script will error or fail silently. When execution is needed based on judgment results, use an if + limit structure outside instead.