trigger · is_major
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
check if country is a major
is_majorCOUNTRYnonecheck if country is a major
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_major 常用于决策或国策的 available / trigger 块中,限制某些强力选项只对大国开放,或在事件中为大国和小国分叉走不同的剧情路线。例如,当你想让某个军事援助决策只对主要列强可见时:
decision_example = {
available = {
is_major = yes
has_war = no
}
# ...
}
[exists](/wiki/trigger/exists):常与 is_major 同时检查目标国家是否还存在,避免对已亡国的大国执行逻辑时报错。[alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio):大国通常是联盟核心,组合判断大国的联盟实力比,用于 AI 决策或外交触发条件。[any_neighbor_country](/wiki/trigger/any_neighbor_country):在循环中先用 is_major 筛选邻国中的大国,再做进一步条件判断,常见于威胁评估脚本。[add_named_threat](/wiki/effect/add_named_threat):在事件效果块中,确认触发国是大国后才施加全局紧张度,符合大国行动影响力更大的设计逻辑。is_major 只能在 COUNTRY scope 下使用,新手有时在 state 或 unit_leader scope 里直接调用,导致脚本报错或静默失败;需要先用 owner / ROOT 等跳转到正确的国家 scope。[alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio) 等数值触发器补充判断。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_major is commonly used in the available / trigger blocks of decisions or national focuses to restrict certain powerful options to major powers only, or to branch different story paths for majors and minors in events. For example, when you want a military aid decision to be visible only to great powers:
decision_example = {
available = {
is_major = yes
has_war = no
}
# ...
}
[exists](/wiki/trigger/exists): Often checked together with is_major to verify that the target country still exists, preventing errors when executing logic on defunct major powers.[alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio): Major powers typically serve as alliance cores; combine this check with is_major to judge alliance strength ratios for AI decisions or diplomatic trigger conditions.[any_neighbor_country](/wiki/trigger/any_neighbor_country): Within loops, use is_major first to filter neighboring major powers, then apply further conditional checks; commonly seen in threat assessment scripts.[add_named_threat](/wiki/effect/add_named_threat): In event effect blocks, confirm the triggering country is a major before applying global tension, aligning with the design logic that major power actions have greater influence.is_major can only be used in COUNTRY scope. Beginners sometimes call it directly within state or unit_leader scopes, causing script errors or silent failures; you must first jump to the correct country scope using owner / ROOT or similar.[alliance_strength_ratio](/wiki/trigger/alliance_strength_ratio) for supplementary judgment.