Hands-On Usage
This effect is commonly used to design "non-dismissible" key advisor roles, such as a political advisor crucial to a nation's fate in story-driven mods, or historical figures that players are forced to hire upon completing a specific focus and are not permitted to fire. When value = no, the advisor becomes locked upon appointment, making it ideal for pairing with story triggers to reinforce narrative tension.
# After focus completion, lock an advisor to prevent dismissal
focus = {
id = appoint_iron_chancellor
...
completion_reward = {
activate_advisor = {
character = GER_otto_von_bismarck
slot = political_advisor
}
set_can_be_fired_in_advisor_role = {
character = GER_otto_von_bismarck
slot = political_advisor
value = no
}
}
}
Synergy
[activate_advisor](/wiki/effect/activate_advisor): Activate the advisor first, then invoke this effect to set the lock flag. These two are nearly inseparable partners, and their order cannot be reversed.
[add_advisor_role](/wiki/effect/add_advisor_role): If the advisor role is dynamically added, use this effect first to attach the advisor role, then use this effect to lock it, ensuring the slot field already exists.
[deactivate_advisor](/wiki/effect/deactivate_advisor): Once certain unlock conditions are met, you can use this effect to change value back to yes, then call this effect to dismiss the advisor, enabling "conditional dismissal" with bidirectional control.
[advisor_can_be_fired](/wiki/trigger/advisor_can_be_fired): Used to detect whether the current advisor is in a dismissible state. You can make decisions based on if/else logic before deciding whether to invoke this effect to modify the flag.
Common Pitfalls
- Forgetting to specify
slot causes script errors or unexpected behavior: When a character has multiple advisor roles simultaneously (such as being both a political_advisor and another advisor type), the slot field is mandatory. Omitting it prevents the game from determining which role to target, resulting in silent failure at best or errors at worst.
- Invoking this effect when the advisor is not hired has no effect: This effect modifies flags on "active advisor roles". If the target character has not been appointed via
activate_advisor, the setting will not be retained. Always ensure the advisor is in an activated state when calling this effect.