Wiki

effect · remove_exile_tag

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

remove exile tag from scope unit leader. remove_exile_tag = 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

When a character has been tagged with the exile tag due to their exile status, if the player uses an event or decision to make the character "return to their homeland" or "clear their exile status," you can use this effect to remove their exile tag and restore them to a normal military commander. For example, in mods related to exile governments, after a country undergoes restoration, you may need to clear the exile tags of old exiled generals:

# In an option block of a certain restoration event
character:GER_some_exiled_general = {
    remove_exile_tag = yes
}

Synergy

  • [is_exiled_leader](/wiki/trigger/is_exiled_leader): Use this trigger to verify that the character is actually in an exiled state before executing the removal, avoiding ineffective operations on non-exiled characters.
  • [is_exiled_leader_from](/wiki/trigger/is_exiled_leader_from): Further confirm which country the character was exiled from, ensuring the logic is correct before executing the removal.
  • [set_nationality](/wiki/effect/set_nationality): After removing the exile tag, you typically need to synchronize the character's nationality change to formally assign them to the target country.
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): After clearing the exile status, you can add new traits to the character (such as custom traits like "Returned General"), reflecting their identity change both narratively and functionally.

Common Pitfalls

  1. Scope errors: This effect must be executed within the CHARACTER scope to take effect. Writing it directly in a country scope (such as GER = { remove_exile_tag = yes }) will cause script errors or silent failures. You need to properly enter the character scope using methods like character:TAG_leader_name = { ... } or every_unit_leader.
  2. Executing without checking exile status: Running this command on a character that is not actually in an exiled state typically won't cause a crash, but it can easily mask logical errors. It is recommended to always pair this with a prior check using [is_exiled_leader](/wiki/trigger/is_exiled_leader) to keep script logic clear and maintainable.