Wiki

effect · give_resource_rights

Definition

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

Description

Gives rights to take resources from specified state.
	give_resource_rights = {
		receiver = <TAG> # accepts keyword or variable
		state = <id> # accepts keyword or variable
		resources = {<Resource Name>} # [optional] If provided, only gives rights to the prodived resources.
													If not provided gives rights to all resources in the states.
	}

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

give_resource_rights is commonly used in diplomatic and puppet state scenarios, such as when a suzerain forces a vassal to sign resource agreements, or when major powers leverage events to extract mining rights for strategic resources like oil and steel from smaller nations. The following example demonstrates Germany obtaining all resource rights to Romania (State 76) through an event:

country_event = {
    id = my_mod.1
    title = "签署资源协议"
    
    option = {
        name = "接受条件"
        # Execute within GER scope
        give_resource_rights = {
            receiver = GER
            state = 76
        }
    }
    option = {
        name = "仅转让石油开采权"
        give_resource_rights = {
            receiver = GER
            state = 76
            resources = { oil }
        }
    }
}

Synergy

  • [add_opinion_modifier](/wiki/effect/add_opinion_modifier): Resource rights grants are typically paired with diplomatic penalties or bonuses to simulate attitude shifts from the affected party.
  • [create_import](/wiki/effect/create_import): Once resource rights are in place, the beneficiary nation can establish import agreements to ensure resources translate into actual production input.
  • [controls_state](/wiki/trigger/controls_state): Validate that the granting nation actually controls the target State before execution to prevent logic errors from granting rights to uncontrolled territories.
  • [add_resource](/wiki/effect/add_resource): If the target State has zero resources, pre-inject resources with this command before granting rights; otherwise the grant becomes meaningless.

Common Pitfalls

  1. Confusing receiver with current scope: The receiver parameter specifies the country TAG that receives the resource rights, while the effect itself must execute under the scope of the nation that owns or controls the State. Newcomers often reverse these, causing the script to silently fail or trigger errors.
  2. Using on States with no owner: If the target State has no OWNER (such as unclaimed territories), the script will not error but the rights grant will not take effect. Always validate State ownership with [controls_state](/wiki/trigger/controls_state) or similar checks before execution to ensure the target State is under valid ownership.