trigger · is_theorist
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_theorist = yes/no - Checks if the character in scope is hired as a theorist
is_theoristCHARACTERnoneis_theorist = yes/no - Checks if the character in scope is hired as a theorist
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_theorist 常用于需要区分顾问角色类型的 mod 场景,例如在某个决策或事件中,仅对当前担任理论家职位的角色触发特殊效果(如额外特质或升级)。在动态顾问系统中,也可用于防止重复逻辑触发。
# 事件选项:若该角色正担任理论家,则为其增加技能
character_event = {
id = my_mod.42
title = "理论突破"
option = {
name = "继续研究"
trigger = {
FROM = {
is_theorist = yes
}
}
FROM = {
add_skill_level = 1
}
}
}
[is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor):与 is_theorist 配合可以区分"是否被雇用为顾问"与"是否具体担任理论家角色",双重校验避免逻辑漏洞。[has_advisor_role](/wiki/trigger/has_advisor_role):用于进一步确认角色拥有的顾问角色类型,与 is_theorist 组合可构建更精确的角色筛选条件。[add_trait](/wiki/effect/add_trait):确认角色为理论家后,为其赋予专属特质,是最常见的后续 effect 搭配。[remove_advisor_role](/wiki/effect/remove_advisor_role):在满足特定条件时移除理论家职位,通常以 is_theorist = yes 作为前置 limit 保护,确保不会对非理论家误操作。is_theorist 必须在 CHARACTER scope 下使用,新手容易直接写在国家 scope 的 trigger 块中,导致脚本报错或静默失效,需用 country_leader = { is_theorist = yes } 等方式先切换 scope。is_advisor 混用:is_advisor 只检查角色是否被雇用为顾问,而 is_theorist 专指理论家职位;两者并不等价,仅用 is_advisor = yes 无法保证该角色担任的是理论家职位。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_theorist is commonly used in mod scenarios that require distinguishing between advisor role types. For example, in a decision or event, you can trigger special effects (such as additional traits or upgrades) only for characters currently serving in the theorist position. In dynamic advisor systems, it can also be used to prevent duplicate logic triggering.
# Event option: if the character is currently serving as a theorist, add skill level
character_event = {
id = my_mod.42
title = "Theory Breakthrough"
option = {
name = "Continue Research"
trigger = {
FROM = {
is_theorist = yes
}
}
FROM = {
add_skill_level = 1
}
}
}
[is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor): Combined with is_theorist, it can distinguish between "whether hired as an advisor" and "whether specifically serving as a theorist", providing dual validation to avoid logic gaps.[has_advisor_role](/wiki/trigger/has_advisor_role): Used to further confirm the advisor role type that a character holds; combined with is_theorist, it constructs more precise character filtering conditions.[add_trait](/wiki/effect/add_trait): After confirming the character is a theorist, grant them exclusive traits; this is the most common subsequent effect pairing.[remove_advisor_role](/wiki/effect/remove_advisor_role): Remove the theorist position when specific conditions are met, typically using is_theorist = yes as a preceding limit guard to ensure no misoperation on non-theorist characters.is_theorist must be used within a CHARACTER scope. Beginners often write it directly in trigger blocks under country scope, causing script errors or silent failures. Use country_leader = { is_theorist = yes } and similar methods to switch scope first.is_advisor: is_advisor only checks whether a character is hired as an advisor, while is_theorist specifically refers to the theorist position; the two are not equivalent. Using only is_advisor = yes does not guarantee the character serves as a theorist.