Wiki

effect · goto_province

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Goes to stated province.

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

goto_province is commonly used in events or decisions to automatically pan the camera to an important province after trigger, enhancing player immersion and narrative guidance—for example, shifting the viewport to a landing zone when a campaign begins, or focusing on the province containing newly constructed facilities after a national focus completes. Note that it only changes camera position and does not affect any game state.

country_event = {
    id = my_mod.1
    title = my_mod.1.t
    desc = my_mod.1.d

    option = {
        name = my_mod.1.a
        # Pan camera to designated province (e.g., Normandy landing province 7038)
        goto_province = 7038
        add_war_support = 0.05
    }
}

Synergy

  • [add_war_support](/wiki/effect/add_war_support): In a campaign event's option, first pan the camera to let players see the battlefield location, then apply war support bonuses—combining narrative and mechanics seamlessly.
  • [damage_building](/wiki/effect/damage_building): When triggering bombing or destruction events, use goto_province to guide the viewport to the province containing damaged buildings, helping players intuitively grasp the effects.
  • [controls_province](/wiki/trigger/controls_province): In a trigger, check whether a province is controlled; if the condition is met, then use goto_province to pan—avoiding confusion from panning to enemy-held territory outside player view.

Common Pitfalls

  1. Confusing province ID with state ID: Beginners often mistakenly fill in the numeric ID of a state (state) here, but this command requires the finer-grained province ID, which have different numeric ranges and source files (map/definition.csv). Entering the wrong ID causes camera pan failure or errors.
  2. Invoking outside COUNTRY scope: goto_province is only valid within COUNTRY scope; if written in a sub-block of every_owned_state or similar STATE scope calls, the script fails silently and is difficult to debug.