Scripted Effect

create_familial_governor_in_location_effect

$location$
  • Not shown in the game's tooltipcache_distance_map: Country: country
    Country temp scope
    • Every owned non rural locationwhere
      Add to list: cities
    • Every owned location
      • Add to local variable map
        • Name: preferred_city
        • Key: This
        • Value: Country temp scopeCapital
      • Add to local variable map
        • Name: preferred_city_score
        • Key: This
        • Value: distance_to(scope:country_temp_scope.capital)
      • Every in list
        • List: cities
        • If
          Number one › distance_to(scope:number_two) < local_variable_map(preferred_city_score|scope:number_one)
          Then
          • Add to local variable map
            • Name: preferred_city
            • Key: Number one
            • Value: Number two
          • Add to local variable map
            • Name: preferred_city_score
            • Key: Number one
            • Value: scope:number_one.distance_to(scope:number_two)
    ↗
  • Create country from location: Set capital: location · Set new ruler: character
    Make subject of
  • Not shown in the game's tooltip$location$
    Floodfill locationswhere
    • Local variable map (preferred_city): location
    • OwnerThis: NotTarget country
    Will be owned by Target country
Exact script

Script that calls it fills these in, as each caller in Connections shows.

  • $location$
  • $country$
  • $character$

Requires 1

Grants 1

Used by 2

Events
  • Demand of a Relativecharacter = scope:target_character · country = root · location = scope:target_locationOption 1
Character Interactions
Scripting 2

Uses 2

© 2026 Soft Santa Cruz, S.L.U. All rights reserved. Unofficial fan project, not affiliated with Paradox Interactive. Game content © Paradox Interactive. · About · Privacy · Legal notice