Wiki

trigger · occupation_law

Definition

  • Supported scope:STATE, COUNTRY
  • Supported target:any

Description

Checks the occupation law for an occupied country, occupied state, or the default occupation law of an occupying country.

- If THIS is a country and it's the same as the PREV country, then THIS's default law is checked.
- If THIS is a country and it's different from the PREV country, then PREV's country law for THIS is checked.
- If THIS is a state, then the occupier's state law is checked.

Example:
GER = { occupation_law = autonomous_occupation }
GER = { POL = { occupation_law = foreign_civilian_oversight } }
123 = { occupation_law = local_police_force_garrison }

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

occupation_law is commonly used in occupation policy-related decisions or national focus checks, such as verifying whether an occupying country has imposed a sufficiently lenient or strict occupation law on a specific nation to unlock or gate subsequent event chains. Typical scenarios include: triggering an event only when an occupied territory operates under a specific administrative method, or evaluating whether AI behavior trees need to adjust occupation strategy.

# Check if Germany's occupation law for Poland is set to foreign civilian oversight
GER = {
    POL = {
        occupation_law = foreign_civilian_oversight
    }
}

# In a decision's available block, check a state's occupation law
available = {
    123 = {
        occupation_law = local_police_force_garrison
    }
}

Synergy

  • [set_occupation_law](/wiki/effect/set_occupation_law): The most direct pairing—first use occupation_law to check the current occupation law status, then use set_occupation_law to switch to the target law, forming a standard "condition check → execute change" structure.
  • [set_occupation_law_where_available](/wiki/effect/set_occupation_law_where_available): Before bulk-changing occupation laws across all available states, occupation_law is often used to filter specific conditions first, preventing unintended changes to regions already meeting requirements.
  • [compliance](/wiki/trigger/compliance): Occupation law directly affects compliance growth; the two frequently appear together in limit blocks to ensure subsequent logic triggers only when both compliance and occupation law conditions are satisfied.
  • [has_active_resistance](/wiki/trigger/has_active_resistance): Resistance activity intensity is closely tied to occupation policy; combined use precisely describes compound conditions like "resistance remains active and current occupation law is too lenient."

Common Pitfalls

  1. Scope direction reversed: When writing GER = { occupation_law = ... } under a COUNTRY scope, if PREV is also GER (same country), it checks GER's default occupation law; if PREV is another country (such as POL), it checks PREV's specific occupation law toward GER—newcomers often overlook this distinction, causing conditions to never match or always evaluate true.
  2. Using on unoccupied STATEs: If a target state has no actual occupier (for example, the state is controlled by its owner nation), occupation_law cannot retrieve a valid occupation law value and the condition silently fails without error, making debugging very opaque. It is recommended to pair this with [controls_state](/wiki/trigger/controls_state) or similar checks to first confirm the state is actually under occupation.