diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt new file mode 100644 index 00000000..8ed8534a --- /dev/null +++ b/common/governments/00_government_types.txt @@ -0,0 +1,401 @@ +### Brief: feudal_government +# +# This is referenced in code +# +feudal_government = { + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = yes + royal_court = yes + legitimacy = yes + } + + fallback = 1 + + primary_holding = castle_holding + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract = { + feudal_government_taxes + feudal_government_levies + special_contract + religious_rights + fortification_rights + coinage_rights + succession_rights + war_declaration_rights + council_rights + title_revocation_rights + jizya_special_rights + } + + ai = { + use_legends = yes + } + + flag = may_elevate_co_monarch + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_feudal + color = hsv{ 0.67 1.00 0.78 } +} + +republic_government = { + primary_holding = city_holding + valid_holdings = { castle_holding } + required_county_holdings = { city_holding castle_holding church_holding } + + government_rules = { + inherit_from_dynastic_government = no + } + + ai = { + arrange_marriage = no + use_goals = no + use_scripted_guis = no + perform_religious_reformation = no + use_legends = no + } + + vassal_contract = { republic_government_obligations } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_republic + color = hsv{ 0.00 1.00 0.98 } +} + +### Brief: theocracy_government +# Head of faith will always get this if possible +# +# This is referenced in code +# +theocracy_government = { + government_rules = { + religious = yes + inherit_from_dynastic_government = no + } + + primary_holding = church_holding + valid_holdings = { castle_holding } + required_county_holdings = { church_holding castle_holding city_holding } + + ai = { + use_legends = no + } + + can_get_government = { + NOT = { + faith = { + has_doctrine = doctrine_theocracy_lay_clergy + } + } + } + + vassal_contract = { theocracy_government_obligations } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_theocracy + color = hsv{ 0.00 0.00 0.78 } +} + +### Brief: clan_government +# This is referenced in code +# +clan_government = { + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + royal_court = yes + legitimacy = yes + dynasty_named_realms = yes + } + + primary_holding = castle_holding + primary_heritages = { heritage_arabic heritage_iranian heritage_turkic } + + fallback = 2 + + preferred_religions = { islam_religion } + + valid_holdings = { castle_holding } + required_county_holdings = { castle_holding city_holding church_holding } + always_use_patronym = yes + + house_unity = clan_house_unity + tax_slot_type = clan_tax_slot + + vassal_contract = { + clan_tax_collector_obligations + special_contract + religious_rights + war_declaration_rights + council_rights + title_revocation_rights + marriage_favor_rights + } + + ai = { + use_legends = yes + } + + opinion_of_liege = { + scope:vassal = { + if = { + limit = { + NOT = { + is_allied_to = scope:liege + } + } + if = { + limit = { + is_powerful_vassal = yes + } + value = clan_powerful_vassal_no_alliance_opinion_penalty_value + } + else = { + value = clan_vassal_no_alliance_opinion_penalty_value + } + } + } + } + opinion_of_liege_desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:vassal = { + NOT = { + is_allied_to = scope:liege + } + is_powerful_vassal = yes + } + } + desc = "GOVERNMENT_CLAN_NOT_ALLIED_POWERFUL" + } + triggered_desc = { + trigger = { + scope:vassal = { + NOT = { + is_allied_to = scope:liege + } + is_powerful_vassal = no + } + } + desc = "GOVERNMENT_CLAN_NOT_ALLIED" + } + } + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_clan + flag = may_appoint_viziers + color = hsv{ 0.39 0.93 0.54 } +} + +tribal_government = { + government_rules = { + rulers_should_have_dynasty = yes + regiments_prestige_as_gold = yes + royal_court = yes + legitimacy = yes + } + + supply_limit_mult_for_others = -0.5 + primary_holding = tribal_holding + required_county_holdings = { tribal_holding } + + valid_holdings = { castle_holding } + + prestige_opinion_override = { -10 0 3 5 10 20 } + always_use_patronym = yes + affected_by_development = no + + vassal_contract = { tribal_government_obligations } + + ai = { + use_legends = yes + } + + character_modifier = { + title_creation_cost_mult = -0.5 + army_maintenance_mult = -0.5 + + feudal_government_vassal_opinion = -20 + clan_government_vassal_opinion = -20 + republic_government_vassal_opinion = -20 + + character_travel_safety = 10 + + ai_war_chance = 0.25 + monthly_prestige = 0.2 + } + + flag = government_can_raid_rule + flag = may_elevate_co_monarch + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_tribal + color = hsv{ 0.02 0.75 0.36 } +} + +### Brief: mercenary_government +# Mercenary will always get this +# +# This is referenced in code +# +mercenary_government = { + government_rules = { + court_generate_spouses = no + council = no + inherit_from_dynastic_government = no + } + + court_generate_commanders = 5 + + ai = { + arrange_marriage = no + use_goals = no + use_scripted_guis = no + perform_religious_reformation = no + use_legends = no + } + + flag = cannot_be_vassal_or_liege + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_mercenary + color = hsv{ 0.00 0.00 0.66 } +} + +### Brief: holy_order_government +# Holy order will always get this +# +# This is referenced in code +# +holy_order_government = { + government_rules = { + council = no + court_generate_spouses = no + inherit_from_dynastic_government = no + } + + court_generate_commanders = 5 + + ai = { + arrange_marriage = no + use_goals = no + use_scripted_guis = no + perform_religious_reformation = no + use_legends = no + } + + valid_holdings = { castle_holding city_holding } + + flag = cannot_be_vassal_or_liege + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_holy_order + color = hsv{ 0.00 0.00 0.66 } +} + +administrative_government = { + government_rules = { + create_cadet_branches = yes + rulers_should_have_dynasty = yes + dynasty_named_realms = no + royal_court = yes + #administrative = yes + landless_playable = yes + legitimacy = yes + #state_faith = yes + use_as_base_on_landed = yes + use_as_base_on_rank_up = yes + #inherit_from_dynastic_government = no + } + + domicile_type = estate + + fallback = 3 + + primary_holding = castle_holding + valid_holdings = { city_holding } + required_county_holdings = { castle_holding city_holding church_holding } + + vassal_contract = { + administrative_obligations + administrative_themes + } + + character_modifier = { + levy_size = -0.5 + feudal_government_tax_contribution_mult = -0.5 + feudal_government_levy_contribution_mult = -0.5 + clan_government_tax_contribution_mult = -0.5 + clan_government_levy_contribution_mult = -0.5 + men_at_arms_cap = -2 + men_at_arms_limit = -2 + knight_limit = -5 + vassal_limit = 100 + active_accolades = -1 + title_creation_cost_mult = -0.5 + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = government_is_administrative + + # These flags only exist for loc and in-game descriptions + flag = government_has_influence + flag = government_has_title_men_at_arms + flag = government_has_powerful_families + color = { 72 6 92 } +} + +landless_adventurer_government = { + government_rules = { + court_generate_spouses = no + council = no + create_cadet_branches = yes + rulers_should_have_dynasty = yes + landless_playable = yes + conditional_maa_refill = yes + use_title_tier_modifiers = no + mercenary = yes + allow_out_of_realm_inheritance = yes + use_as_base_on_landed = yes + } + + domicile_type = camp + court_generate_commanders = no + + can_get_government = { + any_held_title = { + tier = tier_duchy + is_landless_type_title = yes + } + } + + valid_holdings = { tribal_holding church_holding castle_holding city_holding } + + character_modifier = { + active_accolades = -100 + knight_limit = 2 + men_at_arms_cap = -3 + men_at_arms_limit = -2 + character_travel_speed = 20 + siege_weapon_siege_value_mult = -0.5 + mercenary_hire_cost_mult = 1 + short_reign_duration_mult = -5 + long_reign_bonus_mult = -1 + domicile_travel_speed = -0.75 + monthly_wanderer_lifestyle_xp_gain_mult = 0.15 + } + + ai = { + use_goals = no + use_scripted_guis = no + perform_religious_reformation = no + use_legends = no + } + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flag = cannot_be_vassal_or_liege + flag = adult_rulers_only + flag = government_is_landless_adventurer + color = hsv{ 0.00 0.00 0.66 } +} diff --git a/common/governments/_governments.info b/common/governments/_governments.info new file mode 100644 index 00000000..01aeff9d --- /dev/null +++ b/common/governments/_governments.info @@ -0,0 +1,319 @@ +my_government = { + + ### brief: government_rules ( enum bitmask container ) + # Properties of a government type that referenced in code and also + # can be tested by government_allows/disallows triggers. + # The example value is the default assigned value for the flag. + # All of these are referenced in code. + # + # Note: these are also supported outside of this data structure for + # the duration of Roads to Power, but this functionality is + # deprecated. + # + government_rules = { + + ### brief: create_cadet_branches ( bool ) + # Should rulers be able to create cadet branches + # + create_cadet_branches = no + + ### brief: religious ( bool ) + # Should rulers be considered clergy + # + religious = no + + ### brief: court_generate_spouses ( bool ) + # Should new realm get suitable spouses as courtiers + # + court_generate_spouses = yes + + ### brief: council ( bool ) + # The council is available for this ruler + # + council = yes + + ### brief: rulers_should_have_dynasty ( bool ) + # Rulers of this government type generate a dynasty + # + rulers_should_have_dynasty = no + + ### brief: regiments_prestige_as_gold ( bool ) + # Is this govenmnet type using prestige to buy and reinforce + # MaA Regiments? ( mainteance still costs gold ). + # + regiments_prestige_as_gold = no + + ### brief: dynasty_named_realms ( bool ) + # Allow using dynasty name as realm name + # + dynasty_named_realms = no + + ### brief: royal_court ( bool ) + # Should this government allow having a royal court if of the + # correct tier from NRoyalCourt::MIN_ROYAL_COURT_TIER + # + royal_court = no + + ### brief: legitimacy ( bool ) + # Rulers can have legitimacy if there's one valid for them + # + legitimacy = yes + + ### brief: administrative ( bool ) + # Rule control several admin government mechanics: + # - Top liege can have landless vassal who are house heads of + # noble families. + # - Allow hiring and usage of MaA that belong to a title + # + # Requires the dlc_flag admin_gov + # + administrative = no + + ### brief: landless_playable ( bool ) + # Allow rulers be playable even when they don't have any county + # or barony. + # + # Requires the dlc_flag landless_playable + # + landless_playable = no + + ### brief: use_as_base_on_landed ( bool ) + # Switch to this government type when obtaining your first title (becoming landed) if the old holder of the title + # was this government type + # + use_as_base_on_landed = no + + ### brief: use_as_base_on_rank_up ( bool ) + # Switch to this government type when independent ruler gets higher tier top tier title from + # independent ruler with this government type + # + use_as_base_on_rank_up = no + + ### brief: conditional_maa_refill ( bool ) + # Maa won't normally reinforce, unless they meet specific + # condition in MaA type trigger. Make sure only a very small + # number of rulers use this option, because it can negatively + # affect performance. Rulers with this government flag also + # do not pay upkeep for their MAAs. + # + conditional_maa_refill = no + + ### brief: mercenary ( bool ) + # Can unlanded rulers with this government type offer + # themselves up as mercenaries for landed rulers that are at + # war? The mercenary company government type is explicitly NOT + # using this rule, as it has separate handling. + # + # Note: this is not the same as the government flag + # government_is_mercenary, which is referring specifically to + # the mercenary company government type. + # + mercenary = no + + ### brief: use_title_tier_modifiers ( bool ) + # Enable passive prestige gain from held titles and title tier modifiers + # Default is yes. + use_title_tier_modifiers = yes + + ### brief: inherit_from_dynastic_government ( bool ) + # All governments are split in 2 groups - strong dynastic and non-dynastic ones + # Rulers from different dynastic governments can freely inherit from other dynastic governments + # Rulers from non-dynastic governemnt can't inherit from a dynastic one + # Many non-dynastic governments are unplayable, so it prevents game over + # Other non-dynastic governments are considered more advanced, and this prevents inferior + # dynastic governments from stealing land and non-dynastic vassals via inheritance + # Default is yes. + inherit_from_dynastic_government = yes + } + + ### brief: always_use_patronym ( bool ) + # Patronyms will display for characters if either their Culture or + # Government has this. Default is no. + # + always_use_patronym = no + + ### brief: affected_by_development ( bool ) + # Are the counties with owners with this government type affected + # by development. + # + affected_by_development = yes + + ### brief: fallback ( integer ) + # At least one government should be scripted as fallback, fallback + # governments will be selected in order of priority (1 is selected + # over 2), used when lacking other selection and when populating + # the map with holdings but no county holder exists. This value + # will define this government's priority as a fallback when other + # government types are invalid. + # + fallback = 0 + + ### brief: can_get_government ( trigger ) + # Trigger in character scope; checked when landed to see if it is + # an appropriate government. If failed, won't get this government + # (fallback will be used even if this fails if no other government + # is valid) + # + # Supported scopes: + # root: ( Character ) + # Character being evaluated for the government type + # + can_get_government = { ... } + + ### brief: primary_holding ( database key ) + # What is the primary holding type of this government type? Key is + # mapped to the holdings database: common/holdings/ + # + primary_holding = castle_holding + + ### brief: valid_holdings ( array of database keys ) + # Holdings that can be held directly by rulers of this government + # type. The primary holding is always valid. Keys are mapped to the + # holdings database: common/holdings/ + # + valid_holdings = { church_holding } + + ### brief: required_county_holdings ( array of database keys ) + # Which holdings must be present in a county before more of an + # existing type or others can be built. Keys are mapped to the + # holdings database: common/holdings/ + # + required_county_holdings = { castle_holding city_holding } + + ### brief: primary_heritages ( array of database keys ) + # A list of heritages for which this government type is valid and + # preferred. If both primary_cultures and primary_heritages are + # empty, there are no cultural restrictions or preferences. Keys + # are mapped to all entries within common/culture/pillars with the + # heritage type. + # + primary_heritages = { ... } + + ### brief: preferred_religions ( array of database keys ) + # A list of religions for which this government type is preferred. + # Keys are mapped to common/religion/religions + # + preferred_religions = { ... } + + ### brief: court_generate_commanders ( integer / bool ) + # Should commanders be generated in courts of this government? Can + # use a multiplier to the default number. + # yes = 1, no = 0 + # + court_generate_commanders = yes / no / [0, int_max] + + # brief: supply_limit_mult_for_others ( fixed point ) + # Army owners of different govenment type have this multiplier + # applied to the supply limit + # + supply_limit_mult_for_others = 0 + + ### brief: prestige_opinion_override ( array of int ) + # Override for the opinion bonus that prestige levels gain, number + # of values should match the define in NCharacterOpinion:: + # PRESTIGIOUS + # + prestige_opinion_override = { -20 10 ... } + + ### brief: vassal_contract ( array of database keys ) + # Vassal obligations, how much does the vassal give to their liege. + # The vassal's government type determines which contract type is + # used.Note that the values can be changed with the + # vassal_tax_contribution_add and vassal_levy_contribution_add + # modifiers. Key are mapped to the vassal contracts database: + # common/vassal_contracts/ + # + vassal_contract = { + # List of vassal contract types + } + + ### brief: house_unity ( database key, optional ) + # Database key pointing to a configuration of house unity this + # government uses if applicable. Key is mapped to + # common/house_unities + # + house_unity = house_unity_key + + + ### brief: domicile_type ( database key, optional ) + # Database key pointing to a configuration of domicile this + # government uses if applicable. Key is mapped to + # common/domiciles + # + domicile_type = domicile type key + + + ### brief: ai + # Overrides for some AI functionaltiy when held by an AI with this + # government type. Note that some features might be disabled for + # other reasons (e.g. if not independent, if below a certain tier). + # + ai = { + ### brief: use_lifestyle ( flag ) + # Whether or not the AI checks for lifestyles. + # + use_lifestyle = yes + + ### brief: arrange_marriage ( flag ) + # Actively arrange marriages. Can still receive marriage + # requests if disabled. + # + arrange_marriage = yes + + ### brief: use_goals ( flag ) + # Use longterm goals (build holdings, perform major decisions, + # etc) + # + use_goals = yes + + ### brief: use_decisions ( flag ) + # Use minor decisions. + # + use_decisions = yes + + ### brief: use_scripted_guis ( flag ) + # Will evaluate using scripted guis. + # + use_scripted_guis = yes + + ### brief: use_legends ( flag ) + # Will create and promote legends. + # + use_legends = yes + + ### brief: perform_religious_reformation ( flag ) + # + perform_religious_reformation = yes + } + + ### brief: character_modifier ( modifiers ) + # Modifier applied to the ruler character with this government type. + # + character_modifier = {} + + ### brief: color ( vector 3 ) + # Color for map mode + # + color = { 100 100 100 } + + ### brief: flag ( flag ) + # List of flags this government uses. Can be defined as any string + # that can be referenced by government_has_flag = some_flag. Can + # be defined multiple times for multiple flags. + # + flag = some_flag +} + +Allowed Modifiers +================= + +Modifiers referenced by a government object can be only generic +(hardcoded) modifiers, or modifiers generated from the following +databases: +- schemes +- holdings +- lifestyles +- regions + +Other generated modifiers are _not_ allowed, such as those from other +governments, men_at_arms_types, cultures, or terrain types. diff --git a/common/laws/00_realm_laws.txt b/common/laws/00_realm_laws.txt new file mode 100644 index 00000000..b91e218b --- /dev/null +++ b/common/laws/00_realm_laws.txt @@ -0,0 +1,1419 @@ +@crown_authority_cooldown_years = 20 +@tribal_authority_cooldown_years = 10 +@imperial_bureaucracy_cooldown_years_1 = 10 +@imperial_bureaucracy_cooldown_years_2 = 20 +@imperial_bureaucracy_cooldown_years_3 = 30 + +@camp_purpose_prestige_cost = 1000 +@camp_purpose_ai_will_do_malus_t3 = -30 +@camp_purpose_ai_will_do_malus_t2 = -20 +@camp_purpose_ai_will_do_malus_t1 = -10 +@camp_purpose_ai_will_do_bonus_t1 = 10 +@camp_purpose_ai_will_do_bonus_t2 = 20 +@camp_purpose_ai_will_do_bonus_t3 = 30 + +crown_authority = { + default = crown_authority_1 + cumulative = yes + flag = realm_law + + crown_authority_0 = { + modifier = { + barons_and_minor_landholders_opinion = 20 + glory_hound_opinion = 10 + parochial_opinion = 10 + courtly_opinion = 5 + } + flag = uses_crown_authority + + can_keep = { + realm_law_use_crown_authority = yes + trigger_if = { + limit = { + government_allows = administrative + is_independent_ruler = no + } + liege = { has_realm_law = crown_authority_0 } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + } + + crown_authority_1 = { + modifier = { + barons_and_minor_landholders_opinion = -30 + glory_hound_opinion = -15 + parochial_opinion = -15 + courtly_opinion = -5 + minority_opinion = -10 + } + flag = uses_crown_authority + flag = title_revocation_allowed + flag = vassal_retraction_allowed + flag = can_change_partition_succession_laws + flag = diarchs_want_to_subsidise_without_this_flag + + can_keep = { + realm_law_use_crown_authority = yes + trigger_if = { + limit = { + government_allows = administrative + is_independent_ruler = no + } + liege = { has_realm_law = crown_authority_1 } + } + } + + can_pass = { + trigger_if = { + limit = { has_realm_law = crown_authority_0 } + custom_description = { + subject = root + text = "has_crown_authority_cooldown" + NAND = { + has_variable = crown_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + can_pass_law_ca1_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = crown_authority_cooldown + years = @crown_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = crown_authority_0 } + value = 1 + } + } + } + + crown_authority_2 = { + modifier = { + barons_and_minor_landholders_opinion = -10 + glory_hound_opinion = -10 + parochial_opinion = -10 + courtly_opinion = -5 + zealot_opinion = -10 + minority_opinion = -10 + vassal_tax_contribution_mult = 0.1 + vassal_levy_contribution_mult = 0.1 + } + flag = uses_crown_authority + flag = vassal_internal_wars_banned + flag = vassal_refusal_is_treason + flag = can_change_succession_laws + flag = titles_cannot_leave_realm_on_succession # Hardcoded flag + + can_keep = { + realm_law_use_crown_authority = yes + trigger_if = { + limit = { + government_allows = administrative + is_independent_ruler = no + } + liege = { has_realm_law = crown_authority_2 } + } + } + + can_pass = { + trigger_if = { + limit = { + NOT = { has_realm_law = crown_authority_3 } + NAND = { + government_allows = administrative + is_independent_ruler = no + } + } + has_realm_law = crown_authority_1 + custom_description = { + subject = root + text = "has_crown_authority_cooldown" + NAND = { + has_variable = crown_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + can_pass_law_ca2_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law = crown_authority_3 } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = crown_authority_cooldown + years = @crown_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = crown_authority_1 } + value = 1 + } + } + } + + crown_authority_3 = { + modifier = { + barons_and_minor_landholders_opinion = -20 + glory_hound_opinion = -25 + parochial_opinion = -25 + courtly_opinion = -10 + zealot_opinion = -20 + minority_opinion = -30 + vassal_tax_contribution_mult = 0.25 + vassal_levy_contribution_mult = 0.25 + } + flag = uses_crown_authority + flag = vassal_all_wars_banned + flag = can_designate_heirs + flag = max_authority_level + + can_keep = { + realm_law_use_crown_authority = yes + trigger_if = { + limit = { + government_allows = administrative + is_independent_ruler = no + } + liege = { has_realm_law = crown_authority_3 } + } + } + + can_pass = { + trigger_if = { + limit = { + NAND = { + government_allows = administrative + is_independent_ruler = no + } + } + has_realm_law = crown_authority_2 + custom_description = { + subject = root + text = "has_crown_authority_cooldown" + NAND = { + has_variable = crown_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + can_pass_law_ca3_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law = crown_authority_3 } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = crown_authority_cooldown + years = @crown_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + } +} + +tribal_authority = { + default = tribal_authority_1 + cumulative = yes + flag = realm_law + + tribal_authority_0 = { + modifier = { + glory_hound_opinion = 10 + parochial_opinion = 10 + courtly_opinion = 5 + } + flag = uses_tribal_authority + flag = imprisonment_toggle_enable + + can_keep = { realm_law_use_tribal_authority = yes } + #Imprisonment is disabled if you have this law. Script is in the interaction, currently in 00_prison_interactions. + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + } + + tribal_authority_1 = { + modifier = { + glory_hound_opinion = -15 + parochial_opinion = -15 + courtly_opinion = -5 + minority_opinion = -10 + } + flag = uses_tribal_authority + flag = can_change_succession_laws + flag = imprisonment_toggle_on + + can_keep = { realm_law_use_tribal_authority = yes } + + can_pass = { + trigger_if = { + limit = { has_realm_law = tribal_authority_0 } + custom_description = { + subject = root + text = "has_tribal_authority_cooldown" + NAND = { + has_variable = tribal_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + } + + pass_cost = { + prestige = { + if = { + limit = { + NOR = { + has_realm_law = tribal_authority_2 + has_realm_law = tribal_authority_3 + } + } + add = increase_tribal_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = tribal_authority_cooldown + years = @tribal_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = tribal_authority_0 } + value = 1 + } + } + } + + tribal_authority_2 = { + modifier = { + glory_hound_opinion = -10 + parochial_opinion = -10 + courtly_opinion = -5 + zealot_opinion = -10 + minority_opinion = -10 + } + flag = uses_tribal_authority + flag = title_revocation_allowed + flag = vassal_retraction_allowed + flag = diarchs_want_to_subsidise_without_this_flag + + can_keep = { realm_law_use_tribal_authority = yes } + + can_pass = { + trigger_if = { + limit = { + NOT = { has_realm_law = tribal_authority_3 } + } + has_realm_law = tribal_authority_1 + custom_description = { + subject = root + text = "has_tribal_authority_cooldown" + NAND = { + has_variable = tribal_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law = tribal_authority_3 } + } + add = increase_tribal_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = tribal_authority_cooldown + years = @tribal_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = tribal_authority_1 } + value = 1 + } + } + } + + tribal_authority_3 = { + modifier = { + glory_hound_opinion = -25 + parochial_opinion = -25 + courtly_opinion = -10 + zealot_opinion = -20 + minority_opinion = -30 + } + flag = uses_tribal_authority + flag = max_authority_level + #Settling is disabled unless you have this law. Script is in the decisions, currently in 80_major_decisions. + #Reforming pagan religions (but not creating other faiths) is disabled unless you have this law. Script is in the reformation prereqs, currently in 00_rules. + + can_keep = { realm_law_use_tribal_authority = yes } + + can_pass = { + has_realm_law = tribal_authority_2 + custom_description = { + subject = root + text = "has_tribal_authority_cooldown" + NAND = { + has_variable = tribal_authority_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + + pass_cost = { prestige = increase_tribal_authority_prestige_cost } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = tribal_authority_cooldown + years = @tribal_authority_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = tribal_authority_2 } + value = 1 + } + if = { # Genghis is fundamentally uninterested in settling as feudal, and doesn't care for the additional -20 vassal opinion! + limit = { has_title = title:e_mongol_empire } + value = -10 + } + } + } +} + +camp_purpose = { + default = camp_purpose_wanderers + flag = realm_law + + camp_purpose_wanderers = { + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = can_change_purpose_for_free + + + can_keep = { realm_law_use_camp_purpose = yes } + + pass_cost = { + prestige = @camp_purpose_prestige_cost + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_wanderers + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_wanderers_modifier + } + } + + ai_will_do = { value = 0 } + } + + camp_purpose_mercenaries = { + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = laamp_contracts_weight_up_mercenary + flag = laamp_contracts_weight_up_martial + flag = laamp_contracts_weight_up_prowess + flag = martial_camp_purpose + + # Camp unlocks. + flag = unlocks_baggage_train_siege_engineers + flag = unlocks_proving_grounds_lockwagon + flag = unlocks_camp_perimeter_palisade + flag = unlocks_camp_perimeter_ditch + + can_keep = { realm_law_use_camp_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law_flag = can_change_purpose_for_free } + } + value = @camp_purpose_prestige_cost + } + } + } + + modifier = { + men_at_arms_cap = 1 + embarkation_cost_mult = -0.5 + knight_limit = 8 + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_mercenaries + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_mercenaries_modifier + } + } + + ai_will_do = { + # Traits. + ## Education. + if = { + limit = { has_trait = education_martial } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ## Personality. + ### Cultural traditions + if = { + limit = { + culture = { + OR = { + has_cultural_parameter = much_more_likely_to_be_laamps + has_cultural_parameter = more_likely_to_be_laamps + } + } + } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Wrathful + if = { + limit = { has_trait = wrathful } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Calm + if = { + limit = { has_trait = calm } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Callous + if = { + limit = { has_trait = callous } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Sadistic + if = { + limit = { has_trait = sadistic } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Compassionate + if = { + limit = { has_trait = compassionate } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Brave + if = { + limit = { has_trait = brave } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Craven + if = { + limit = { has_trait = craven } + add = @camp_purpose_ai_will_do_malus_t3 + } + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = camp_purpose_wanderers } + } + multiply = 0 + } + } + } + + camp_purpose_scholars = { + modifier = { + monthly_lifestyle_xp_gain_mult = 0.2 + } + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = laamp_contracts_weight_up_learning + flag = laamp_contracts_weight_up_stewardship + flag = laamp_contracts_weight_up_diplomacy_slight + flag = nerd_camp_purpose + + # Camp unlocks. + flag = unlocks_baggage_train_siege_engineers + flag = unlocks_barber_tent_reference_corpus + flag = unlocks_barber_tent_morticians_tools + flag = unlocks_baggage_train_scribes + flag = unlocks_baggage_train_ascetics + flag = unlocks_camp_fire_nightly_debates + flag = unlocks_proving_grounds_martial_study + + can_keep = { realm_law_use_camp_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law_flag = can_change_purpose_for_free } + } + value = @camp_purpose_prestige_cost + } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_scholars + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_scholars_modifier + } + } + + ai_will_do = { + # Traits. + ## Education. + if = { + limit = { has_trait = education_learning } + add = @camp_purpose_ai_will_do_bonus_t3 + } + if = { + limit = { has_trait = education_stewardship } + add = @camp_purpose_ai_will_do_bonus_t1 + } + ## Personality. + ### Honest + if = { + limit = { has_trait = honest } + add = @camp_purpose_ai_will_do_bonus_t1 + } + ### Generous + if = { + limit = { has_trait = generous } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Calm + if = { + limit = { has_trait = calm } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Wrathful + if = { + limit = { has_trait = wrathful } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Eccentric + if = { + limit = { has_trait = eccentric } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Patient + if = { + limit = { has_trait = patient } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Impatient + if = { + limit = { has_trait = impatient } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Shy + if = { + limit = { has_trait = shy } + add = @camp_purpose_ai_will_do_bonus_t1 + } + ### Gregarious + if = { + limit = { has_trait = gregarious } + add = @camp_purpose_ai_will_do_malus_t1 + } + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = camp_purpose_wanderers } + } + multiply = 0 + } + } + } + + camp_purpose_explorers = { + modifier = { + character_travel_speed_mult = 0.25 + coastal_sea_travel_danger = medium_sea_danger_reduction + sea_travel_danger = medium_sea_danger_reduction + } + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = laamp_contracts_weight_up_transport + flag = laamp_contracts_weight_up_diplomacy + flag = laamp_contracts_weight_up_intrigue + flag = laamp_contracts_weight_up_martial_slight + + # Camp unlocks. + flag = unlocks_supply_tent_reserve_provisions + flag = unlocks_supply_tent_reserve_water + flag = unlocks_supply_tent_climbing_gear + flag = unlocks_camp_fire_local_hangers_on + flag = unlocks_camp_perimeter_extra_watch + + can_keep = { realm_law_use_camp_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law_flag = can_change_purpose_for_free } + } + value = @camp_purpose_prestige_cost + } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_explorers + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_explorers_modifier + } + } + + ai_will_do = { + # Traits. + ## Education. + if = { + limit = { has_trait = education_diplomacy } + add = @camp_purpose_ai_will_do_bonus_t3 + } + if = { + limit = { has_trait = education_stewardship } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ## Personality. + ### Diligent + if = { + limit = { has_trait = diligent } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Lazy + if = { + limit = { has_trait = lazy } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Athletic + if = { + limit = { has_trait = athletic } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Brave + if = { + limit = { has_trait = brave } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Craven + if = { + limit = { has_trait = craven } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Eccentric + if = { + limit = { has_trait = eccentric } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Stubborn + if = { + limit = { has_trait = stubborn } + add = @camp_purpose_ai_will_do_bonus_t1 + } + ### Fickle + if = { + limit = { has_trait = fickle } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Humble + if = { + limit = { has_trait = humble } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Arrogant + if = { + limit = { has_trait = arrogant } + add = @camp_purpose_ai_will_do_malus_t2 + } + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = camp_purpose_wanderers } + } + multiply = 0 + } + } + } + + camp_purpose_brigands = { + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = laamp_contracts_weight_up_criminal + flag = laamp_contracts_weight_up_prowess + flag = laamp_contracts_weight_up_intrigue + flag = martial_camp_purpose + + # Camp unlocks. + flag = unlocks_proving_grounds_lockwagon + flag = unlocks_barber_tent_morticians_tools + flag = unlocks_supply_tent_subdued_gear + flag = unlocks_baggage_train_ransom_cages + flag = unlocks_baggage_train_negotiators + flag = unlocks_camp_fire_juicy_rumors + flag = unlocks_proving_grounds_the_stick_game + + can_keep = { realm_law_use_camp_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law_flag = can_change_purpose_for_free } + } + value = @camp_purpose_prestige_cost + } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_brigands + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_brigands_modifier + } + } + + modifier = { + embarkation_cost_mult = -0.5 + knight_limit = 3 + } + + ai_will_do = { + # Traits. + ## Education. + if = { + limit = { has_trait = education_intrigue } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Cultural traditions + if = { + limit = { + culture = { + OR = { + has_cultural_parameter = much_more_likely_to_be_laamps + has_cultural_parameter = more_likely_to_be_laamps + } + } + } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ## Personality. + ### Deceitful. + if = { + limit = { has_trait = deceitful } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Honest. + if = { + limit = { has_trait = honest } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Arbitrary. + if = { + limit = { has_trait = arbitrary } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Just, + if = { + limit = { has_trait = just } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Greedy + either Humble or Content. + if = { + limit = { + has_trait = greedy + OR = { + has_trait = humble + has_trait = content + } + } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Generous. + if = { + limit = { has_trait = generous } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Arrogant. + if = { + limit = { has_trait = arrogant } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Ambitious. + if = { + limit = { has_trait = ambitious } + add = @camp_purpose_ai_will_do_malus_t2 + } + ### Wrathful. + if = { + limit = { has_trait = wrathful } + add = @camp_purpose_ai_will_do_bonus_t1 + } + ### Calm. + if = { + limit = { has_trait = calm } + add = @camp_purpose_ai_will_do_malus_t1 + } + ### Sadistic. + if = { + limit = { has_trait = sadistic } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Callous. + if = { + limit = { has_trait = callous } + add = @camp_purpose_ai_will_do_bonus_t2 + } + ### Compassionate. + if = { + limit = { has_trait = compassionate } + add = @camp_purpose_ai_will_do_malus_t2 + } + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = camp_purpose_wanderers } + } + multiply = 0 + } + } + } + + camp_purpose_legitimists = { + flag = uses_camp_purpose + flag = can_change_succession_laws + flag = martial_camp_purpose + + # Camp unlocks. + flag = unlocks_baggage_train_scribes + flag = unlocks_proving_grounds_martial_study + flag = unlocks_baggage_train_proof_of_claims + flag = unlocks_baggage_train_ransom_cages + flag = unlocks_camp_fire_future_dreams + flag = unlocks_proving_grounds_bodyguard_drills + + can_keep = { + realm_law_use_camp_purpose = yes + ep3_can_have_legitimists_camp_purpose_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law_flag = can_change_purpose_for_free } + } + value = @camp_purpose_prestige_cost + } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + # Remove inappropriate buildings. + laamp_clear_inappropriate_buildings_effect = yes + # Adjust flavourisation. + remove_camp_purpose_flavourisation_variables_effect = yes + set_variable = flavourise_camp_purpose_legitimists + local_arbitration_boon_set_purpose_effect = { + MODIFIER = landless_local_arbitration_legitimists_modifier + } + } + + modifier = { + men_at_arms_cap = 1 + knight_limit = 8 + } + + ai_will_do = { + # Weight up legitimists inherently. + value = 100 + # Traits. + ## Education. + if = { + limit = { + OR = { + has_trait = education_diplomacy + has_trait = education_martial + } + } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ## Personality. + ### Ambitious + if = { + limit = { has_trait = ambitious } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Content + if = { + limit = { has_trait = content } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Arrogant + if = { + limit = { has_trait = arrogant } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Humble + if = { + limit = { has_trait = humble } + add = @camp_purpose_ai_will_do_malus_t3 + } + ### Vengeful + if = { + limit = { has_trait = vengeful } + add = @camp_purpose_ai_will_do_bonus_t3 + } + ### Forgiving + if = { + limit = { has_trait = forgiving } + add = @camp_purpose_ai_will_do_malus_t3 + } + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = camp_purpose_wanderers } + } + multiply = 0 + } + } + } +} + +imperial_bureaucracy = { + default = imperial_bureaucracy_1 + cumulative = yes + flag = realm_law + + imperial_bureaucracy_0 = { + modifier = { + barons_and_minor_landholders_opinion = 20 + glory_hound_opinion = 10 + parochial_opinion = 10 + courtly_opinion = 5 + } + flag = uses_imperial_bureaucracy + flag = titles_cannot_leave_realm_on_succession # Hardcoded flag + + can_keep = { + realm_law_use_imperial_bureaucracy = yes + trigger_if = { + limit = { + is_independent_ruler = no + } + liege = { has_realm_law = imperial_bureaucracy_0 } + } + } + + can_pass = { + trigger_if = { + limit = { + is_independent_ruler = no + liege = { has_realm_law = imperial_bureaucracy_0 } + } + custom_tooltip = { + text = imperial_bureaucracy_pending_law_change + always = no + } + } + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + } + + imperial_bureaucracy_1 = { + modifier = { + barons_and_minor_landholders_opinion = -30 + glory_hound_opinion = -15 + parochial_opinion = -15 + courtly_opinion = -5 + minority_opinion = -10 + administrative_government_tax_contribution_add = 0.05 + vassal_limit = 100 + } + flag = uses_imperial_bureaucracy + flag = title_revocation_allowed + flag = vassal_retraction_allowed + flag = can_change_partition_succession_laws + flag = vassal_internal_wars_banned + flag = diarchs_want_to_subsidise_without_this_flag + + can_keep = { + realm_law_use_imperial_bureaucracy = yes + trigger_if = { + limit = { + is_independent_ruler = no + } + liege = { has_realm_law = imperial_bureaucracy_1 } + } + } + + can_pass = { + trigger_if = { + limit = { + has_realm_law = imperial_bureaucracy_0 + is_independent_ruler = yes + } + custom_description = { + subject = root + text = "has_imperial_bureaucracy_cooldown" + NAND = { + has_variable = imperial_bureaucracy_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + trigger_if = { + limit = { + is_independent_ruler = no + liege = { has_realm_law = imperial_bureaucracy_1 } + } + custom_tooltip = { + text = imperial_bureaucracy_pending_law_change + always = no + } + } + can_pass_law_ca1_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOR = { + has_realm_law = imperial_bureaucracy_2 + has_realm_law = imperial_bureaucracy_3 + } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = imperial_bureaucracy_cooldown + years = @imperial_bureaucracy_cooldown_years_1 + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = imperial_bureaucracy_0 } + value = 1 + } + } + } + + imperial_bureaucracy_2 = { + modifier = { + barons_and_minor_landholders_opinion = -10 + glory_hound_opinion = -10 + parochial_opinion = -10 + courtly_opinion = -5 + zealot_opinion = -10 + minority_opinion = -10 + administrative_government_tax_contribution_add = 0.05 + republic_government_tax_contribution_add = 0.05 + vassal_limit = 100 + } + flag = uses_imperial_bureaucracy + flag = vassal_refusal_is_treason + flag = can_change_succession_laws + flag = vassal_all_wars_banned + flag = admin_change_vassal_gov_cheaper + flag = admin_title_troop_cost_reduction + + can_keep = { + realm_law_use_imperial_bureaucracy = yes + trigger_if = { + limit = { + is_independent_ruler = no + } + liege = { has_realm_law = imperial_bureaucracy_2 } + } + } + + can_pass = { + trigger_if = { + limit = { + NOT = { has_realm_law = imperial_bureaucracy_3 } + is_independent_ruler = yes + } + has_realm_law = imperial_bureaucracy_1 + custom_description = { + subject = root + text = "has_imperial_bureaucracy_cooldown" + NAND = { + has_variable = imperial_bureaucracy_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + trigger_if = { + limit = { + is_independent_ruler = no + liege = { has_realm_law = imperial_bureaucracy_2 } + } + custom_tooltip = { + text = imperial_bureaucracy_pending_law_change + always = no + } + } + can_pass_law_ca2_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law = imperial_bureaucracy_3 } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = imperial_bureaucracy_cooldown + years = @imperial_bureaucracy_cooldown_years_2 + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + ai_will_do = { + if = { + limit = { has_realm_law = imperial_bureaucracy_1 } + value = 1 + } + } + } + + imperial_bureaucracy_3 = { + modifier = { + barons_and_minor_landholders_opinion = -20 + glory_hound_opinion = -25 + parochial_opinion = -25 + courtly_opinion = -10 + zealot_opinion = -20 + minority_opinion = -30 + administrative_government_tax_contribution_add = 0.1 + republic_government_tax_contribution_add = 0.05 + vassal_limit = 200 + } + flag = uses_imperial_bureaucracy + flag = vassal_all_wars_banned_permanent + flag = max_authority_level + flag = admin_title_troop_cost_reduction_high + + can_keep = { + realm_law_use_imperial_bureaucracy = yes + trigger_if = { + limit = { + is_independent_ruler = no + } + liege = { has_realm_law = imperial_bureaucracy_3 } + } + } + + can_pass = { + trigger_if = { + limit = { + is_independent_ruler = yes + } + has_realm_law = imperial_bureaucracy_2 + custom_description = { + subject = root + text = "has_imperial_bureaucracy_cooldown" + NAND = { + has_variable = imperial_bureaucracy_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + } + trigger_if = { + limit = { + is_independent_ruler = no + liege = { has_realm_law = imperial_bureaucracy_3 } + } + custom_tooltip = { + text = imperial_bureaucracy_pending_law_change + always = no + } + } + can_pass_law_ca3_trigger = yes + } + + pass_cost = { + prestige = { + if = { + limit = { + NOT = { has_realm_law = imperial_bureaucracy_3 } + } + add = increase_crown_authority_prestige_cost + } + } + } + + on_pass = { + # Increment cooldown breaker tally, if appropriate. + calculate_authority_cooldown_break_effect = yes + # Set regular cooldown. + set_variable = { + name = imperial_bureaucracy_cooldown + years = @imperial_bureaucracy_cooldown_years_3 + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + } +} diff --git a/common/laws/00_succession_laws.txt b/common/laws/00_succession_laws.txt new file mode 100644 index 00000000..4b77c2dc --- /dev/null +++ b/common/laws/00_succession_laws.txt @@ -0,0 +1,1260 @@ +succession_order_laws = { + flag = succession_order_laws + + confederate_partition_succession_law = { + can_keep = { + always = yes + } + can_pass = { + can_change_partition_succession_law_trigger = yes + } + can_have = { + can_have_confederate_partition_succession_law_trigger = yes + } + should_start_with = { + NOR = { + historical_succession_access_single_heir_succession_law_trigger = yes + historical_succession_access_single_heir_succession_law_youngest_trigger = yes + historical_succession_access_single_heir_dynasty_house_trigger = yes + } + OR = { + AND = { + government_has_flag = government_is_feudal + culture = { + NOR = { + has_innovation = innovation_hereditary_rule + has_innovation = innovation_heraldry + } + } + } + government_has_flag = government_is_tribal + } + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + create_primary_tier_titles = yes + } + flag = partition_succession_law + modifier = { + glory_hound_opinion = 10 + parochial_opinion = 5 + dynasty_house_opinion = 5 + eligible_child_opinion = 10 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + } + + potential = { + NOT = { government_has_flag = government_is_clan } + NOT = { government_has_flag = government_is_administrative } + } + } + + partition_succession_law = { + can_keep = { + can_keep_partition_succession_law_trigger = yes + } + can_pass = { + can_change_partition_succession_law_trigger = yes + } + can_have = { + can_have_partition_succession_law_trigger = yes + } + should_start_with = { + NOR = { + historical_succession_access_single_heir_succession_law_trigger = yes + historical_succession_access_single_heir_succession_law_youngest_trigger = yes + historical_succession_access_single_heir_dynasty_house_trigger = yes + } + government_has_flag = government_is_feudal + culture = { + has_innovation = innovation_hereditary_rule + NOT = { + has_innovation = innovation_heraldry + } + } + NOT = { has_government = administrative_government } + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + } + flag = partition_succession_law + modifier = { + glory_hound_opinion = 10 + parochial_opinion = 5 + player_heir_opinion = 10 + eligible_child_except_player_heir_opinion = 5 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + if = { + limit = { has_realm_law = confederate_partition_succession_law } + value = 1 + } + } + + potential = { + NOT = { government_has_flag = government_is_clan } + NOT = { government_has_flag = government_is_administrative } + } + } + + high_partition_succession_law = { + can_keep = { + can_keep_high_partition_succession_law_trigger = yes + } + can_pass = { + can_change_partition_succession_law_trigger = yes + } + can_have = { + can_have_high_partition_succession_law_trigger = yes + } + should_start_with = { + NOR = { + historical_succession_access_single_heir_succession_law_trigger = yes + historical_succession_access_single_heir_succession_law_youngest_trigger = yes + historical_succession_access_single_heir_dynasty_house_trigger = yes + } + government_has_flag = government_is_feudal + culture = { + has_innovation = innovation_heraldry + NOT = { + has_innovation = innovation_hereditary_rule + } + } + NOT = { has_government = administrative_government } + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + primary_heir_minimum_share = 0.5 + } + flag = partition_succession_law + modifier = { + glory_hound_opinion = 5 + player_heir_opinion = 15 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + if = { + limit = { + OR = { + has_realm_law = confederate_partition_succession_law + has_realm_law = partition_succession_law + } + } + value = 2 + } + } + + potential = { + NOT = { government_has_flag = government_is_clan } + NOT = { government_has_flag = government_is_administrative } + } + } + + single_heir_succession_law = { + can_keep = { + can_keep_single_heir_succession_law_trigger = yes + # Vassal Contract allows it + custom_description = { + text = succession_laws_must_not_be_forced_partition + NAND = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + } + } + can_have = { + can_have_single_heir_succession_law_trigger = yes + } + can_pass = { + can_change_succession_law_trigger = yes + trigger_if = { + limit = { + government_has_flag = government_is_clan + } + piety_level >= 3 + } + } + should_start_with = { + historical_succession_access_single_heir_succession_law_trigger = yes + NOT = { has_government = administrative_government } + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = single_heir + } + flag = advanced_succession_law + modifier = { + glory_hound_opinion = -10 + parochial_opinion = -5 + player_heir_opinion = 20 + eligible_child_except_player_heir_opinion = -5 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + piety = { + value = 0 + if = { + limit = { + government_has_flag = government_is_clan + } + add = { + desc = "clan_government_cost_tooltip" + value = 1500 + } + } + } + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + value = 3 + } + + potential = { + NOT = { government_has_flag = government_is_administrative } + } + } + + single_heir_succession_law_youngest = { + can_keep = { + can_keep_single_heir_youngest_succession_law_trigger = yes + # Vassal Contract allows it + custom_description = { + text = succession_laws_must_not_be_forced_partition + NAND = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + } + } + can_have = { + can_have_single_heir_youngest_succession_law_trigger = yes + } + can_pass = { + can_change_succession_law_trigger = yes + trigger_if = { + limit = { + government_has_flag = government_is_clan + } + piety_level >= 3 + } + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = youngest + title_division = single_heir + } + + flag = advanced_succession_law + modifier = { + glory_hound_opinion = -10 + parochial_opinion = -5 + player_heir_opinion = 20 + eligible_child_except_player_heir_opinion = -5 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + piety = { + value = 0 + if = { + limit = { + government_has_flag = government_is_clan + } + add = { + desc = "clan_government_cost_tooltip" + value = 1500 + } + } + } + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + potential = { + NOT = { government_has_flag = government_is_administrative } + } + } + + single_heir_dynasty_house = { # LAST CALL + can_keep = { + can_keep_single_heir_dynasty_house_trigger = yes + # Vassal Contract allows it + custom_description = { + text = succession_laws_must_not_be_forced_partition + NAND = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + } + } + can_have = { + can_have_single_heir_dynasty_house_trigger = yes + } + can_pass = { + can_change_single_heir_dynasty_house_succession_law_trigger = yes + trigger_if = { + limit = { + government_has_flag = government_is_clan + } + piety_level >= 3 + } + } + should_start_with = { + historical_succession_access_single_heir_dynasty_house_trigger = yes + NOT = { has_government = administrative_government } + } + succession = { + order_of_succession = inheritance + traversal_order = dynasty_house + rank = oldest + title_division = single_heir + } + + flag = advanced_succession_law + modifier = { + glory_hound_opinion = -5 + eligible_child_except_player_heir_opinion = -15 + dynasty_house_opinion = 5 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + piety = { + value = 0 + if = { + limit = { + government_has_flag = government_is_clan + } + add = { + desc = "clan_government_cost_tooltip" + value = 1500 + } + } + } + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + if = { + limit = { + primary_title.tier > tier_county + OR = { + #West Slavic + culture = { has_cultural_pillar = heritage_west_slavic } + } + } + value = 2 + } + } + + potential = { + NOT = { government_has_flag = government_is_administrative } + } + } + + acclamation_succession_law = { + can_keep = { + can_keep_acclamation_succession_law_trigger = yes + } + can_pass = { + can_change_acclamation_succession_law_trigger = yes + } + can_have = { + can_have_acclamation_succession_law_trigger = yes + } + should_start_with = { + has_ep3_dlc_trigger = yes + has_title = title:e_britannia + has_government = administrative_government + } + succession = { + order_of_succession = appointment + appointment_type = admin_emperor + } + flag = advanced_succession_law + flag = can_designate_heirs + pass_cost = { + prestige = change_succession_law_prestige_cost + } + ai_will_do = { + if = { + limit = { has_realm_law = confederate_partition_succession_law } + value = 1 + } + } + potential = { + has_government = administrative_government + } + } + + appointment_succession_law = { + can_keep = { + has_government = administrative_government + is_independent_ruler = no + + # Vassal Contract allows it + custom_description = { + text = succession_laws_must_not_be_forced_partition + NAND = { + is_independent_ruler = no + vassal_contract_has_flag = locked_to_partition + } + } + } + can_have = { + #can_have_single_heir_succession_law_trigger = yes + has_government = administrative_government + is_independent_ruler = no + } + can_pass = { + can_change_succession_law_trigger = yes + has_government = administrative_government + is_independent_ruler = no + } + should_start_with = { + has_government = administrative_government + is_independent_ruler = no + } + succession = { + order_of_succession = appointment + appointment_type = admin_governor + } + flag = advanced_succession_law + modifier = { + glory_hound_opinion = -10 + parochial_opinion = -5 + player_heir_opinion = 20 + eligible_child_except_player_heir_opinion = -5 + } + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + if = { + limit = { + OR = { + has_realm_law = confederate_partition_succession_law + has_realm_law = partition_succession_law + has_realm_law = high_partition_succession_law + } + } + value = 3 + } + } + + potential = { + has_government = administrative_government + } + } + + landless_adventurer_succession_law = { + can_keep = { + government_has_flag = government_is_landless_adventurer + } + can_have = { + government_has_flag = government_is_landless_adventurer + } + can_pass = { + government_has_flag = government_is_landless_adventurer + } + should_start_with = { + government_has_flag = government_is_landless_adventurer + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_remove_from_title = { + always = no + } + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = single_heir + exclude_rulers = yes + limit_to_courtiers = yes + } + flag = can_designate_heirs + + potential = { + government_has_flag = government_is_landless_adventurer + } + } + + bishop_theocratic_succession_law = { + can_keep = { + can_have_bishop_theocratic_succession_law_trigger = yes # same as can_have + } + can_have = { + can_have_bishop_theocratic_succession_law_trigger = yes + } + should_start_with = { + always = yes + } + succession = { + order_of_succession = theocratic + faith = same_faith + pool_character_config = pool_theocratic_succession + } + + potential = { + can_have_bishop_theocratic_succession_law_trigger = yes + } + } + + holy_order_succession_law = { + can_keep = { + can_have_holy_order_succession_law_trigger = yes # same as can_have + } + can_have = { + can_have_holy_order_succession_law_trigger = yes + } + should_start_with = { + government_has_flag = government_is_holy_order + } + succession = { + order_of_succession = theocratic + faith = same_faith + pool_character_config = pool_holy_order_succession + } + + potential = { + can_have_holy_order_succession_law_trigger = yes + } + } + + mercenary_company_succession_law = { + can_keep = { + can_have_mercenary_succession_law_trigger = yes + } + can_have = { + can_have_mercenary_succession_law_trigger = yes + } + should_start_with = { + government_has_flag = government_is_mercenary + } + succession = { + order_of_succession = company + pool_character_config = pool_mercenary_succession + } + + potential = { + can_have_mercenary_succession_law_trigger = yes + } + } + + city_succession_law = { + can_keep = { + can_have_city_succession_law_trigger = yes + } + can_have = { + can_have_city_succession_law_trigger = yes + } + should_start_with = { + government_has_flag = government_is_republic + } + succession = { + order_of_succession = generate + pool_character_config = pool_city_succession + } + + potential = { + can_have_city_succession_law_trigger = yes + } + } + + clan_antagonistic_partition_succession_law = { + can_keep = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + can_pass = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + can_have = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = antagonistic + } + } + + should_start_with = { + government_has_flag = government_is_clan + house ?= { has_house_unity_stage = antagonistic } + } + + potential = { + government_has_flag = government_is_clan + } + + requires_approve = { + NOT = { + government_has_flag = government_is_clan + } + } + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + } + + flag = same_house_vassals_gain_claim_on_primary_title + flag = house_unity_stage_antagonistic + + modifier = { + dynasty_house_opinion = -10 + glory_hound_opinion = 15 + zealot_opinion = 10 + player_heir_opinion = 10 + eligible_child_except_player_heir_opinion = 5 + } + + widget_name = "widget_clan_law" + } + + clan_competitive_partition_succession_law = { + can_keep = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = competitive + } + } + can_pass = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = competitive + } + } + can_have = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = competitive + } + } + should_start_with = { + government_has_flag = government_is_clan + house ?= { has_house_unity_stage = competitive } + } + + potential = { + government_has_flag = government_is_clan + } + + requires_approve = { + NOT = { + government_has_flag = government_is_clan + } + } + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + } + + flag = same_house_vassals_gain_claim_on_primary_title + flag = house_unity_stage_competitive + + modifier = { + glory_hound_opinion = 10 + zealot_opinion = 5 + player_heir_opinion = 10 + eligible_child_except_player_heir_opinion = 5 + } + + widget_name = "widget_clan_law" + } + + clan_impassive_partition_succession_law = { + can_keep = { + government_has_flag = government_is_clan + house ?= { + OR = { + has_house_unity_stage = impassive + # In case the house is fully unlanded + has_house_unity = no + } + } + } + can_pass = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = impassive + } + } + can_have = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = impassive + } + } + should_start_with = { + government_has_flag = government_is_clan + house ?= { + OR = { + has_house_unity_stage = impassive + # In case the house is fully unlanded + has_house_unity = no + } + } + } + + potential = { + government_has_flag = government_is_clan + } + + requires_approve = { + NOT = { + government_has_flag = government_is_clan + } + } + + flag = house_unity_stage_impassive + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + primary_heir_minimum_share = 0.25 + } + modifier = { + glory_hound_opinion = 5 + parochial_opinion = 5 + player_heir_opinion = 15 + } + + widget_name = "widget_clan_law" + } + + clan_friendly_partition_succession_law = { + can_keep = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = friendly + } + } + can_pass = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = friendly + } + } + can_have = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = friendly + } + } + should_start_with = { + government_has_flag = government_is_clan + house ?= { has_house_unity_stage = friendly } + } + + potential = { + government_has_flag = government_is_clan + } + + requires_approve = { + NOT = { + government_has_flag = government_is_clan + } + } + + flag = house_unity_stage_friendly + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + primary_heir_minimum_share = 0.5 + } + modifier = { + parochial_opinion = 10 + courtly_opinion = 5 + player_heir_opinion = 25 + } + + widget_name = "widget_clan_law" + } + + clan_harmonious_partition_succession_law = { + can_keep = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = harmonious + } + } + can_pass = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = harmonious + } + } + can_have = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = harmonious + } + } + should_start_with = { + government_has_flag = government_is_clan + house ?= { + has_house_unity_stage = harmonious + } + } + potential = { + government_has_flag = government_is_clan + } + + requires_approve = { + NOT = { + government_has_flag = government_is_clan + } + } + + flag = house_unity_stage_harmonious + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = partition + primary_heir_minimum_share = 0.75 + } + modifier = { + parochial_opinion = 15 + courtly_opinion = 10 + player_heir_opinion = 40 + } + + widget_name = "widget_clan_law" + } +} + +succession_gender_laws = { + default = male_preference_law + flag = succession_gender_laws + + male_only_law = { + can_title_have = { + can_title_have_law_general_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_keep = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = male_only_law } + } + trigger_else = { + custom_tooltip = { + text = culture_not_female_only_tt + OR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + NOT = { + culture = { has_cultural_parameter = female_only_inheritance } + } + } + } + } + } + can_pass = { + can_change_succession_law_trigger = yes + } + should_start_with = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = male_only_law } + } + trigger_else = { + faith = { + has_doctrine = doctrine_gender_male_dominated + religion_tag = islam_religion + } + } + } + succession = { + gender_law = male_only + } + flag = men_can_have_multiple_spouses + flag = men_can_have_consorts + flag = no_female_commanders + + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + } + + male_preference_law = { + can_title_have = { + can_title_have_law_general_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_keep = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = male_preference_law } + } + trigger_else = { + custom_description = { + text = change_law_male_preference_faith_requirement + faith = { + NOT = { has_doctrine = doctrine_gender_female_dominated } + } + } + custom_tooltip = { + text = culture_not_female_only_tt + OR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + NOT = { + culture = { has_cultural_parameter = female_only_inheritance } + } + } + } + } + } + can_pass = { + can_change_succession_law_trigger = yes + } + should_start_with = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = male_preference_law } + } + trigger_else = { + NOT = { + culture = { has_cultural_parameter = female_preference_inheritance } + } + OR = { + faith = { + NOT = { + religion_tag = islam_religion + } + has_doctrine = doctrine_gender_male_dominated + } + has_realm_law = male_only_law # For when male_only_law ceases to be a legal option + } + } + } + succession = { + gender_law = male_preference + } + flag = men_can_have_multiple_spouses + flag = men_can_have_consorts + flag = no_female_commanders + + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + } + + equal_law = { + can_title_have = { + can_title_have_law_general_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_keep = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = equal_law } + } + trigger_else = { + custom_tooltip = { + text = equal_law_culture_faith_or_innovation_trigger + OR = { + culture = { has_cultural_parameter = gender_equal_inheritance } + #culture = { has_innovation = innovation_visigothic_codes } + faith = { has_doctrine = doctrine_gender_equal } + AND = { #Culture is female dominated but religion is male dominated + faith = { has_doctrine = doctrine_gender_male_dominated } + culture = { has_cultural_parameter = female_only_inheritance } + } + AND = { #Culture is male dominated but faith is female dominated + faith = { has_doctrine = doctrine_gender_female_dominated } + NOT = { culture = { has_cultural_parameter = female_only_inheritance } } + } + primary_title.var:can_keep_realm_law ?= flag:equal_law + } + } + } + } + can_pass = { + #can_change_to_equal_succession_law_trigger = yes + can_change_succession_law_trigger = yes + } + should_start_with = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = equal_law } + } + trigger_else = { + NOR = { + culture = { has_cultural_parameter = female_preference_inheritance } + culture = { has_cultural_tradition = tradition_nubian_warrior_queens } + } + faith = { + has_doctrine = doctrine_gender_equal + } + NOT = { has_realm_law = female_only_law } # For when female_only_law ceases to be valid + } + } + succession = { + gender_law = equal + } + flag = men_can_have_multiple_spouses + flag = men_can_have_consorts + flag = women_can_have_multiple_spouses + flag = women_can_have_consorts + + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + ai_will_do = { + if = { + limit = { + primary_title.tier > tier_county + faith = { + NOT = { + has_dominant_ruling_gender = prev + } + } + } + value = 2 + } + } + } + + female_preference_law = { + can_title_have = { + can_title_have_law_general_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_keep = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = female_preference_law } + } + trigger_else = { + custom_tooltip = { + text = female_preference_law_faith_or_culture_trigger + OR = { + faith = { + NOT = { has_doctrine = doctrine_gender_male_dominated } + } + culture = { has_cultural_parameter = female_preference_inheritance } + } + } + } + } + should_start_with = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = female_preference_law } + } + trigger_else = { + OR = { + culture = { has_cultural_parameter = female_preference_inheritance } + faith = { + has_doctrine = doctrine_gender_female_dominated + } + has_realm_law = female_only_law # For when male_only_law ceases to be a legal option + } + } + } + can_pass = { + can_change_succession_law_trigger = yes + } + succession = { + gender_law = female_preference + } + flag = women_can_have_multiple_spouses + flag = women_can_have_consorts + + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + } + + female_only_law = { + can_title_have = { + can_title_have_law_general_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_keep = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = female_only_law } + } + trigger_else = { + custom_tooltip = { + text = female_only_law_faith_or_culture_trigger + OR = { + faith = { has_doctrine = doctrine_gender_female_dominated } + culture = { has_cultural_parameter = female_only_inheritance } + } + } + } + } + can_pass = { + can_change_succession_law_trigger = yes + } + succession = { + gender_law = female_only + } + flag = women_can_have_multiple_spouses + flag = women_can_have_consorts + + pass_cost = { + prestige = change_succession_law_prestige_cost + } + revoke_cost = { + prestige = change_succession_law_prestige_cost + } + + should_start_with = { + trigger_if = { + limit = { + is_independent_ruler = no + has_government = administrative_government + } + top_liege = { has_realm_law = female_only_law } + } + trigger_else = { + culture = { has_cultural_parameter = female_only_inheritance } + } + } + } +} + +succession_faith = { + same_faith_only_law = { + can_keep = { + should_have_same_faith_succession_trigger = yes + } + can_pass = { + should_have_same_faith_succession_trigger = yes + } + should_start_with = { + should_have_same_faith_succession_trigger = yes + } + succession = { + faith = same_faith + } + } +} + +succession_rel_head = { + same_faith_theocratic_succession_law = { + can_keep = { + faith = { + religious_head = root + has_doctrine = doctrine_spiritual_head + } + } + succession = { + order_of_succession = theocratic + faith = same_faith + pool_character_config = pool_theocratic_succession + } + } + same_faith_succession_law = { + shown_in_encyclopedia = no + can_keep = { + faith = { + religious_head = root + has_doctrine = doctrine_temporal_head + } + } + succession = { + faith = same_faith + } + } +} diff --git a/common/laws/01_title_succession_laws.txt b/common/laws/01_title_succession_laws.txt new file mode 100644 index 00000000..7c946fb3 --- /dev/null +++ b/common/laws/01_title_succession_laws.txt @@ -0,0 +1,232 @@ +title_succession_laws = { + #Default Feudal Elective + feudal_elective_succession_law = { + can_have = { + government_has_flag = government_is_feudal + highest_held_title_tier >= tier_duchy + NOR = { #Cultures have their special flavor. + culture = { has_cultural_parameter = witenagemot_succession_enabled } + culture = { has_cultural_parameter = scandinavian_elective_enabled } + culture = { has_cultural_parameter = tribal_elective_enabled } #FP3 addition + } + } + can_pass = { + can_change_title_law_trigger = yes + } + can_title_have = { + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = feudal_elective + } + flag = elective_succession_law + title_allegiance_opinion = 10 + revoke_cost = { + prestige = change_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #HRE Succession + princely_elective_succession_law = { + can_have = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + highest_held_title_tier = tier_empire + } + can_pass = { + can_change_title_law_trigger = yes + } + can_title_have = { + this = title:e_hre + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = princely_elective + } + flag = elective_succession_law + title_allegiance_opinion = 10 + modifier = { + vassal_limit = 20 + minority_opinion = -15 + } + revoke_cost = { + prestige = change_hre_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #Witenagemot + saxon_elective_succession_law = { + can_have = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_tribal + } + highest_held_title_tier >= tier_kingdom + } + can_pass = { + can_change_title_law_trigger = yes + culture = { has_cultural_parameter = witenagemot_succession_enabled } + } + can_title_have = { + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = saxon_elective + } + flag = elective_succession_law + title_allegiance_opinion = 5 + revoke_cost = { + prestige = change_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #Thing + scandinavian_elective_succession_law = { + can_have = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_tribal + } + highest_held_title_tier >= tier_duchy + } + can_pass = { + can_change_title_law_trigger = yes + culture = { has_cultural_parameter = scandinavian_elective_enabled } + } + can_title_have = { + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = scandinavian_elective + } + flag = elective_succession_law + title_allegiance_opinion = 5 + revoke_cost = { + prestige = change_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #Tanistry + gaelic_elective_succession_law = { + can_have = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_tribal + } + highest_held_title_tier >= tier_duchy + } + can_pass = { + can_change_title_law_trigger = yes + custom_description = { + OR = { + culture = { has_cultural_pillar = heritage_brythonic } + culture = { has_cultural_pillar = heritage_goidelic } + } + text = succession_laws_must_have_valid_tanistry_culture + } + } + can_title_have = { + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = gaelic_elective + } + flag = elective_succession_law + title_allegiance_opinion = 5 + revoke_cost = { + prestige = change_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #Jirga elective + tribal_elective_succession_law = { #FOR FP3 + can_have = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + government_has_flag = government_is_tribal + } + highest_held_title_tier >= tier_kingdom + } + can_pass = { + can_change_title_law_trigger = yes + culture = { has_cultural_parameter = tribal_elective_enabled } + } + can_title_have = { + can_title_have_law_general_trigger = yes + } + succession = { + order_of_succession = election + election_type = tribal_elective + } + flag = elective_succession_law + title_allegiance_opinion = 5 + revoke_cost = { + prestige = change_title_succession_law_prestige_cost + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + } + } + + #Player Heir + temporal_head_of_faith_succession_law = { + can_title_have = { + is_temporal_head_of_faith_trigger = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_remove_from_title = { + custom_description = { + text = succession_laws_must_not_be_temporal + is_temporal_head_of_faith_trigger = no + } + } + succession = { + order_of_succession = player_heir + } + } + + #Noble Family Succession + noble_family_succession_law = { + can_title_have = { + is_noble_family_title = yes + } + should_show_for_title = { # Never show this in the UI, just apply it through script + always = no + } + can_remove_from_title = { + always = no + } + succession = { + order_of_succession = noble_family + } + flag = can_designate_heirs + } +} diff --git a/common/scripted_triggers/00_law_triggers.txt b/common/scripted_triggers/00_law_triggers.txt new file mode 100644 index 00000000..2b3ee5e5 --- /dev/null +++ b/common/scripted_triggers/00_law_triggers.txt @@ -0,0 +1,352 @@ + +character_gender_can_rule_title_trigger = { + trigger_if = { + limit = { + $GENDER$ = { is_male = yes } + exists = $TITLE$ + $TITLE$ = { + NOT = { + has_title_law = female_only_law + } + } + } + always = yes + } + trigger_else_if = { + limit = { + $GENDER$ = { is_female = yes } + exists = $TITLE$ + $TITLE$ = { + NOT = { + has_title_law = male_only_law + } + } + } + always = yes + } + trigger_else = { + always = no + } +} + +character_gender_can_inherit_from_trigger = { + save_temporary_scope_as = heir + + trigger_if = { + limit = { + $CHARACTER$ = { exists = primary_title } + } + $CHARACTER$ = { + character_gender_can_rule_title_trigger = { + GENDER = scope:heir + TITLE = primary_title + } + } + } + trigger_else = { + always = no + } +} + +has_partition_succession_realm_law_trigger = { + OR = { + has_realm_law = confederate_partition_succession_law + has_realm_law = partition_succession_law + has_realm_law = high_partition_succession_law + has_realm_law = clan_antagonistic_partition_succession_law + has_realm_law = clan_competitive_partition_succession_law + has_realm_law = clan_impassive_partition_succession_law + has_realm_law = clan_friendly_partition_succession_law + has_realm_law = clan_harmonious_partition_succession_law + } +} + +realm_law_use_crown_authority = { + # We separate this out into a different trigger for moddability purposes, per community request: this allows more diverse authority laws to be easily modded in without needing to override 00_realm_laws.txt, and thus for greater inter-mod compatibility. + realm_law_use_tribal_authority = no + realm_law_use_camp_purpose = no + realm_law_use_imperial_bureaucracy = no +} + +realm_law_use_tribal_authority = { + government_has_flag = government_is_tribal +} + +realm_law_use_camp_purpose = { + government_has_flag = government_is_landless_adventurer +} + +realm_law_use_imperial_bureaucracy = { + has_government = administrative_government +} + +can_have_confederate_partition_succession_law_trigger = { + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_tribal + } +} + +can_keep_partition_succession_law_trigger = { + # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. + trigger_if = { + limit = { + has_realm_law = partition_succession_law + } + OR = { + can_have_partition_succession_law_trigger = yes + + # Mongol Empires + has_title = title:e_mongol_empire + has_title = title:e_ilkhanate + has_title = title:e_golden_horde + has_title = title:e_chagatai + has_title = title:e_black_horde + has_title = title:e_white_horde + has_title = title:e_aarlud_khanate + has_title = title:e_togskol_khanate + has_title = title:e_baruun_khanate + } + } + NOT = { government_has_flag = government_is_clan } +} + +can_have_partition_succession_law_trigger = { + culture = { + has_innovation = innovation_hereditary_rule + } + custom_description = { + text = succession_laws_must_have_organised_government_tooltip + OR = { + government_has_flag = government_is_feudal + } + } +} + +can_keep_high_partition_succession_law_trigger = { + # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. + trigger_if = { + limit = { + has_realm_law = high_partition_succession_law + } + OR = { + can_have_high_partition_succession_law_trigger = yes + + # Mongol Empires + has_title = title:e_mongol_empire + has_title = title:e_ilkhanate + has_title = title:e_golden_horde + has_title = title:e_chagatai + has_title = title:e_black_horde + has_title = title:e_white_horde + has_title = title:e_aarlud_khanate + has_title = title:e_togskol_khanate + has_title = title:e_baruun_khanate + } + } + NOT = { government_has_flag = government_is_clan} +} + +can_have_high_partition_succession_law_trigger = { + trigger_if = { + limit = { + NOT = { + culture = { has_cultural_parameter = can_enact_high_partition_succession_law } + } + } + culture = { has_innovation = innovation_heraldry } + } + custom_description = { + text = succession_laws_must_have_organised_government_tooltip + OR = { + government_has_flag = government_is_feudal + } + } +} + +can_keep_single_heir_succession_law_trigger = { + # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. + trigger_if = { + limit = { + has_realm_law = single_heir_succession_law + } + OR = { + can_have_single_heir_succession_law_trigger = yes + # Byzantine Empire + historical_succession_access_single_heir_succession_law_trigger = yes + } + } +} + +can_have_single_heir_succession_law_trigger = { + culture = { + has_innovation = innovation_primogeniture + } + # Non-tribals only + custom_description = { + text = succession_laws_must_have_organised_government_tooltip + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + NOT = { has_government = administrative_government } +} + +can_keep_single_heir_youngest_succession_law_trigger = { + # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. + trigger_if = { + limit = { + has_realm_law = single_heir_succession_law_youngest + } + OR = { + can_have_single_heir_youngest_succession_law_trigger = yes + historical_succession_access_single_heir_succession_law_youngest_trigger = yes + } + } +} + +can_have_single_heir_youngest_succession_law_trigger = { + culture = { + has_innovation = innovation_primogeniture + } + # Non-tribals only + custom_description = { + text = succession_laws_must_have_organised_government_tooltip + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + NOT = { has_government = administrative_government } +} + +can_keep_single_heir_dynasty_house_trigger = { + # The 'can_keep' triggers are dependent on actually having the law. If they aren't, the trigger breakdown for the player breaks and shows incomplete information. + trigger_if = { + limit = { + has_realm_law = single_heir_dynasty_house + } + OR = { + can_have_single_heir_dynasty_house_trigger = yes + historical_succession_access_single_heir_dynasty_house_trigger = yes + } + } +} + +can_have_single_heir_dynasty_house_trigger = { + exists = house + trigger_if = { + limit = { + culture = { + OR = { + has_cultural_pillar = heritage_west_slavic + NOT = { has_innovation = innovation_heraldry } + } + } + } + culture = { + has_innovation = innovation_table_of_princes + } + } + trigger_else = { + culture = { + has_innovation = innovation_heraldry + } + } + custom_description = { + text = succession_laws_must_have_organised_government_tooltip + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + NOT = { has_government = administrative_government } +} + +can_have_bishop_theocratic_succession_law_trigger = { + OR = { + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } +} + +is_temporal_head_of_faith_trigger = { + is_head_of_faith = yes + holder.faith = { has_doctrine = doctrine_temporal_head } +} + +can_title_have_law_general_trigger = { + tier >= tier_duchy + is_temporal_head_of_faith_trigger = no +} + +can_have_holy_order_succession_law_trigger = { + government_has_flag = government_is_holy_order +} + +can_have_mercenary_succession_law_trigger = { + government_has_flag = government_is_mercenary +} + +can_have_city_succession_law_trigger = { + government_has_flag = government_is_republic +} + +title_can_reduce_partition_law_trigger = { + OR = { + AND = { + has_realm_law = single_heir_succession_law + holder = { + can_have_high_partition_succession_law_trigger = yes + } + } + AND = { + has_realm_law = high_partition_succession_law + holder = { + can_have_high_partition_succession_law_trigger = yes + } + } + AND = { + has_realm_law = partition_succession_law + holder = { + can_have_confederate_partition_succession_law_trigger = yes + } + } + } +} + +can_pass_law_ca1_trigger = { + culture = { has_innovation = innovation_plenary_assemblies } +} + +can_pass_law_ca2_trigger = { + culture = { has_innovation = innovation_royal_prerogative } +} + +can_pass_law_ca3_trigger = { + culture = { has_innovation = innovation_royal_prerogative } +} + +can_have_acclamation_succession_law_trigger = { + has_ep3_dlc_trigger = yes + has_government = administrative_government + is_independent_ruler = yes +} + +can_keep_acclamation_succession_law_trigger = { + has_ep3_dlc_trigger = yes + trigger_if = { + limit = { + has_realm_law = acclamation_succession_law + } + OR = { + can_have_acclamation_succession_law_trigger = yes + has_title = title:e_britannia + } + } +} + +can_change_acclamation_succession_law_trigger = { + has_ep3_dlc_trigger = yes +} diff --git a/common/succession_appointment/admin_emperor.txt b/common/succession_appointment/admin_emperor.txt new file mode 100644 index 00000000..24584d48 --- /dev/null +++ b/common/succession_appointment/admin_emperor.txt @@ -0,0 +1,973 @@ +admin_emperor = { + default_candidates = { holder_close_family landed_vassal } + invested_candidates = { holder_close_extended_family landed_vassal_close_extended_family unlanded_noble_close_extended_family unlanded_noble_house_head } + + allow_children = yes + + candidate_score = { + value = { + # AGE + if = { + limit = { age <= 5 } + subtract = { + value = 100 + desc = infant_candidate_desc + } + } + else_if = { + limit = { age < 10 } + subtract = { + value = 50 + desc = child_candidate_desc + } + } + else_if = { + limit = { age < 16 } + subtract = { + value = 20 + desc = adolescent_candidate_desc + } + } + else_if = { + limit = { age > 60 } + subtract = { + value = 20 + desc = geriatric_candidate_desc + } + } + + # SKILLS + add = { + value = { + add = diplomacy + add = learning + add = martial + add = intrigue + add = stewardship + multiply = 2 + } + desc = sum_of_skills_desc + } + + # TRAITS + if = { + limit = { + has_trait = born_in_the_purple + } + add = { + value = 50 + desc = trait_born_in_the_purple + } + } + if = { + limit = { + has_trait = disfigured + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_disfigured + } + } + if = { + limit = { has_trait = clubfooted } + subtract = { + value = 15 + desc = trait_clubfooted + } + } + if = { + limit = { has_trait = dwarf } + subtract = { + value = 15 + desc = trait_dwarf + } + } + if = { + limit = { has_trait = hunchbacked } + subtract = { + value = 15 + desc = trait_hunchbacked + } + } + if = { + limit = { has_trait = lisping } + subtract = { + value = 20 + desc = trait_lisping + } + } + if = { + limit = { + OR = { + has_trait = inbred + has_trait = spindly + has_trait = scaly + has_trait = albino + has_trait = wheezing + has_trait = bleeder + has_trait = infirm + } + } + subtract = { + value = 50 + desc = negative_trait_succession + } + } + if = { + limit = { + has_trait = incapable + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_incapable + } + } + if = { + limit = { + has_trait = blind + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_blind + } + } + if = { + limit = { + has_trait = eunuch_1 + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_eunuch + } + } + if = { + limit = { + has_trait = beardless_eunuch + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1500 + desc = trait_beardless_eunuch + } + } + if = { + limit = { + has_trait = disinherited + scope:title.holder.culture = { has_cultural_parameter = physical_disfigurement_blocks_inheritance } + } + subtract = { + value = 1000 + desc = trait_disinherited + } + } + if = { + limit = { has_trait = gallivanter } + subtract = { + value = 1000 + desc = trait_gallivanter + } + } + + # CRIMINAL + if = { + limit = { + has_trait = deviant + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "deviant_and_criminal_desc" + } + } + if = { + limit = { + has_trait = incestuous + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "incestuous_and_criminal_desc" + } + } + if = { + limit = { + has_trait = sodomite + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "sodomite_and_criminal_desc" + } + } + if = { + limit = { + has_trait = cannibal + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "cannibal_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_1 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "kinslayer_1_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_2 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "kinslayer_2_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_3 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "kinslayer_3_and_criminal_desc" + } + } + if = { + limit = { + has_trait = witch + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "witch_and_criminal_desc" + } + } + if = { + limit = { + has_trait = adulterer + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "adulterer_and_criminal_desc" + } + } + if = { + limit = { + has_trait = fornicator + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -20 + desc = "fornicator_and_criminal_desc" + } + } + + # COUNCIL POSITIONS + if = { + limit = { + top_liege ?= { + legitimacy_level >= 3 + any_councillor ?= { this = root } + } + } + add = { + value = 20 + desc = councillor_position_desc + } + } + else_if = { + limit = { + top_liege ?= { + any_councillor ?= { this = root } + } + } + add = { + value = 10 + desc = councillor_position_desc + } + } + + # COURT POSITIONS + if = { + limit = { + top_liege ?= { + legitimacy_level >= 3 + any_court_position_holder ?= { + this = root + } + } + } + add = { + value = 10 + desc = court_position_succession_desc + } + } + else_if = { + limit = { + top_liege ?= { + any_court_position_holder ?= { + this = root + } + } + } + add = { + value = 5 + desc = court_position_succession_desc + } + } + + # FAITH HOSTILITY + if = { + limit = { + top_liege.primary_title.state_faith ?= { + NOT = { this = root.faith } + faith_hostility_level = { + target = root.faith + value = faith_fully_accepted_level + } + } + } #Change to faith acceptance + subtract = { + value = 5 + desc = accepted_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value = faith_astray_level + } + } + } #Change to faith acceptance + subtract = { + value = 20 + desc = astray_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value = faith_hostile_level + } + } + } #Change to faith acceptance + subtract = { + value = 50 + desc = hostile_faith_succession_desc + } + } + else_if = { + limit = { + top_liege.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } #Change to faith acceptance + subtract = { + value = 100 + desc = evil_faith_sucession_desc + } + } + + # CLAIMS + if = { + limit = { has_strong_claim_on = scope:title } + add = { + value = 50 + desc = title_claim_desc + } + } + else_if = { + limit = { has_weak_claim_on = scope:title } + add = { + value = 30 + desc = title_weak_claim_desc + } + } + + # POPULAR OPINION + if = { + limit = { is_landed = yes } + add = { + value = { + value = capital_county.county_holder_opinion + multiply = 0.5 + } + desc = county_holder_opinion_desc + } + } + + # LIFESTYLE PERKS + if = { + limit = { has_perk = dignitas_perk } + add = { + value = 30 + desc = dignitas_perk_name + } + } + + #TITLE TIER + if = { + limit = { + is_landed = yes + highest_held_title_tier = tier_duchy + } + add = { + value = 10 + desc = duchy_tier_desc + } + } + if = { + limit = { + is_landed = yes + highest_held_title_tier = tier_kingdom + } + add = { + value = 20 + desc = kingdom_tier_desc + } + } + + #LOWBORN? EW no + if = { + limit = { + is_lowborn = yes + } + subtract = { + value = 100 + desc = lowborn_desc_succession + } + } + + #INFLUENCE LEVEL + if = { + limit = { + influence_level = 0 + } + subtract = { + value = 20 + desc = "[influence_level|E]" + } + } + if = { + limit = { + influence_level >= 2 + } + add = { + value = 20 + multiply = { + value = influence_level + subtract = 1 # Base value should start at 2 + } + desc = "[influence_level|E]" + } + } + + #DIFFERENT CULTURE FROM IMPERIAL CAPITAL + if = { + limit = { + root.top_liege.capital_county.culture ?= { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value = 0 + } + } + } + subtract = { + value = 50 + desc = no_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 20 + } + } + } + subtract = { + value = 40 + desc = terrible_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 40 + } + } + } + subtract = { + value = 30 + desc = poor_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 60 + } + } + } + subtract = { + value = 20 + desc = mediocre_cultural_acceptance + } + } + else_if = { + limit = { + root.top_liege.capital_county.culture ?= { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 80 + } + } + } + subtract = { + value = 10 + desc = accepted_foreign_culture + } + } + + #ELDEST ELIGIBLE CHILD OF EMPEROR + if = { + limit = { + scope:title.holder = { + OR = { + has_realm_law = male_preference_law + has_realm_law = male_only_law + } + } + is_male = yes + is_child_of = scope:title.holder + is_eunuch_trigger = no + NOT = { has_trait = bastard } + any_sibling = { + count = 0 + is_male = yes + age > prev.age + is_eunuch_trigger = no + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_son_desc + } + } + else_if = { + limit = { + scope:title.holder = { + OR = { + has_realm_law = female_preference_law + has_realm_law = female_only_law + } + } + is_female = yes + is_child_of = scope:title.holder + NOT = { has_trait = bastard } + any_sibling = { + count = 0 + is_female = yes + age > prev.age + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_daughter_desc + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = equal_law + } + is_eunuch_trigger = no + NOT = { has_trait = bastard } + is_child_of = scope:title.holder + any_sibling = { + count = 0 + age > prev.age + is_eunuch_trigger = no + NOT = { has_trait = bastard } + } + } + add = { + value = 30 + multiply = scope:title.holder.legitimacy_level + desc = eldest_imperial_child_desc + } + } + #CLOSE FAMILY + else_if = { + limit = { + is_close_family_of = scope:title.holder + } + add = { + value = 20 + multiply = scope:title.holder.legitimacy_level + desc = imperial_close_family_desc + } + } + #EXTENDED FAMILY + else_if = { + limit = { + is_close_or_extended_family_of = scope:title.holder + } + add = { + value = 15 + multiply = scope:title.holder.legitimacy_level + desc = imperial_close_extended_family_desc + } + } + #SAME HOUSE + else_if = { + limit = { + house = top_liege.house + } + add = { + value = 10 + multiply = scope:title.holder.legitimacy_level + desc = imperial_same_house_desc + } + } + + #SPOUSE AND THEIR FAMILY + if = { + limit = { + is_spouse_of = scope:title.holder + } + add = { + value = 4 + multiply = scope:title.holder.legitimacy_level + desc = spouse_of_emperor_desc + } + } + if = { + limit = { + scope:title.holder = { + any_spouse = { is_close_family_of = root } + NOT = { is_close_family_of = root } + } + } + add = { + value = 4 + multiply = scope:title.holder.legitimacy_level + desc = close_family_married_to_holder_desc + } + } + + #FRIENDS OF THE EMPEROR + if = { + limit = { + has_relation_friend = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 4 + desc = imperial_friend_desc + } + } + if = { + limit = { + has_relation_best_friend = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 8 + desc = imperial_best_friend_desc + } + } + if = { + limit = { + has_relation_guardian = scope:title.holder + } + add = { + value = scope:title.holder.legitimacy_level + multiply = 8 + desc = imperial_guardian_desc + } + } + if = { + limit = { + exists = house + } + # All get to use their Family Rating + add = { + value = house.house_power_score + multiply = 0.5 + desc = "[powerful_family_rating|E]" + } + } + + #CO-EMPEROR OF EMPEROR + if = { + limit = { + is_diarch_of_target = scope:title.holder + scope:title.holder = { character_has_co_emperorship_trigger = yes } + } + # Once for their raw status. + add = { + value = 50 + desc = imperial_co_emperor_desc + } + # And once again for their actual power. + add = { + value = scope:title.holder.diarchy_swing + desc = imperial_diarch_desc + } + } + #OTHER DIARCHS OF EMPEROR + else_if = { + limit = { + is_diarch_of_target = scope:title.holder + # Civil servants excluded. + scope:title.holder = { + NOT = { has_diarchy_active_parameter = diarchy_is_primeministership } + } + } + add = { + value = scope:title.holder.diarchy_swing + desc = imperial_diarch_desc + } + } + + # MODIFIERS + if = { + limit = { + has_character_flag = patriarch_support_2030 + } + add = { + value = 10 + desc = patriarch_support_2030_desc + } + } + + if = { + limit = { has_character_modifier = restored_greek_theme_modifier } + add = { + value = 50 + desc = restored_greek_theme_modifier + } + } + if = { + limit = { + has_character_flag = decried_weakness_score + } + add = { + value = 20 + desc = decried_weakness_score_desc + } + } + if = { + limit = { + has_character_flag = insulted_trait_candidate_score + } + add = { + value = 15 + desc = insulted_trait_score_desc + } + } + if = { + limit = { + has_character_flag = boosted_by_sycophant_score + } + add = { + value = 15 + desc = boosted_by_sycophant_score_desc + } + } + + # SCHEMES + if = { + limit = { + has_character_modifier = scheme_slandered_modifier + } + add = { + value = slander_acclamation_score_value + desc = scheme_slandered_modifier + } + } + if = { + limit = { + has_character_modifier = scheme_promoted_modifier + } + add = { + value = promote_acclamation_score_value # Keep this balanced if more values are added! + desc = scheme_promoted_modifier + } + } + + # Renounced imperial aspriations (from decision) + if = { + limit = { + OR = { + has_character_modifier = ep3_admin_renounce_throne_personal + house ?= { has_house_modifier = ep3_admin_renounce_throne_house } + } + } + add = { + value = -1000 + desc = admin_renounced_throne + } + } + + # ADJUST BASED ON GENDER LAW - MUST GO AT THE END + save_temporary_value_as = pre_gender_law_calc + if = { # If the temp value is negative, flip it for the coming calculations + limit = { scope:pre_gender_law_calc < 0 } + if = { + limit = { + scope:title.holder = { + has_realm_law = male_preference_law + } + is_female = yes + } + subtract = { + value = scope:pre_gender_law_calc + multiply = -1 + multiply = 0.5 + desc = male_preference_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = male_only_law + } + is_female = yes + } + multiply = { + value = 0 + desc = male_only_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = female_preference_law + } + is_female = no + } + subtract = { + value = scope:pre_gender_law_calc + multiply = -1 + multiply = 0.5 + desc = female_only_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = female_only_law + } + is_female = no + } + multiply = { + value = 0 + desc = female_only_law + } + } + } + else = { + if = { + limit = { + scope:title.holder = { + has_realm_law = male_preference_law + } + is_female = yes + } + subtract = { + value = scope:pre_gender_law_calc + multiply = 0.5 + desc = male_preference_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = male_only_law + } + is_female = yes + } + multiply = { + value = 0 + desc = male_only_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = female_preference_law + } + is_female = no + } + subtract = { + value = scope:pre_gender_law_calc + multiply = 0.5 + desc = female_only_law + } + } + else_if = { + limit = { + scope:title.holder = { + has_realm_law = female_only_law + } + is_female = no + } + multiply = { + value = 0 + desc = female_only_law + } + } + } + + # ROUND THE NUMBER + divide = 1 + ceiling = yes + multiply = 1 + } + } +} diff --git a/common/succession_appointment/admin_governor.txt b/common/succession_appointment/admin_governor.txt new file mode 100644 index 00000000..d369e716 --- /dev/null +++ b/common/succession_appointment/admin_governor.txt @@ -0,0 +1,480 @@ +admin_governor = { + default_candidates = { holder_close_family } + invested_candidates = { holder_house_member landed_vassal landed_vassal_house_member unlanded_noble_house_head unlanded_noble_close_family } + + candidate_score = { + value = { + # Base - Based on skills + add = { + value = martial + add = diplomacy + add = stewardship + add = intrigue + add = learning + multiply = 1 + desc = sum_of_skills_desc + } + + # Traits + if = { + limit = { + OR = { + has_trait = blind + has_trait = incapable + has_trait = infirm + } + } + subtract = { + value = 50 + desc = negative_trait_succession + } + } + if = { + limit = { has_trait = disinherited } + subtract = { + value = 200 + desc = trait_disinherited + } + } + if = { + limit = { has_trait = gallivanter } + subtract = { + value = 200 + desc = trait_gallivanter + } + } + # CRIMINAL + if = { + limit = { + has_trait = deviant + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "deviant_and_criminal_desc" + } + } + if = { + limit = { + has_trait = incestuous + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "incestuous_and_criminal_desc" + } + } + if = { + limit = { + has_trait = sodomite + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "sodomite_and_criminal_desc" + } + } + if = { + limit = { + has_trait = cannibal + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = cannibal FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "cannibal_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_1 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_1 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "kinslayer_1_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_2 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_2 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "kinslayer_2_and_criminal_desc" + } + } + if = { + limit = { + has_trait = kinslayer_3 + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = kinslayer_3 FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "kinslayer_3_and_criminal_desc" + } + } + if = { + limit = { + has_trait = witch + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "witch_and_criminal_desc" + } + } + if = { + limit = { + has_trait = adulterer + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = adulterer FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "adulterer_and_criminal_desc" + } + } + if = { + limit = { + has_trait = fornicator + exists = top_liege.primary_title.state_faith + trait_is_criminal_in_faith_trigger = { TRAIT = fornicator FAITH = top_liege.primary_title.state_faith GENDER_CHARACTER = root } + } + add = { + value = -30 + desc = "fornicator_and_criminal_desc" + } + } + + # COUNCIL POSITIONS + if = { + limit = { + scope:title.holder ?= { + any_councillor ?= { this = root } + } + } + add = { + value = 20 + multiply = scope:title.holder.governor_efficiency + desc = councillor_position_governor_desc + } + } + # COURT POSITIONS + if = { + limit = { + scope:title.holder ?= { + any_court_position_holder ?= { + this = root + } + } + } + add = { + value = 5 + multiply = scope:title.holder.governor_efficiency + desc = court_position_succession_governor_desc + } + } + + # FAITH HOSTILITY + if = { + limit = { + scope:title.holder.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value = faith_astray_level + } + } + } #Change to faith acceptance + subtract = { + value = 10 + desc = astray_faith_succession_desc + } + } + if = { + limit = { + scope:title.holder.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value = faith_hostile_level + } + } + } #Change to faith acceptance + subtract = { + value = 25 + desc = hostile_faith_succession_desc + } + } + if = { + limit = { + scope:title.holder.primary_title.state_faith ?= { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } #Change to faith acceptance + subtract = { + value = 50 + desc = evil_faith_sucession_desc + } + } + + # CLAIMS + if = { + limit = { has_strong_claim_on = scope:title } + add = { + value = 25 + desc = title_claim_desc + } + } + else_if = { + limit = { has_weak_claim_on = scope:title } + add = { + value = 15 + desc = title_weak_claim_desc + } + } + + # POPULAR OPINION + if = { + limit = { is_landed = yes } + add = { + value = { + value = capital_county.county_holder_opinion + multiply = 0.25 + } + desc = county_holder_opinion_desc + } + } + + # PERKS + if = { + limit = { has_perk = ducal_conquest_perk } + add = { + value = 30 + desc = ducal_conquest_perk_name + } + } + + # LOWBORN? EW no + if = { + limit = { + is_lowborn = yes + } + subtract = { + value = 25 + desc = lowborn_desc_succession + } + } + + # INFLUENCE LEVEL + if = { + limit = { + influence_level = 0 + } + subtract = { + value = 10 + desc = "[influence_level|E]" + } + } + if = { + limit = { + influence_level >= 2 + } + add = { + value = 10 + multiply = { + value = influence_level + subtract = 1 # Base value should start at 2 + } + desc = "[influence_level|E]" + } + } + + #SAME CULTURE AS REGION + if = { + limit = { culture ?= scope:title.holder.capital_county.culture } + add = { + value = 10 + desc = of_local_culture_succession_desc + } + } + + # Personal reasons + if = { + limit = { + scope:title.holder ?= { is_close_family_of = root } + } + add = { + value = 10 + multiply = scope:title.holder.governor_efficiency + desc = "close_family_holder_desc" + } + } + else_if = { + limit = { + scope:title.holder ?= { + any_spouse = { is_close_family_of = root } + NOT = { is_close_family_of = root } + } + } + add = { + value = 10 + desc = "close_family_married_to_holder_desc" + } + } + + #FRIENDS OF THE HOLDER + if = { + limit = { + scope:title.holder ?= { has_relation_friend = root } + } + add = { + value = 5 + multiply = scope:title.holder.governor_efficiency + desc = governor_friend_desc + } + } + if = { + limit = { + scope:title.holder ?= { has_relation_best_friend = root } + } + add = { + value = 15 + multiply = scope:title.holder.governor_efficiency + desc = governor_best_friend_desc + } + } + + #REGENT OF EMPEROR + if = { + limit = { scope:title.holder.diarch ?= root } + add = { + value = scope:title.holder.diarchy_swing + desc = governor_diarch_desc + } + } + + # Schemes + if = { + limit = { has_character_modifier = scheme_slandered_modifier } + add = { + value = slander_appointment_score_value + desc = scheme_slandered_modifier + } + } + if = { + limit = { has_character_modifier = scheme_promoted_modifier } + add = { + value = promote_appointment_score_value # Keep this balanced if more values are added! + desc = scheme_promoted_modifier + } + } + + # Decisions + if = { + limit = { + has_character_modifier = ep3_integration_promoter_modifier + has_variable = integration_promoted_in + var:integration_promoted_in.duchy ?= scope:title + } + add = { + value = 30 + desc = ep3_integration_promoter_modifier + } + } + + # PETITION + if = { + limit = { scope:title.var:petition_house_rights ?= house } + add = { + value = 250 + desc = petition_liege_house_province_rights_value_desc + } + } + + # EXISTING GOVERNORSHIPS + if = { + limit = { is_governor = yes } + add = { + value = -1000 + desc = already_a_governor_tt + } + } + + #ADJUST BASED ON GENDER LAW - MUST GO AT THE END + if = { + limit = { + scope:title.holder.top_liege ?= { has_realm_law = male_preference_law } + is_female = yes + } + multiply = { + value = { + value = 1 + subtract = appointment_non_preferred_gender_penalty_value + } + desc = appointment_male_preference_desc + } + } + else_if = { + limit = { + scope:title.holder.top_liege ?= { has_realm_law = male_only_law } + is_female = yes + } + multiply = { + value = { + value = 1 + subtract = appointment_opposite_gender_penalty_value + } + desc = appointment_male_only_desc + } + } + else_if = { + limit = { + scope:title.holder.top_liege ?= { has_realm_law = female_preference_law } + is_female = no + } + multiply = { + value = { + value = 1 + subtract = appointment_non_preferred_gender_penalty_value + } + desc = appointment_female_preference_desc + } + } + else_if = { + limit = { + scope:title.holder.top_liege ?= { has_realm_law = female_only_law } + is_female = no + } + multiply = { + value = { + value = 1 + subtract = appointment_opposite_gender_penalty_value + } + desc = appointment_female_only_desc + } + } + + # We remove all score from the emperor, to make sure you don't inherit governorships needlessly + if = { + limit = { + is_independent_ruler = yes + } + multiply = { + value = 0 + desc = appointment_is_top_liege + } + } + } + } +} diff --git a/common/succession_election/01_princely_elective.txt b/common/succession_election/01_princely_elective.txt new file mode 100644 index 00000000..be88abbe --- /dev/null +++ b/common/succession_election/01_princely_elective.txt @@ -0,0 +1,226 @@ +# The entry should be named in the same way that the elective succession law is named to define it's voter's logic. +# Root scope - Elector, the character voting in the election. +# scope:candidate scope - Candidate, Character considered for the title. +# scope:title scope - Title, The title the nomination is for. +# scope:holder scope - Ruler, The ruler currently holding the title. +# scope:holder_candidate scope - Favored Candidate, The title owner's candidate. +# The voter will vote for the top score candidate calculated from this script. + +princely_elective = { #HRE Elective. + elector_vote_strength = { + base = 1 + modifier = { #Imperial Dignity + desc = tooltip_feudal_vote_strength_emperor_tier + add = 2 + highest_held_title_tier = 5 + } + modifier = { #Royal Dignity + desc = tooltip_feudal_vote_strength_king_tier + add = 1 + highest_held_title_tier = 4 + } + modifier = { #Powerful Vassal + desc = tooltip_feudal_vote_strength_powerful_vassal + add = { + value = 1 + if = { #Additional point if the vassal is more powerful than the current ruler (Vassal King who meets this condition will have more voting power than the Emperor himself (1+1+1+2 = 5)) + limit = { + max_military_strength > scope:holder.max_military_strength + } + add = 2 + } + } + NOT = { this = scope:holder } + is_powerful_vassal = yes + liege = scope:holder + } + modifier = { #Clerical Influence + desc = tooltip_feudal_vote_strength_theocrat + add = 2 + NOT = { this = scope:holder } + OR = { + government_has_flag = government_is_theocracy + has_council_position = councillor_court_chaplain + } + faith = scope:holder.faith + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + NOT = { root = scope:holder.faith.religious_head } + } + modifier = { #Papal Influence + desc = tooltip_feudal_vote_strength_pope + add = 4 #If the Pope is an elector, his vote is the most important of all. + NOT = { this = scope:holder } + root = scope:holder.faith.religious_head + } + modifier = { #Regent Influence + desc = tooltip_feudal_vote_strength_is_diarch + add = 1 + is_diarch_of_target = scope:holder + } + } + + electors = { + max = 8 #Seven Prince-Electors + 1 Emperor. + add = holder #The Emperor + add = { + type = title_dejure_vassals + limit = { + scope:title = { #Either title is higher than Duke-tier, or must be primary. + OR = { + tier >= tier_kingdom + holder = { has_primary_title = prev } + } + } + OR = { #Either de facto direct vassal, or independent ruler who is de jure vassal. (no sub-vassals) + is_vassal_of = scope:holder + is_independent_ruler = yes + } + trigger_if = { #Must be true priests + limit = { government_has_flag = government_is_theocracy } + trigger_if = { + limit = { is_female = yes } + faith_dominant_gender_female_or_equal = yes + } + trigger_else = { faith_dominant_gender_male_or_equal = yes } + } + } + } + priority = { + base = 1 + modifier = { # The Emperor is always picked. + add = 200 + this = scope:holder + } + modifier = { # Prince-Electors. (specific titles, held by rulers of the same faith as the current holder) + add = 75 + faith = scope:holder.faith + any_held_title = { + is_target_in_global_variable_list = { name = hre_elector_list target = this } + } + } + + modifier = { #Fallback Electors + add = { + value = 10 + if = { #Slightly favor same faith first. + limit = { + faith = scope:holder.faith + } + add = 15 + } + if = { #Or compatible faith at least. + limit = { + faith = { + faith_hostility_level = { + target = scope:holder.faith + value = faith_fully_accepted_level + } + } + } + add = 5 + } + if = { #Slightly favor theocracies of same faith. + limit = { + government_has_flag = government_is_theocracy + faith = scope:holder.faith + } + add = 4 + } + if = { #Malus for other governments. + limit = { + government_has_flag = government_is_republic + } + subtract = 5 + } + if = { #Malus for other governments. + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_clan + government_has_flag = government_is_mercenary + government_has_flag = government_is_holy_order + } + } + subtract = 4 + } + if = { #Slight prioritization for same culture. + limit = { + culture = scope:holder.culture + } + add = 4 + } + # Favor higher tier titles + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + add = 5 + } + # Disfavor non-theocratic counts + if = { + limit = { + NOT = { government_has_flag = government_is_theocracy } + highest_held_title_tier < tier_duchy + } + subtract = 5 + } + } + } + } + } + + candidate_score = { + base = 0 + #Princely Elective uses very similar behavior to Feudal Elective. The few changes to the modifiers are already accounted for in the scripted_modifiers themselves. + ###################### Elector self-voting pattern ########################## + elector_self_voting_pattern_feudal_elective_modifier = yes + + ########################## Holder voting pattern ########################## + holder_voting_pattern_feudal_elective_modifier = yes + + ########################## Elector voting patterns (circumstances) ########################## + elector_voting_pattern_circumstances_feudal_elective_modifier = yes + + ########################## Elector voting patterns (prestige/piety) ########################## + elector_voting_pattern_prestige_piety_feudal_elective_modifier = yes + + ########################## Elector voting patterns (traits) ########################## + elector_voting_pattern_traits_feudal_elective_modifier = yes + + ########################## Elector voting patterns (opinion) ########################## + elector_voting_pattern_opinion_feudal_elective_modifier = yes + + ########################## Elector voting patterns (misc) ########################## + elector_voting_pattern_circumstances_misc_elective_modifier = yes + } + + #scope:candidate = Candidate, scope:title = Title, scope:holder_candidate = Candidate currently selected by ruler. + candidates = { + add = { + type = holder_direct_vassals + limit = { + feudal_elective_potential_landed_candidate_trigger = yes + } + } + add = { + type = title_dejure_vassals + limit = { + is_independent_ruler = yes #De jure vassals of the title who are not de facto vassals of the current ruler. + feudal_elective_potential_landed_candidate_trigger = yes + } + } + add = { + type = title_claimants + limit = { + feudal_elective_potential_landless_claimant_candidate_trigger = yes + } + } + add = { + type = holder_close_or_extended_family + limit = { + is_close_family_of = scope:holder + feudal_elective_potential_landless_dynastic_candidate_trigger = yes + } + } + } +} diff --git a/common/succession_election/common - Shortcut.lnk b/common/succession_election/common - Shortcut.lnk new file mode 100644 index 00000000..6059850e Binary files /dev/null and b/common/succession_election/common - Shortcut.lnk differ diff --git a/gfx/interface/icons/culture_innovations/innovation_firearms.dds b/gfx/interface/icons/culture_innovations/innovation_firearms.dds new file mode 100644 index 00000000..efe12d76 --- /dev/null +++ b/gfx/interface/icons/culture_innovations/innovation_firearms.dds @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:691e0ec59b4ce14433d6b7eb93804947dc7b0d4d8e7a387748273a8ee5828763 +size 14728