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
}
set_capitalCOUNTRYnonemove capital to state
Example:
set_capital = {
state = 1234
remember_old_capital = no #default = yes
}
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
set_capital 常用于剧本事件或国家焦点中迁都场景,例如某国在战争中失去本土后将首都迁往海外省份,或大国完成统一后将首都迁至历史名城。配合 remember_old_capital = no 可以彻底放弃旧首都记忆,适合政权更迭类 mod。
# 国家焦点:迁都至新领土
focus = {
id = JAP_move_capital
...
completion_reward = {
set_capital = {
state = 526
remember_old_capital = no
}
}
}
[add_state_core](/wiki/effect/add_state_core):迁都前通常需要确保目标州是本国核心州,否则迁都后合法性存疑,两者常在同一 completion_reward 中连用。[add_ideas](/wiki/effect/add_ideas):迁都事件往往附带国策思潮变化(如"流亡政府"或"新都振兴"),两者搭配描述迁都的政治后果。[controls_state](/wiki/trigger/controls_state):在触发迁都 effect 前,先用此 trigger 检查目标州是否已被本国控制,避免迁都到敌占区。[country_event](/wiki/effect/country_event):迁都后触发后续剧情事件链,推进叙事。set_capital 要求目标 state 必须是本国拥有(owned)的州,仅控制(controlled)而不拥有会导致命令静默失效,首都不会发生任何变化,且不会报错,极难排查。remember_old_capital 设为 no 后反悔:该字段一旦设为 no 且存档后,旧首都信息将永久丢失,游戏无法自动恢复;若后续事件逻辑依赖"旧首都 state"做判断,将出现意料之外的结果,建议非必要保持默认值 yes。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.
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
}
}
}
[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.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.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.