trigger · has_advisor_role
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
has_advisor_role = 'character_slot_name' - Checks if the character in scope has an advisor role for the given slot
has_advisor_roleCHARACTERnonehas_advisor_role = 'character_slot_name' - Checks if the character in scope has an advisor role for the given slot
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_advisor_role is commonly used in advisor recruitment or event scripts to check whether a character has been assigned a specific advisor role definition for a particular advisor slot, allowing you to decide whether to display certain options or trigger specific event branches. For example, in DLC character pack mods, you can use it to prevent adding duplicate advisor roles of the same type to the same character:
# In the available block of a focus or event option
available = {
FROM = { # FROM points to the target character (CHARACTER scope)
NOT = {
has_advisor_role = political_advisor
}
}
}
[is_advisor](/wiki/trigger/is_advisor) — First use is_advisor to determine whether a character is currently employed, then combine with has_advisor_role to confirm which slot type they belong to. Using both together allows you to precisely identify characters "currently serving as an advisor in a specific slot."[add_advisor_role](/wiki/effect/add_advisor_role) — Before adding a new advisor role to a character in an effect block, first use has_advisor_role to check existence and prevent duplicate definitions of the same slot, which could cause script errors or logic conflicts.[remove_advisor_role](/wiki/effect/remove_advisor_role) — Before removing an advisor role, the prerequisite is usually to confirm that the character actually possesses the corresponding role definition. Using has_advisor_role as a limit/trigger guard prevents invalid removals of non-existent roles.[is_hired_as_advisor](/wiki/trigger/is_hired_as_advisor) — has_advisor_role only checks which slots a character's definition includes, while is_hired_as_advisor checks whether they are actually employed. Combining both allows you to fully distinguish between "qualified but not deployed" and "currently in service" states.has_advisor_role only checks whether the corresponding advisor role is registered in a character's profile for a given slot. It will return true even if that character is not employed by any country, so it cannot be used as a substitute for is_hired_as_advisor to determine whether an advisor is actively serving.any_character, every_character, or a named character variable before calling this trigger.