Hands-On Usage
set_state_province_controller is commonly used in events or decisions to transfer control of specific provinces within a state to a designated country without changing the entire state's control, making it ideal for handling civil war splits, occupation line resets, or special campaign scripts. Compared to set_state_controller_to, its advantage lies in the ability to filter each province's previous controller through a limit block, enabling fine-grained control.
# Within a state scope: transfer all provinces controlled by GER in that state to ITA
set_state_province_controller = {
controller = ITA
limit = {
is_controlled_by = GER
}
}
Synergy
[is_controlled_by](/wiki/trigger/is_controlled_by): Used within the limit block to filter the current province's previous controller; this is the most direct synergistic trigger, ensuring only provinces meeting the condition undergo control transfer.
[set_state_controller_to](/wiki/effect/set_state_controller_to): Used in conjunction when resetting the entire state's controller is needed; both have clear divisions of labor—the former handles province-level details, the latter handles state-level ownership.
[set_occupation_law](/wiki/effect/set_occupation_law): After control transfer, it is often necessary to immediately set occupation laws to prevent the new controller from inheriting illogical occupation policies from the previous owner.
[add_resistance](/wiki/effect/add_resistance): After taking over provinces, resistance may need to be imposed on newly occupied areas; combined use can restore realistic occupation scenarios.
Common Pitfalls
- Overlooking the consequences of an empty
limit block: If the limit block is left empty, the script still executes legally but will unconditionally transfer control of all provinces in that state, easily causing unintended changes to provinces that should remain unaffected. It is recommended to always specify clear conditions such as is_controlled_by or others within the limit.
- Confusing province-level control with state-level ownership: This effect only changes a province's controller, it does not modify the state's owner. Newcomers often mistakenly believe that after execution the target country has "occupied" the state, but ownership actually remains with the original country. If simultaneous transfer of ownership is needed, an additional call to
set_state_owner_to is required.