Hands-On Usage
set_nationality is commonly used in narrative mods involving defections, exile governments, or character transfers, moving a character (advisor, general, intelligence officer, etc.) from one country to another. For example, in a WWII exile government mod, after France's surrender, de Gaulle can be transferred to Free France:
FRA = {
degaulle_character = {
set_nationality = FFL
}
}
Synergy
[add_country_leader_role](/wiki/effect/add_country_leader_role): After a character changes nationality, you must reassign a leader role in the new country; otherwise the character belongs to the new nation but will not appear in any position.
[remove_advisor_role](/wiki/effect/remove_advisor_role): Remove the advisor role from the original country before calling set_nationality to prevent leaving behind a "ghost" advisor slot in the source nation.
[add_corps_commander_role](/wiki/effect/add_corps_commander_role): If an intelligence officer or advisor is to serve as a general after transferring, you must re-add the commander role within the new scope.
[has_character](/wiki/trigger/has_character): Verify the target character actually exists in the source country before executing the transfer, preventing script errors or silent failures due to missing characters.
Common Pitfalls
- Incorrect Scope:
set_nationality must be called within the character's own scope (i.e., enter the character scope first, then write the command), not directly under a country scope—omitting the character scope layer is the most common syntax error.
- Confusion with
add_nationality: add_nationality only adds available nationality disguises for intelligence officers and does not actually change the character's home country; set_nationality is the true "change of nationality" effect. These serve completely different purposes and should never be used interchangeably.