Wiki

effect · set_province_controller

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

set controller for province

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_province_controller is commonly used in territorial transfers, civil war events, or scenario triggers to immediately transfer control of a specific province to a designated nation without changing its sovereignty. Typical scenarios include: when a civil war breaks out in a country, the rebel faction uses an event to instantly seize control of the province containing the capital, or in peace agreement scripts to return occupied frontline provinces to their original owners.

# Civil war event: rebels seize control of the capital province
country_event = {
    id = my_mod.1
    immediate = {
        # Scope here is the rebel nation (COUNTRY) triggering the civil war
        set_province_controller = 1234  # Enter the province ID of the target province
    }
}

Synergy

  • [controls_province](/wiki/trigger/controls_province) — Before executing the control transfer, first verify whether the province is currently controlled by a specific nation to avoid duplicate triggers or logic conflicts.
  • [declare_war_on](/wiki/effect/declare_war_on) — Immediately after declaring war, use this command to place key frontline province control with the attacking side, simulating the instant effect of blitzkrieg or surprise attacks.
  • [damage_building](/wiki/effect/damage_building) — Destroy local buildings while seizing province control to simulate battle attrition or scorched earth tactics during retreat, allowing both effects to authentically recreate battlefield realism.
  • [add_manpower](/wiki/effect/add_manpower) — Combine control transfer with manpower replenishment for the new controlling nation, commonly used in rebel or puppet regime initialization scripts.

Common Pitfalls

  1. Confusing province ID with state ID: This command accepts the numeric ID of a province rather than a state ID; beginners often enter the state ID here, causing the command to silently fail or point to the wrong tile. Carefully verify both ID systems in map/definition.csv and history/states/.
  2. Scope must be COUNTRY, not STATE: Many people habitually call this command directly within every_owned_state and other state scopes, but it only executes under COUNTRY scope. If used within a state scope, you must first jump back to country scope via OWNER/CONTROLLER or similar target switches; otherwise the command will not take effect and will not produce an error.