effect · add_state_modifier
Definition
- Supported scope:
STATE - Supported target:
none
Description
Adds a modifier to the state
Example: add_state_modifier = { modifier = { local_non_core_manpower = 0.2 } }
add_state_modifierSTATEnoneAdds a modifier to the state
Example: add_state_modifier = { modifier = { local_non_core_manpower = 0.2 } }
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.
add_state_modifier is commonly used in occupation, post-war reconstruction, or special event scenarios to dynamically apply localized bonuses to a state. Examples include granting increased manpower output to non-core states in colonial management mods, or applying temporary industrial penalties to a location during war events. Note that it differs from add_dynamic_modifier—the modifier block added is a static effect written once and for all, not dynamically calculated based on variables.
state_event = { id = my_mod.1 # ... option = { name = my_mod.1.a add_state_modifier = { modifier = { local_non_core_manpower = 0.2 local_manpower = 0.1 } } } }
[has_state_flag](/wiki/trigger/has_state_flag): Use this trigger first to check if the state has already been marked with a specific flag, then decide whether to apply additional modifiers to avoid duplicate stacking.[set_state_flag](/wiki/effect/set_state_flag): Set a flag immediately after adding the modifier to serve as a "applied" anti-duplication safeguard.[is_controlled_by](/wiki/trigger/is_controlled_by): Commonly used as a prerequisite condition to ensure bonuses are only granted when the state is actually controlled by a specific country, aligning with realistic battlefield logic.[set_state_category](/wiki/effect/set_state_category): Use in conjunction to handle state upgrade events—first change the state category/size, then stack corresponding production modifiers to achieve a complete "development" workflow.add_state_modifier must execute under the STATE scope. If called directly within a COUNTRY scope without entering state scope via every_neighbor_state or similar, the script silently fails without error reporting—a common oversight for newcomers.remove_state_modifier. Once added, it cannot be reverted through script. If reversible state modifiers are needed, use [add_dynamic_modifier](/wiki/effect/add_dynamic_modifier) paired with [remove_dynamic_modifier](/wiki/effect/remove_dynamic_modifier) instead to implement complete lifecycle management.