Wiki

effect · add_advisor_role

Definition

  • Supported scope:COUNTRY, CHARACTER
  • Supported target:none

Description

add advisor role to character
May directly activate (aka hire) using activate = yes

Example:
add_advisor_role = {
	character = "GER_Character_Token" # optional if inside character scope
	advisor = {
		slot = air_chief
		cost = 50
		idea_token = GER_character_token_air_chief
		traits = {
			air_chief_ground_support_2
		}
		allowed = {...}
	}
	activate = yes
}

Hands-On Notes

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.

Hands-On Usage

add_advisor_role is most commonly used in mods to dynamically assign advisor positions to custom characters—for example, allowing a historical figure to "unlock" as an air force chief or political advisor after a focus or event is triggered. Combined with activate = yes, the character is hired immediately upon role assignment, eliminating the need for manual player intervention. This is well-suited for story-driven mods.

# After focus completion, add an army advisor role to a specific character and activate immediately
complete_national_focus = GER_militarize_economy
hidden_effect = {
    add_advisor_role = {
        character = GER_von_brauchitsch
        advisor = {
            slot = army_chief
            cost = 150
            idea_token = GER_von_brauchitsch_army_chief
            traits = {
                army_chief_offensive_2
            }
        }
        activate = yes
    }
}

Synergy

  • [remove_advisor_role](/wiki/effect/remove_advisor_role): Remove an old role before adding a new one to avoid slot conflicts when a character is "promoted" or changes advisor type.
  • [promote_character](/wiki/effect/promote_character): Promote a character from general to field marshal while simultaneously adding a new advisor identity, combining both for a complete character upgrade sequence.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): Check whether a character already holds the advisor role before adding it, preventing duplicate assignments that can cause script errors or logic confusion.
  • [set_can_be_fired_in_advisor_role](/wiki/effect/set_can_be_fired_in_advisor_role): Immediately set whether the newly appointed advisor character can be dismissed by the player, commonly used to lock down story-critical figures.

Common Pitfalls

  1. Forgetting the character field in COUNTRY scope: The character = ... parameter can only be omitted when inside a character scope. If called from a national-level effect block (such as a focus or event option) without specifying the character token, the script will silently fail without error, and the character will not receive any role.
  2. idea_token naming conflicts with other ideas: The idea_token value must be globally unique. If it shares a name with an existing idea, focus, or another character's token, the game will load the override or report a duplicate key warning, causing advisor traits or costs to behave unexpectedly. Always use a naming convention prefixed with the character name.