Character Interaction

Assign Familial Governor

assign_familial_governor

It is expected for all the Hafsid princes to be assigned a governorship in one of the cities of the realm. Such governors tend to have a high degree of autonomy, but nevertheless help keep 'Ifrīqiya in the hands of the family.

Potential
Target
Choose the Character (Character)
    • Is Alive
    • The Character is an ancestor of our Ruler
      ActorRuler
      DynastyEvaluated scopeDynasty: This
    • Is Loyal
    ↗
    • Is NOT ruler
    • Is > 15 Years Old
    • Is male
    ↗
Target
Click to select a city that will become the Capital of the government
↗
Exact conditions

  • If
    • Target capital exists
    • Recipient exists
    Then
    • create_familial_governor_in_location_effect: Location: Target capital · Character: Recipient · Country: Actor
      Target capital
      • Not shown in the game's tooltipcache_distance_map: Country: Actor
        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: Target capital · Set new ruler: Recipient
        Make subject of
      • Not shown in the game's tooltipTarget capital
        Floodfill locationswhere
        • Local variable map (preferred_city): Target capital
        • OwnerThis: NotTarget country
        Will be owned by Target country
      ↗
    • Actor
      Remove variable: tun_governorship_expected
  • A Familial Governor is created in target Location ruled by Recipient, and all Locations that are closer to the target City than to another one will be transferred to the governor
Exact script

Requires 1

Mentions 1

Scripting 6

Removes 1

Uses 4

Scripted Effects
Scripted Triggers

AI weighting 1

on_own_nation = yes
message = no
potential = {
scope:actor = {
}
}

© 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