trigger · is_dynamic_country
Definition
- Supported scope:
COUNTRY - Supported target:
any
Description
returns true if the country is a dynamic country (tag is D01-D50)
is_dynamic_countryCOUNTRYanyreturns true if the country is a dynamic country (tag is D01-D50)
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_dynamic_country 常见于需要排除或专门处理动态生成国家(如内战分裂国、傀儡衍生国)的场景,例如防止 AI 策略、决策或国家事件错误地触发到这些临时标签国家上。比如在一个"仅对真实国家生效"的决策中用来过滤掉动态国家:
available = {
NOT = { is_dynamic_country = yes }
}
也可以反向使用,在专门针对动态国家的清理/合并逻辑中作为触发前提。
[exists](/wiki/trigger/exists):动态国家有时处于已消亡状态,配合 exists = yes 可确保目标国家既存在又是动态国家,避免空指针式逻辑错误。[any_other_country](/wiki/trigger/any_other_country)(→ [any_enemy_country](/wiki/trigger/any_enemy_country)):在遍历所有敌对国时,常用 is_dynamic_country 在 limit 块内排除或筛选动态标签,保证逻辑只作用于预期的国家集合。[has_country_flag](/wiki/trigger/has_country_flag):动态国家通常会被 mod 打上自定义 flag 来标记其来源,两者配合可进一步区分是哪类动态国家(内战方、傀儡等)。[annex_country](/wiki/effect/annex_country):在处理动态国家消除逻辑时,常先用 is_dynamic_country = yes 确认身份,再执行吞并操作,防止误吞真实国家。true;通过 set_cosmetic_tag 改了外观的普通国家并不受影响,不要用此 trigger 代替 has_cosmetic_tag 做外观判断。