Wiki

effect · set_capital

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

move capital to state
Example:
set_capital = {
	state = 1234
	remember_old_capital = no #default = 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

set_capital is commonly used in scripted events or national focuses for capital relocation scenarios—for example, when a nation loses its homeland during war and relocates the capital to an overseas province, or when a major power completes unification and moves the capital to a historically significant city. Pairing it with remember_old_capital = no allows complete erasure of the old capital from memory, making it ideal for regime-change mods.

# National focus: relocate capital to new territory
focus = {
    id = JAP_move_capital
    ...
    completion_reward = {
        set_capital = {
            state = 526
            remember_old_capital = no
        }
    }
}

Synergy

  • [add_state_core](/wiki/effect/add_state_core): Before relocating the capital, it is typically necessary to ensure the target state is a core of your nation; otherwise, the legitimacy of the relocation becomes questionable. These two are often used together in the same completion_reward.
  • [add_ideas](/wiki/effect/add_ideas): Capital relocation events often come with shifts in national policy ideology (such as "Government in Exile" or "Capital Revitalization"), and the two work together to describe the political consequences of the move.
  • [controls_state](/wiki/trigger/controls_state): Before triggering the set_capital effect, use this trigger to verify that the target state is already controlled by your nation, avoiding relocation to enemy-held territory.
  • [country_event](/wiki/effect/country_event): Trigger subsequent story event chains after capital relocation to advance the narrative.

Common Pitfalls

  1. Target state not owned by your nation: set_capital requires the target state to be owned by your nation. Merely controlling a state without owning it will cause the command to silently fail—the capital will not change and no error will be reported, making it extremely difficult to debug.
  2. Regretting setting remember_old_capital to no: Once this field is set to no and the save file is created, the old capital information is permanently lost and cannot be automatically recovered by the game. If subsequent event logic depends on checking the "old capital state," unexpected results will occur. It is recommended to keep the default value yes unless absolutely necessary.