trigger · has_ideology_group
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
has_ideology_group = communism - Checks if the current character has a country leader role matching the ideology group
has_ideology_groupCHARACTERnonehas_ideology_group = communism - Checks if the current character has a country leader role matching the ideology group
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
has_ideology_group 常用于检查某个角色是否担任特定意识形态阵营的国家领袖,例如在事件或决议中判断当前领袖是否属于共产主义或法西斯阵营,从而决定是否触发特定剧情分支。典型场景包括:清洗领袖时限制只对特定意识形态的领袖生效,或在 focus 完成后为匹配意识形态的领袖添加特质。
# 仅当该角色拥有法西斯意识形态的国家领袖角色时,才允许添加特质
add_country_leader_trait = {
trait = fascist_demagogue
available = {
has_ideology_group = fascism
}
}
[is_country_leader](/wiki/trigger/is_country_leader):通常先用 is_country_leader 确认角色正处于国家领袖职位,再用 has_ideology_group 进一步确认其意识形态分组,避免对非领袖角色的无效判断。[has_ideology](/wiki/trigger/has_ideology):has_ideology 检查的是更细粒度的具体意识形态(如 stalinism),而 has_ideology_group 检查大类分组(如 communism),两者常嵌套使用以实现粗筛加细筛的逻辑。[add_country_leader_trait](/wiki/effect/add_country_leader_trait):在确认意识形态分组后,为符合条件的领袖动态添加特质,是最典型的"先判断后执行"搭配模式。[swap_country_leader_traits](/wiki/effect/swap_country_leader_traits):当领袖意识形态分组满足条件时,替换其特质组合,常用于意识形态转变后的角色重塑。limit 块中会静默失败或报错,需要先通过 any_character / specific character 等方式进入角色 scope 再调用。has_ideology_group 检查的是角色所持有的国家领袖角色对应的意识形态分组,而非国家当前执政意识形态;若要检查国家意识形态,应在 COUNTRY scope 使用对应的国家级 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.
has_ideology_group is commonly used to check whether a character holds a national leader position in a specific ideological faction. Typical use cases include verifying in events or decisions whether the current leader belongs to the communist or fascist bloc, then branching the story accordingly. Practical scenarios involve restricting purge operations to leaders of specific ideologies, or granting traits to leaders matching a particular ideology after focus completion.
# Only allow adding a trait if the character is a national leader with fascist ideology
add_country_leader_trait = {
trait = fascist_demagogue
available = {
has_ideology_group = fascism
}
}
[is_country_leader](/wiki/trigger/is_country_leader): Typically use is_country_leader first to confirm the character currently holds a national leader position, then use has_ideology_group to further verify their ideological faction, avoiding ineffective checks on non-leader characters.[has_ideology](/wiki/trigger/has_ideology): has_ideology checks fine-grained specific ideologies (such as stalinism), while has_ideology_group checks broad faction categories (such as communism). Both are often nested together to implement coarse filtering followed by fine filtering logic.[add_country_leader_trait](/wiki/effect/add_country_leader_trait): After confirming the ideological faction, dynamically add traits to qualifying leaders—this is the most typical "verify then execute" combination pattern.[swap_country_leader_traits](/wiki/effect/swap_country_leader_traits): When a leader's ideological faction meets conditions, replace their trait composition. This is often used for character redesigns following ideological shifts.limit block under COUNTRY scope will fail silently or throw an error. You must enter character scope first via any_character or similar constructs before invoking this trigger.has_ideology_group checks the ideological faction of the character's national leader role, not the country's current ruling ideology. To check country ideology, use the appropriate country-level trigger in COUNTRY scope instead—the two cannot be used interchangeably.