Wiki

trigger · has_contested_owner

Definition

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

Description

Checks if a state has the specified country as a contested owner.
The trigger can be used either from a country or a state scope and accepts the other as parameter.
The trigger is localized with a localization environment containing `Country` and `State`.

### Example
The following example has the same end result and localization.

42 = { has_contested_owner = GER } GER = { has_contested_owner = 42 }

Standard scope accessors can also be used:

Assuming current scope is a state and FROM is a country scope

has_contested_owner = FROM

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

has_contested_owner is commonly used in mods involving territorial disputes or occupation systems, such as determining whether a country has contested ownership of a specific state to trigger diplomatic events or unlock certain decisions. Its bidirectional syntax—querying states from country scope or countries from state scope—allows flexible condition embedding across different script structures.

# In the available block of a decision, check whether FROM (target state) has ROOT as a contested owner
available = {
    FROM = {
        has_contested_owner = ROOT
    }
}

Synergy

  • [add_contested_owner](/wiki/effect/add_contested_owner): The effect command for adding contested ownership; typically you first establish a contested relationship using add_contested_owner, then use this trigger to verify that relationship exists, forming a complete establish→verify logic chain.
  • [remove_contested_owner](/wiki/effect/remove_contested_owner): The corresponding removal command; commonly executed only after has_contested_owner = true condition is met, preventing invalid operations on non-existent contested relationships.
  • [compliance](/wiki/trigger/compliance): In contested ownership scenarios, you often need to simultaneously check a state's compliance to determine whether actual control can be advanced; these two work together to create more granular conditions.
  • [controls_state](/wiki/trigger/controls_state): Contested ownership does not equal actual control; pairing with controls_state lets you distinguish between "nominal dispute" and "actual occupation" states, making logic more rigorous.

Common Pitfalls

  1. Scope type confusion: The trigger requires one scope to be a state and the other to be a country on both sides. Writing has_contested_owner = <another country TAG> in country scope or has_contested_owner = <another state ID> in state scope will cause the condition to never be true without errors, making it extremely difficult to debug.
  2. Mistaking it for owner or controller: Contested ownership is an independent field separate from OWNER/CONTROLLER, and only takes effect through add_contested_owner; beginners often mistakenly assume this trigger becomes true once a country controls or owns a state, but in reality it requires explicit addition to be effective.