Scripted Effect
create_familial_governor_in_location_effect
$location$- Not shown in the game's tooltipcache_distance_map: Country: countryCountry temp scope↗
- Every owned non rural locationwhereAdd to list: cities
- Every owned location
- Add to local variable map
- Name:
preferred_city - Key: This
- Value: Country temp scopeCapital
- Name:
- Add to local variable map
- Name:
preferred_city_score - Key: This
- Value:
distance_to(scope:country_temp_scope.capital)
- Name:
- Every in list
- List: cities
- IfNumber 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
- Name:
- Add to local variable map
- Name:
preferred_city_score - Key: Number one
- Value:
scope:number_one.distance_to(scope:number_two)
- Name:
- Add to local variable map
- Add to local variable map
- Every owned non rural locationwhere
- Create country from location: Set capital: location · Set new ruler: characterMake subject of
- Target: country
- Type:
Familial Governor
add_hafsid_governor_contentCountry: country - 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 - Local variable map (
Exact script
Script that calls it fills these in, as each caller in Connections shows.
$location$$country$$character$
Requires 1
Bijaya$location$
Grants 1
Familial Governor$location$
Used by 2
Events
Demand of a Relativecharacter = scope:target_character · country = root · location = scope:target_locationOption 1
Character Interactions
- Assign Familial Governorcharacter = scope:recipient · country = scope:actor · location = scope:target_capitalEffect
Scripting 2
Uses 2
- add_hafsid_governor_contentcountry = $country$$location$
- cache_distance_mapcountry = $country$$location$
