Hands-On Usage
occupied_country_tag is commonly used in occupation law or resistance system-related mods to apply different compliance/resistance logic to specific occupied countries. For example, you might enforce stricter suppression policies for Italian-occupied territories. A typical scenario involves using this trigger in an on_state_occupation event or within the available block of a decision to identify the source country of resistance in the current state and trigger differentiated effects.
# In the available condition of a decision
available = {
FROM = {
occupied_country_tag = ITA
resistance > 25
}
}
Synergy
[resistance](/wiki/trigger/resistance): Typically used alongside occupied_country_tag to first confirm the resistance source country before checking resistance strength, preventing unintended effects from triggering on the wrong nation.
[occupation_law](/wiki/trigger/occupation_law): Using this together allows you to verify the occupier's identity first, then further check if the current occupation law meets your conditions, creating a dual-filter approach.
[set_occupation_law](/wiki/effect/set_occupation_law): After using occupied_country_tag in a trigger to confirm the target occupied country, apply this effect to dynamically switch occupation laws for states from that specific source.
[has_active_resistance](/wiki/trigger/has_active_resistance): Pair this with occupied_country_tag to ensure logic executes only when active resistance truly exists, preventing wasted performance on null checks.
Common Pitfalls
- Scope confusion:
occupied_country_tag can only be used under STATE scope. Beginners often mistakenly place it in trigger blocks under COUNTRY scope, causing script errors or silent failures. Always ensure you've entered state scope via any_state/every_state or similar constructs.
- Confusion with CONTROLLER/OWNER concepts: This trigger compares against the "occupied country generating resistance" (i.e., the original sovereign), not the current controller or owner. Misusing it to check the controlling nation's identity will produce completely inverted logic results.