Hands-On Usage
has_resources_rights is commonly used to verify whether a country holds extraction rights to resources in a specific state. Typical scenarios include: checking if a puppet state continues to supply resources to its overlord, or validating whether a resource agreement is active before triggering subsequent effects in events/decisions. The following example checks in COUNTRY scope whether Germany holds steel and oil rights in state 60:
# Usage in COUNTRY scope (from Germany's perspective)
trigger = {
has_resources_rights = {
state = 60
receiver = GER
resources = { steel oil }
}
}
Synergy
[resource_count_trigger](/wiki/trigger/resource_count_trigger): Use resource_count_trigger first to confirm the target state actually contains the resource (avoiding the pitfall where "no resource in state always returns false"), then use has_resources_rights to check rights ownership. These two form a safe double-gate check.
[add_resource](/wiki/effect/add_resource): When rights verification returns false, you can use add_resource in an else branch to adjust resource quantities in the state, indirectly affecting the preconditions for subsequent rights logic.
[controls_state](/wiki/trigger/controls_state): When used together with controls_state, you can distinguish between "physical occupation" and "resource rights"—two different forms of control. This prevents the logical error of treating occupation as equivalent to holding extraction rights.
[create_import](/wiki/effect/create_import): After confirming resource rights exist, pair it with create_import to establish a formal import agreement, forming a complete "verify rights → establish trade" workflow.
Common Pitfalls
- Overlooking the "state with no resources always returns false" premise: If the target state's corresponding resource quantity is 0, this trigger will never return true regardless of conditions. Beginners often mistake this for a syntax error and repeatedly debug script logic. Always use
resource_count_trigger for preliminary validation first.
- Mixing STATE/COUNTRY scope parameters: In STATE scope, you don't need to fill
state; in COUNTRY scope, you don't need to fill receiver. However, if both parameters are omitted simultaneously, the game cannot locate the target and the condition silently fails. Always retain the appropriate locating parameters based on your current scope.