trigger · is_hired_as_advisor
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
is_hired_as_advisor = yes/no - Checks if the current character has at least one advisor role for which they are hired
is_hired_as_advisorCHARACTERnoneis_hired_as_advisor = yes/no - Checks if the current character has at least one advisor role for which they are hired
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_hired_as_advisor 常用于顾问相关事件或决策中,检测某角色当前是否处于"在职顾问"状态,从而决定是否触发解雇、升职或特殊剧情。例如在 mod 中想给在职顾问额外加一条 trait,或在国家决策的 available 块里限定只有正在被雇用的顾问才能被选择执行某任务:
# 示例:仅当该角色作为顾问被雇用时,才允许触发后续效果
some_character = {
limit = {
is_hired_as_advisor = yes
}
add_trait = { token = experienced_advisor }
}
[has_advisor_role](/wiki/trigger/has_advisor_role) — 配合使用可以先判断角色拥有某个顾问职位定义,再用 is_hired_as_advisor 进一步确认该职位是否真正处于在职状态,两者形成"有职位且在岗"的双重过滤。[advisor_can_be_fired](/wiki/trigger/advisor_can_be_fired) — 常一起出现在解雇流程的条件判断里,先确认角色已被雇用,再检查该顾问当前是否允许被解雇,避免对未在职角色执行多余的判断。[remove_advisor_role](/wiki/effect/remove_advisor_role) — 在 effect 块中配合使用:先用 is_hired_as_advisor = yes 在 limit 里把关,确认在职后再安全地移除其顾问职位,防止对未在职角色执行移除导致脚本报错或行为异常。[set_can_be_fired_in_advisor_role](/wiki/effect/set_can_be_fired_in_advisor_role) — 当需要动态锁定某顾问不可解雇时,通常先用 is_hired_as_advisor = yes 确认其在职身份,再通过此 effect 修改其可解雇属性,逻辑更严谨。is_advisor 混淆:is_advisor 只检查角色是否拥有顾问职位定义(即有没有被配置为顾问),而 is_hired_as_advisor 检查的是该角色当前是否被某国实际雇用上岗;未区分这两者会导致在角色尚未被任何国家聘用时也误判为"在职"。= { } 包裹角色并切换 scope 后再调用。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_hired_as_advisor is commonly used in advisor-related events or decisions to check whether a character is currently in "employed advisor" status, thereby determining whether to trigger dismissal, promotion, or special storylines. For example, in a mod where you want to add an extra trait to an employed advisor, or in the available block of a country decision to restrict certain tasks to only advisors currently being hired:
# Example: Only allow subsequent effects to trigger when the character is hired as an advisor
some_character = {
limit = {
is_hired_as_advisor = yes
}
add_trait = { token = experienced_advisor }
}
[has_advisor_role](/wiki/trigger/has_advisor_role) — Use together to first check whether a character possesses a certain advisor role definition, then use is_hired_as_advisor to further confirm whether that role is truly in active service, forming a dual filter of "has role and on duty."[advisor_can_be_fired](/wiki/trigger/advisor_can_be_fired) — Often appears together in conditional checks within dismissal workflows, first confirming the character has been hired, then checking whether the advisor is currently allowed to be fired, avoiding redundant checks on characters not in service.[remove_advisor_role](/wiki/effect/remove_advisor_role) — Use together in effect blocks: first gate-check with is_hired_as_advisor = yes in the limit, confirm active status, then safely remove the advisor role, preventing script errors or abnormal behavior from attempting removal on inactive characters.[set_can_be_fired_in_advisor_role](/wiki/effect/set_can_be_fired_in_advisor_role) — When needing to dynamically lock an advisor as non-dismissible, typically first use is_hired_as_advisor = yes to confirm active status, then modify the dismissal attribute through this effect for more rigorous logic.is_advisor: is_advisor only checks whether a character possesses an advisor role definition (whether they are configured as an advisor), while is_hired_as_advisor checks whether the character is currently actually employed by a country; failing to distinguish these two causes false positives when a character has not yet been hired by any nation.= { } and switch scope before invoking the trigger.