diff --git a/common/character_interactions/00_grant_titles_interaction.txt b/common/character_interactions/00_grant_titles_interaction.txt index 92d37eca4..a481cf974 100644 --- a/common/character_interactions/00_grant_titles_interaction.txt +++ b/common/character_interactions/00_grant_titles_interaction.txt @@ -316,7 +316,59 @@ grant_titles_interaction = { } auto_accept = yes - + pre_auto_accept = { + if = { + limit = { + scope:government_type = { + OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_theocracy } + } + scope:previous_holder ?= { + government_has_flag = government_is_administrative + } + } + scope:recipient = { + add_character_flag = granted_title_government_blocker + } + if = { + limit = { + scope:title.tier = tier_empire + } + scope:previous_holder = { + change_influence = monumental_influence_gain + add_gold = monumental_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_kingdom + } + scope:previous_holder = { + change_influence = massive_influence_gain + add_gold = massive_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_duchy + } + scope:previous_holder = { + change_influence = major_influence_gain + add_gold = major_gold_max_value + } + } + else_if = { + limit = { + scope:title.tier = tier_county + } + scope:previous_holder = { + change_influence = medium_influence_gain + add_gold = medium_gold_max_value + } + } + else = { + } + } + } on_auto_accept = { scope:recipient = { trigger_event = char_interaction.0110 @@ -1390,57 +1442,6 @@ grant_titles_interaction = { } } } - if = { - limit = { - scope:government_type = { - OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_theocracy } - } - scope:previous_holder ?= { - government_has_flag = government_is_administrative - } - } - scope:recipient = { - add_character_flag = { flag = granted_title_government_cooldown years = 30 } - } - if = { - limit = { - scope:title.tier = tier_empire - } - scope:previous_holder = { - change_influence = monumental_influence_gain - add_gold = monumental_gold_max_value - } - } - else_if = { - limit = { - scope:title.tier = tier_kingdom - } - scope:previous_holder = { - change_influence = massive_influence_gain - add_gold = massive_gold_max_value - } - } - else_if = { - limit = { - scope:title.tier = tier_duchy - } - scope:previous_holder = { - change_influence = major_influence_gain - add_gold = major_gold_max_value - } - } - else_if = { - limit = { - scope:title.tier = tier_county - } - scope:previous_holder = { - change_influence = medium_influence_gain - add_gold = medium_gold_max_value - } - } - else = { - } - } #Opinion loss with underlings who think they should get the title you're granting if = { limit = { @@ -1499,6 +1500,702 @@ grant_titles_interaction = { claimant_rivalry_mercy_effect = yes } } + + if = { + limit = { + scope:puppet_or_actor ?= { + government_has_mechanic = administrative + highest_held_title_tier >= tier_county + } + } + + if = { + limit = { + scope:recipient = { + is_acclaimed = yes + liege = { + this = scope:puppet_or_actor + } + } + } + custom_tooltip = grant_title_landing_acclaimed_knight_warning + } + grant_title_holy_order_patronage_warning_effect = yes + + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_duchy + title_capital_county = { + culture != scope:puppet_or_actor.culture + culture = scope:recipient.culture + } + NOT = { + recent_history = { + type = granted + years = 10 + } + } + } + } + scope:recipient.culture = { + change_cultural_acceptance = { + target = scope:puppet_or_actor.culture + value = grant_title_cultural_acceptance_impact + desc = cultural_acceptance_gain_granted_title + } + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_county + } + scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_give_prestige } + exists = scope:puppet_or_actor.house + exists = scope:recipient.house + scope:puppet_or_actor.house = scope:recipient.house + } + scope:puppet_or_actor = { + add_prestige = { + value = 0 + every_in_list = { + list = target_titles + limit = { tier = tier_hegemony } + add = monumental_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_empire } + add = massive_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = major_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = medium_prestige_gain + } + } + } + } + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_county + } + scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_gives_renown } + exists = scope:puppet_or_actor.house + exists = scope:recipient.house + scope:puppet_or_actor.house = scope:recipient.house + } + scope:puppet_or_actor.dynasty = { + add_dynasty_prestige = { + value = 0 + every_in_list = { + list = target_titles + limit = { tier = tier_kingdom } + add = scope:puppet_or_actor.dynasty.major_dynasty_prestige_gain + } + every_in_list = { + list = target_titles + limit = { tier = tier_duchy } + add = scope:puppet_or_actor.dynasty.medium_dynasty_prestige_gain + } + } + } + } + + # Iterate over all given titles + # - Add opinion modifiers + # - Collect titles that discontent reduction can later be derived from + every_in_list = { + list = target_titles + save_temporary_scope_as = this_title + if = { + limit = { + exists = scope:landed_title + } + scope:recipient = { + # Add opinion based on title tier + if = { + limit = { + scope:this_title.tier = tier_county + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_county + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier = tier_duchy + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_duchy + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -10 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier = tier_kingdom + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_kingdom + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -30 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + + else_if = { + limit = { + scope:this_title.tier >= tier_empire + } + + hidden_effect = { + add_opinion = { + target = scope:puppet_or_actor + modifier = received_title_empire + } + if = { + limit = { + is_lowborn = yes + } + scope:puppet_or_actor = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:puppet_or_actor + modifier = courtly_lowborn_grant_opinion + opinion = -30 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility + } + } + } + } + } + + scope:this_title = { add_to_temporary_list = titles_to_grant } + } + } + + #Promised a vassal this title they had a claim on (vassal.2901) + if = { + limit = { + scope:puppet_or_actor = { + exists = var:was_promised_title + var:was_promised_title = scope:recipient + } + } + if = { + limit = { + scope:recipient = { + exists = var:promised_title + } + scope:landed_title = scope:recipient.var:promised_title + } + scope:puppet_or_actor = { + trigger_event = { + id = vassal.2910 + days = { 7 14 } + } + } + } + } + } + if = { + limit = { + scope:recipient = { + has_trait = bastard + } + } + custom_tooltip = grant_title_to_bastard_dynasty_warning + } + } # every_in_list + + # The accumulated discontent reduction of the recipient + scope:recipient = { + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = grant_title_opinion_sum_discontent_calc + } + } + + # Show stacked opinion gain + if = { + limit = { + any_in_list = { + list = target_titles + tier >= tier_empire + } + } + custom_tooltip = grant_title_modifier_stack_empires + } + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_kingdom + } + } + custom_tooltip = grant_title_modifier_stack_kingdoms + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_duchy + } + } + custom_tooltip = grant_title_modifier_stack_duchies + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + tier = tier_county + scope:puppet_or_actor = { min_appointment_tier = tier_county } + } + } + custom_tooltip = grant_title_modifier_stack_counties + } + + if = { + limit = { + trigger_if = { + limit = { scope:actor = { is_ai = no } } + scope:puppet_or_actor = { + any_vassal = { + vassal_stance = courtly + } + } + } + scope:recipient = { + is_lowborn = yes + } + any_in_list = { + list = titles_to_grant + tier >= tier_county + } + } + custom_tooltip = grant_title_modifier_courtly_lowborn_grant_penalty + } + if = { + limit = { + scope:recipient = { is_a_faction_member = yes } + } + custom_tooltip = grant_title_modifier_stack_discontent + } + + # Jealousy check + if = { + limit = { + any_in_list = { + list = titles_to_grant + any_claimant = { grant_title_rivalry_trigger = yes } + } + } + hidden_effect = { + random = { + chance = 25 + ordered_in_list = { + list = titles_to_grant + limit = { + any_claimant = { grant_title_rivalry_trigger = yes } + } + order_by = tier + save_scope_as = claim_title + ordered_claimant = { + limit = { grant_title_rivalry_trigger = yes } + order_by = primary_title.tier + save_scope_as = claim_vassal + if = { + limit = { + scope:recipient = { is_lowborn = yes } + } + scope:recipient = { save_scope_as = lowborn_scope } + } + else_if = { + limit = { + scope:recipient = { has_claim_on = scope:claim_title } + } + scope:recipient = { save_scope_as = claimant_scope } + } + scope:puppet_or_actor = { + trigger_event = { + id = bp1_yearly.8070 + days = 5 + } + } + } + } + } + } + } + + scope:puppet_or_actor = { + # Maintenance for runestones + if = { + limit = { + # Use expanded version if we have FP1. + has_fp1_dlc_trigger = yes + fp1_remove_stele_new_holder_trigger = { + TITLE = scope:target + PREVIOUS_HOLDER = scope:puppet_or_actor + NEW_HOLDER = scope:recipient + } + } + # Actually removed in fp1_other_decisions.0113 + custom_tooltip = runestone_grant_title_warning + } + else_if = { + limit = { + scope:target = { + exists = var:ancestor_to_bury + has_county_modifier = county_raised_runestone_modifier + } + NOT = { scope:recipient.dynasty = var:ancestor_to_bury.dynasty } #We only have to change something if the new holder is of a different dynasty + } + # Actually removed in religious_decision.0312 + custom_tooltip = runestone_grant_title_warning + } + if = { + limit = { + has_pam_dlc_trigger = yes + scope:target = { + exists = var:pam_khachkar_ancestor + has_county_modifier = pam_khachkar_ancestral_county + } + NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } + } + custom_tooltip = pam_khachkar_grant_title_warning + } + + if = { + limit = { + dynasty ?= { has_dynasty_perk = ep1_culture_legacy_3 } + scope:recipient = { + is_playable_character = no + culture != scope:puppet_or_actor.culture + any_in_list = { + list = target_titles + OR = { + tier = tier_county + tier = tier_barony + } + culture = scope:recipient.culture + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:recipient + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:recipient + } + } + } + + #Feedback for actor + hidden_effect = { + if = { + limit = { + NOT = { exists = scope:recipient_is_independent } + scope:recipient = { + any_held_title = { + title_tier > barony + NOT = { is_in_list = target_titles } + } + } + } + set_variable = { + name = lower_count + value = { + value = -1 + every_in_list = { + list = target_titles + limit = { + NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } + } + add = 1 + } + } + } + save_scope_value_as = { + name = equal_count + value = { + value = 0 + every_in_list = { + list = target_titles + limit = { tier = scope:puppet_or_actor.highest_held_title_tier } + add = 1 + } + } + } + ordered_in_list = { + list = target_titles + order_by = tier + save_temporary_scope_as = loc_title + } + send_interface_toast = { + type = event_toast_effect_neutral + title = grant_governorship_interaction_notification + left_icon = scope:recipient + right_icon = scope:loc_title + if = { + limit = { scope:puppet_or_actor.var:lower_count ?= 0 } + custom_tooltip = grant_governorship_interaction_notification_effect_2 + } + else_if = { + limit = { + exists = scope:puppet_or_actor.var:lower_count + scope:puppet_or_actor.var:lower_count > 1 + } + custom_tooltip = grant_governorship_interaction_notification_effect_3 + } + else_if = { + limit = { scope:puppet_or_actor.var:lower_count ?= 1 } + custom_tooltip = grant_governorship_interaction_notification_effect_4 + } + else_if = { + limit = { + scope:equal_count >= 1 + scope:recipient.top_liege ?= scope:puppet_or_actor.top_liege + } + custom_tooltip = grant_titles_interaction_notification_effect_5 + } + else = { custom_tooltip = grant_titles_interaction_notification_effect } + if = { + limit = { + exists = dynasty + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + remove_variable = lower_count + } + } + } + } + + hidden_effect = { + # Struggle Catalyst + if = { + limit = { + scope:puppet_or_actor = { + is_diff_faith_or_culture_trigger = { + CHAR = scope:recipient + STATUS = involved + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + } + scope:puppet_or_actor = { + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal + character = scope:puppet_or_actor + } + } + } + } + } + + # Achievements. + scope:actor = { + if = { + limit = { + has_variable_list = candidate_a_knights_tale_achievement + is_target_in_variable_list = { + name = candidate_a_knights_tale_achievement + target = scope:recipient + } + } + set_global_variable = { + name = finished_a_knights_tale_achievement + value = yes + } + } + } + # TGP Catalyst - triggered in on_title_gain + if = { + limit = { + title:h_china.holder ?= scope:puppet_or_actor + any_in_list = { + list = target_titles + OR = { + AND = { + tier = tier_empire + scope:recipient.merit_level < 7 + } + AND = { + tier = tier_kingdom + scope:recipient.merit_level < 5 + } + AND = { + tier = tier_duchy + scope:recipient.merit_level < 3 + } + AND = { + tier = tier_county + scope:recipient.merit_level < 1 + } + } + } + } + show_as_tooltip = { + situation:dynastic_cycle ?= { + if = { + limit = { + situation_top_has_catalyst = catalyst_hegemon_appointing_low_merit_governor + title:h_china.holder = scope:puppet_or_actor + } + trigger_situation_catalyst = { + catalyst = catalyst_hegemon_appointing_low_merit_governor + character = scope:recipient + } + } + } + } + } + #Opinion loss with underlings who think they should get the title you're granting + if = { + limit = { + #AI will usually grant title to de jure holders, it's players who could use this steering + scope:actor = { + is_ai = no + } + } + if = { + limit = { + any_in_list = { + list = titles_to_grant + any_claimant = { + this = scope:recipient + } + } + } + ordered_in_list = { + order_by = tier + list = titles_to_grant + limit = { + any_claimant = { + this = scope:recipient + } + } + save_scope_as = highest_claim + } + scope:recipient = { claimant_jealousy_immunity_effect = yes } + } + every_in_list = { + list = titles_to_grant + save_scope_as = title_granted + scope:puppet_or_actor = { + title_granting_controversy_effect = { + TITLE = scope:title_granted + INTERACTION = grant_governorship_interaction + } + } + } + every_in_list = { + list = strong_claimants + limit = { + NOT = { this = scope:recipient } + } + save_scope_as = claimer + ordered_in_list = { + order_by = tier + list = titles_to_grant + limit = { + any_claimant = { + this = scope:claimer + } + } + save_scope_as = highest_denied_claim + } + claimant_rivalry_mercy_effect = yes + } + } + custom_tooltip = influence_award_notification + } custom_tooltip = influence_award_notification } } @@ -1511,1080 +2208,7 @@ grant_title_to_new_random_character_interaction = { use_diplomatic_range = no ai_frequency = 6 - is_valid_showing_failures_only = { - scope:puppet_or_actor = { - this != scope:recipient - any_held_title = { - count > 1 - } - } - } - on_accept = { - scope:recipient = { - add_character_flag = { flag = granted_title_government_cooldown years = 30 } - } - } -} - -# Be aware that the actual granting of the title happens in code! -# See 'grant_titles_interaction' for functionality of granting different government types. -grant_governorship_interaction = { - icon = grant_governorship - category = interaction_category_vassal - common_interaction = yes - - desc = grant_governorship_interaction_desc - - special_interaction = grant_governorship_interaction - interface = grant_titles - target_type = title - target_source = puppet_or_actor - target_filter = domain_titles - interface_priority = 60 - - ai_frequency = 6 - # actor character giving the titles - # recipient character receiving the titles - - is_shown = { - scope:puppet_or_actor != scope:recipient - scope:recipient = { - OR = { - target_is_liege_or_above = scope:puppet_or_actor - is_pool_guest_of = scope:puppet_or_actor - } - } - scope:puppet_or_actor ?= { - government_has_mechanic = administrative - highest_held_title_tier >= tier_county - } - - trigger_if = { - limit = { - scope:actor = { is_ai = yes } - } - scope:recipient = { - NOT = { any_parent = { is_ai = no } } - } - } - } - - is_valid_showing_failures_only = { - scope:puppet_or_actor = { - custom_tooltip = { - text = grant_governorship_interaction_no_title_tt - any_held_title = { - tier >= tier_county - is_noble_family_title = no - is_landless_type_title = no - NOR = { - this = scope:puppet_or_actor.capital_county - this = scope:puppet_or_actor.primary_title - } - } - } - } - scope:recipient = { - is_adult = yes - NOT = { is_at_war_with = scope:puppet_or_actor } - bp2_valid_for_standard_interactions_trigger = yes - trigger_if = { - limit = { is_ruler = no } - is_imprisoned = no - } - government_has_mechanic = administrative - # Only the preferred gender can be appointed unless they hold titles already - trigger_if = { - limit = { - scope:puppet_or_actor = { - OR = { - has_realm_law = male_only_law - has_realm_law = male_preference_law - } - } - is_landed = no - } - custom_tooltip = { - text = recipient_cannot_be_appointed_gender_laws_tt - is_female = no - } - } - trigger_if = { - limit = { - scope:puppet_or_actor = { - OR = { - has_realm_law = female_only_law - has_realm_law = female_preference_law - } - } - is_landed = no - } - custom_tooltip = { - text = recipient_cannot_be_appointed_gender_laws_tt - is_female = yes - } - } - # DON'T TAKE OTHER PLAYERS' ACCLAIMED KNIGHTS - custom_description = { - text = grant_title_stealing_acclaimed_knight - subject = scope:recipient - NOR = { - AND = { - is_acclaimed = yes - liege ?= { - is_ai = no - this != scope:puppet_or_actor - } - } - AND = { - is_acclaimed = yes - scope:actor = { is_ai = yes } - } - } - } - is_clergy = no - # Gallivanters won't accept additional responsibilities. - NOT = { has_trait = gallivanter } - # TGP JAPAN - tgp_japan_grant_titles_restriction_trigger = { - GRANTER = scope:puppet_or_actor - GRANTEE = scope:recipient - } - # Cannot be a minister - custom_tooltip = { - text = recipient_is_a_minister_desc - tgp_is_any_minister = no - } - } - } - - can_send = { - scope:recipient = { - custom_tooltip = { - text = promote_candidate_interaction_existing_holder_tt - this != scope:target.holder - } - - trigger_if = { # Governors can only be appointed to certain titles - limit = { - is_governor = yes - scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary - } - custom_tooltip = { # Only one province of highest rank - text = only_one_province_of_highest_rank_tt - NAND = { - highest_held_title_tier = scope:target.tier - scope:target.tier >= tier_duchy - scope:target = { # We make an exception if recipient controls at least one de jure county - any_de_jure_county = { - count < 1 - OR = { - holder = scope:recipient - holder = { is_vassal_or_below_of = scope:recipient } - } - } - } - } - } - custom_tooltip = { - text = admin_must_be_de_jure_or_neighboring - any_held_title = { - OR = { - # The target title is part of your de jure structure - is_de_jure_liege_or_above_target = scope:target - target_is_de_jure_liege_or_above = scope:target - # Or is a neighboring county which de jure duchy is not part of your realm - AND = { - NOT = { tier = tier_barony } - any_title_to_title_neighboring_county = { this = scope:target } - scope:target = { - tier = tier_county - duchy = { - OR = { - NOT = { exists = holder } - holder = { - NOR = { - is_vassal_or_below_of = scope:puppet_or_actor - this = scope:puppet_or_actor - } - } - } - } - } - } - } - } - } - } - trigger_if = { # If recipient is landless and only have a family title, target title must be a duchy or above - limit = { - is_landless_ruler = yes - any_held_title = { is_noble_family_title = yes } - scope:target.tier < min_appointment_tier - } - primary_title.tier <= scope:target.tier - } - trigger_if = { # If recipient is a count, they can get only get counties within the same duchy - limit = { - highest_held_title_tier = tier_county - main_administrative_tier > tier_county - is_landed = yes - scope:target.tier = tier_county - } - custom_tooltip = { - text = admin_count_grant_only_counties - any_held_title = { duchy = scope:target.duchy } - } - } - tgp_is_ceremonial_liege_trigger = no - } - } - - can_be_picked_title = { - scope:target = { - is_leased_out = no - - scope:recipient = { - trigger_if = { # Governors can only be appointed to certain titles - limit = { - is_governor = yes - scope:target = { is_noble_family_title = no } # For tooltip reasons, so we don't show more than necessary - } - custom_tooltip = { # Only one province of highest rank - text = only_one_province_of_highest_rank_tt - NAND = { - highest_held_title_tier = scope:target.tier - scope:target.tier >= main_administrative_tier - trigger_if = { - limit = { - scope:target.tier >= tier_duchy - } - scope:target = { # We make an exception if recipient controls at least one de jure county - any_de_jure_county = { - count < 1 - OR = { - holder = scope:recipient - holder = { is_vassal_or_below_of = scope:recipient } - } - } - } - } - } - } - custom_tooltip = { - text = admin_must_be_de_jure_or_neighboring - any_held_title = { - OR = { - # The target title is part of your de jure structure - is_de_jure_liege_or_above_target = scope:target - target_is_de_jure_liege_or_above = scope:target - # Or is a neighboring county which de jure duchy is not part of your realm - AND = { - tier >= tier_county - any_title_to_title_neighboring_county = { this = scope:target } - scope:target = { - tier = tier_county - duchy = { - OR = { - NOT = { exists = holder } - holder = { - NOR = { - is_vassal_or_below_of = scope:puppet_or_actor - this = scope:puppet_or_actor - } - } - } - } - } - } - } - } - } - } - trigger_if = { # If recipient is landless and only have a family title, target title must be a duchy or above - limit = { - is_landless_ruler = yes - any_held_title = { is_noble_family_title = yes } - scope:target.tier < min_appointment_tier - } - primary_title.tier <= scope:target.tier - } - trigger_if = { # If recipient is a count, they can get only get counties within the same duchy - limit = { - highest_held_title_tier = tier_county - main_administrative_tier > tier_county - is_landed = yes - scope:target.tier = tier_county - } - custom_tooltip = { - text = admin_count_grant_only_counties - any_held_title = { duchy = scope:target.duchy } - } - } - tgp_is_ceremonial_liege_trigger = no - } - - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_ADMIN_PRIMARY - this != scope:puppet_or_actor.capital_province.duchy - } - - trigger_if = { - limit = { is_noble_family_title = yes } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_NOBLE_FAMILY - always = no - } - } - trigger_if = { - limit = { exists = var:ceremonial_title } - custom_tooltip = { - text = GRANT_TITLES_ITEM_CANT_GIVE_CEREMONIAL_TITLE - always = no - } - } - - trigger_if = { - limit = { - list_size:target_titles > 0 - } - custom_tooltip = { - text = GRANT_TITLES_ITEM_ADMIN_CANT_GIVE_MORE_THAN_ONE - any_in_list = { - list = target_titles - scope:target ?= this - } - } - } - - trigger_if = { - limit = { scope:target = title:k_fashion } - NOT = { scope:target = title:k_fashion } - } - } - - custom_description = { - text = grant_titles_interaction_can_only_give_diarch_de_jure_liege_to_diarch - subject = scope:puppet_or_actor.diarch - NAND = { - # Only applies if we have an active diarchy. - scope:puppet_or_actor = { has_active_diarchy = yes } - # Now, prevent us from giving away our diarch's land to invalidate them... - scope:target = { - any_dejure_vassal_title_holder = { this = scope:puppet_or_actor.diarch } - # ... _unless_ we're giving it _to_ the diarch. - scope:recipient != scope:puppet_or_actor.diarch - # Plus we only care if the title is below our tier. - tier < scope:puppet_or_actor.highest_held_title_tier - } - } - } - - custom_description = { - text = grant_titles_interaction_title_being_wagered - NOT = { - scope:target = { has_variable = wagered_county } - } - } - } - - auto_accept = yes - - on_auto_accept = { - scope:recipient = { - trigger_event = { - id = char_interaction.0111 - delayed = yes #this has to be delayed in case you grant it to someone that doesn't have an estate yet, for the change_government effect to work and generate the estate - } - } - } - - on_accept = { - if = { - limit = { - scope:recipient = { - is_acclaimed = yes - liege = { - this = scope:puppet_or_actor - } - } - } - custom_tooltip = grant_title_landing_acclaimed_knight_warning - } - grant_title_holy_order_patronage_warning_effect = yes - - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_duchy - title_capital_county = { - culture != scope:puppet_or_actor.culture - culture = scope:recipient.culture - } - NOT = { - recent_history = { - type = granted - years = 10 - } - } - } - } - scope:recipient.culture = { - change_cultural_acceptance = { - target = scope:puppet_or_actor.culture - value = grant_title_cultural_acceptance_impact - desc = cultural_acceptance_gain_granted_title - } - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_county - } - scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_give_prestige } - exists = scope:puppet_or_actor.house - exists = scope:recipient.house - scope:puppet_or_actor.house = scope:recipient.house - } - scope:puppet_or_actor = { - add_prestige = { - value = 0 - every_in_list = { - list = target_titles - limit = { tier = tier_hegemony } - add = monumental_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_empire } - add = massive_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_kingdom } - add = major_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_duchy } - add = medium_prestige_gain - } - } - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_county - } - scope:puppet_or_actor.culture = { has_cultural_parameter = landing_house_members_gives_renown } - exists = scope:puppet_or_actor.house - exists = scope:recipient.house - scope:puppet_or_actor.house = scope:recipient.house - } - scope:puppet_or_actor.dynasty = { - add_dynasty_prestige = { - value = 0 - every_in_list = { - list = target_titles - limit = { tier = tier_kingdom } - add = scope:puppet_or_actor.dynasty.major_dynasty_prestige_gain - } - every_in_list = { - list = target_titles - limit = { tier = tier_duchy } - add = scope:puppet_or_actor.dynasty.medium_dynasty_prestige_gain - } - } - } - } - - # Iterate over all given titles - # - Add opinion modifiers - # - Collect titles that discontent reduction can later be derived from - every_in_list = { - list = target_titles - save_temporary_scope_as = this_title - if = { - limit = { - exists = scope:landed_title - } - scope:recipient = { - # Add opinion based on title tier - if = { - limit = { - scope:this_title.tier = tier_county - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_county - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier = tier_duchy - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_duchy - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -10 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier = tier_kingdom - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_kingdom - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -30 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - - else_if = { - limit = { - scope:this_title.tier >= tier_empire - } - - hidden_effect = { - add_opinion = { - target = scope:puppet_or_actor - modifier = received_title_empire - } - if = { - limit = { - is_lowborn = yes - } - scope:puppet_or_actor = { - every_vassal = { - vassal_stance = courtly - add_opinion = { - target = scope:puppet_or_actor - modifier = courtly_lowborn_grant_opinion - opinion = -30 #less than usual because admin realms are more tolerant of bureaucratic "new" nobility - } - } - } - } - } - - scope:this_title = { add_to_temporary_list = titles_to_grant } - } - } - - #Promised a vassal this title they had a claim on (vassal.2901) - if = { - limit = { - scope:puppet_or_actor = { - exists = var:was_promised_title - var:was_promised_title = scope:recipient - } - } - if = { - limit = { - scope:recipient = { - exists = var:promised_title - } - scope:landed_title = scope:recipient.var:promised_title - } - scope:puppet_or_actor = { - trigger_event = { - id = vassal.2910 - days = { 7 14 } - } - } - } - } - } - if = { - limit = { - scope:recipient = { - has_trait = bastard - } - } - custom_tooltip = grant_title_to_bastard_dynasty_warning - } - } # every_in_list - - # The accumulated discontent reduction of the recipient - scope:recipient = { - if = { - limit = { - is_a_faction_member = yes - } - add_joined_faction_discontent = grant_title_opinion_sum_discontent_calc - } - } - - # Show stacked opinion gain - if = { - limit = { - any_in_list = { - list = target_titles - tier >= tier_empire - } - } - custom_tooltip = grant_title_modifier_stack_empires - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_kingdom - } - } - custom_tooltip = grant_title_modifier_stack_kingdoms - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - tier = tier_duchy - } - } - custom_tooltip = grant_title_modifier_stack_duchies - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - tier = tier_county - scope:puppet_or_actor = { min_appointment_tier = tier_county } - } - } - custom_tooltip = grant_title_modifier_stack_counties - } - - if = { - limit = { - trigger_if = { - limit = { scope:actor = { is_ai = no } } - scope:puppet_or_actor = { - any_vassal = { - vassal_stance = courtly - } - } - } - scope:recipient = { - is_lowborn = yes - } - any_in_list = { - list = titles_to_grant - tier >= tier_county - } - } - custom_tooltip = grant_title_modifier_courtly_lowborn_grant_penalty - } - if = { - limit = { - scope:recipient = { is_a_faction_member = yes } - } - custom_tooltip = grant_title_modifier_stack_discontent - } - - # Jealousy check - if = { - limit = { - any_in_list = { - list = titles_to_grant - any_claimant = { grant_title_rivalry_trigger = yes } - } - } - hidden_effect = { - random = { - chance = 25 - ordered_in_list = { - list = titles_to_grant - limit = { - any_claimant = { grant_title_rivalry_trigger = yes } - } - order_by = tier - save_scope_as = claim_title - ordered_claimant = { - limit = { grant_title_rivalry_trigger = yes } - order_by = primary_title.tier - save_scope_as = claim_vassal - if = { - limit = { - scope:recipient = { is_lowborn = yes } - } - scope:recipient = { save_scope_as = lowborn_scope } - } - else_if = { - limit = { - scope:recipient = { has_claim_on = scope:claim_title } - } - scope:recipient = { save_scope_as = claimant_scope } - } - scope:puppet_or_actor = { - trigger_event = { - id = bp1_yearly.8070 - days = 5 - } - } - } - } - } - } - } - - scope:puppet_or_actor = { - # Maintenance for runestones - if = { - limit = { - # Use expanded version if we have FP1. - has_fp1_dlc_trigger = yes - fp1_remove_stele_new_holder_trigger = { - TITLE = scope:target - PREVIOUS_HOLDER = scope:puppet_or_actor - NEW_HOLDER = scope:recipient - } - } - # Actually removed in fp1_other_decisions.0113 - custom_tooltip = runestone_grant_title_warning - } - else_if = { - limit = { - scope:target = { - exists = var:ancestor_to_bury - has_county_modifier = county_raised_runestone_modifier - } - NOT = { scope:recipient.dynasty = var:ancestor_to_bury.dynasty } #We only have to change something if the new holder is of a different dynasty - } - # Actually removed in religious_decision.0312 - custom_tooltip = runestone_grant_title_warning - } - if = { - limit = { - has_pam_dlc_trigger = yes - scope:target = { - exists = var:pam_khachkar_ancestor - has_county_modifier = pam_khachkar_ancestral_county - } - NOT = { scope:recipient.dynasty = scope:target.var:pam_khachkar_ancestor.dynasty } - } - custom_tooltip = pam_khachkar_grant_title_warning - } - - if = { - limit = { - dynasty ?= { has_dynasty_perk = ep1_culture_legacy_3 } - scope:recipient = { - is_playable_character = no - culture != scope:puppet_or_actor.culture - any_in_list = { - list = target_titles - OR = { - tier = tier_county - tier = tier_barony - } - culture = scope:recipient.culture - } - } - } - if = { - limit = { - can_add_hook = { - target = scope:recipient - type = favor_hook - } - } - add_hook = { - type = favor_hook - target = scope:recipient - } - } - } - - #Feedback for actor - hidden_effect = { - if = { - limit = { - NOT = { exists = scope:recipient_is_independent } - scope:recipient = { - any_held_title = { - title_tier > barony - NOT = { is_in_list = target_titles } - } - } - } - set_variable = { - name = lower_count - value = { - value = -1 - every_in_list = { - list = target_titles - limit = { - NOT = { tier = scope:puppet_or_actor.highest_held_title_tier } - } - add = 1 - } - } - } - save_scope_value_as = { - name = equal_count - value = { - value = 0 - every_in_list = { - list = target_titles - limit = { tier = scope:puppet_or_actor.highest_held_title_tier } - add = 1 - } - } - } - ordered_in_list = { - list = target_titles - order_by = tier - save_temporary_scope_as = loc_title - } - send_interface_toast = { - type = event_toast_effect_neutral - title = grant_governorship_interaction_notification - left_icon = scope:recipient - right_icon = scope:loc_title - if = { - limit = { scope:puppet_or_actor.var:lower_count ?= 0 } - custom_tooltip = grant_governorship_interaction_notification_effect_2 - } - else_if = { - limit = { - exists = scope:puppet_or_actor.var:lower_count - scope:puppet_or_actor.var:lower_count > 1 - } - custom_tooltip = grant_governorship_interaction_notification_effect_3 - } - else_if = { - limit = { scope:puppet_or_actor.var:lower_count ?= 1 } - custom_tooltip = grant_governorship_interaction_notification_effect_4 - } - else_if = { - limit = { - scope:equal_count >= 1 - scope:recipient.top_liege ?= scope:puppet_or_actor.top_liege - } - custom_tooltip = grant_titles_interaction_notification_effect_5 - } - else = { custom_tooltip = grant_titles_interaction_notification_effect } - if = { - limit = { - exists = dynasty - is_diff_faith_or_culture_trigger = { - CHAR = scope:recipient - STATUS = involved - } - any_character_struggle = { - involvement = involved - has_struggle_phase_parameter = struggle_grant_titles_diff_faith_culture_gives_prestige - } - } - dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } - } - remove_variable = lower_count - } - } - } - } - - hidden_effect = { - # Struggle Catalyst - if = { - limit = { - scope:puppet_or_actor = { - is_diff_faith_or_culture_trigger = { - CHAR = scope:recipient - STATUS = involved - } - any_character_struggle = { - involvement = involved - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal - CHAR = scope:recipient - } - } - } - } - scope:puppet_or_actor = { - every_character_struggle = { - involvement = involved - limit = { - activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { - CATALYST = catalyst_grant_privilege_to_diff_faith_culture_vassal - CHAR = scope:recipient - } - } - activate_struggle_catalyst = { - catalyst = catalyst_grant_privilege_to_diff_faith_culture_vassal - character = scope:puppet_or_actor - } - } - } - } - } - - # Achievements. - scope:actor = { - if = { - limit = { - has_variable_list = candidate_a_knights_tale_achievement - is_target_in_variable_list = { - name = candidate_a_knights_tale_achievement - target = scope:recipient - } - } - set_global_variable = { - name = finished_a_knights_tale_achievement - value = yes - } - } - } - # TGP Catalyst - triggered in on_title_gain - if = { - limit = { - title:h_china.holder ?= scope:puppet_or_actor - any_in_list = { - list = target_titles - OR = { - AND = { - tier = tier_empire - scope:recipient.merit_level < 7 - } - AND = { - tier = tier_kingdom - scope:recipient.merit_level < 5 - } - AND = { - tier = tier_duchy - scope:recipient.merit_level < 3 - } - AND = { - tier = tier_county - scope:recipient.merit_level < 1 - } - } - } - } - show_as_tooltip = { - situation:dynastic_cycle ?= { - if = { - limit = { - situation_top_has_catalyst = catalyst_hegemon_appointing_low_merit_governor - title:h_china.holder = scope:puppet_or_actor - } - trigger_situation_catalyst = { - catalyst = catalyst_hegemon_appointing_low_merit_governor - character = scope:recipient - } - } - } - } - } - #Opinion loss with underlings who think they should get the title you're granting - if = { - limit = { - #AI will usually grant title to de jure holders, it's players who could use this steering - scope:actor = { - is_ai = no - } - } - if = { - limit = { - any_in_list = { - list = titles_to_grant - any_claimant = { - this = scope:recipient - } - } - } - ordered_in_list = { - order_by = tier - list = titles_to_grant - limit = { - any_claimant = { - this = scope:recipient - } - } - save_scope_as = highest_claim - } - scope:recipient = { claimant_jealousy_immunity_effect = yes } - } - every_in_list = { - list = titles_to_grant - save_scope_as = title_granted - scope:puppet_or_actor = { - title_granting_controversy_effect = { - TITLE = scope:title_granted - INTERACTION = grant_governorship_interaction - } - } - } - every_in_list = { - list = strong_claimants - limit = { - NOT = { this = scope:recipient } - } - save_scope_as = claimer - ordered_in_list = { - order_by = tier - list = titles_to_grant - limit = { - any_claimant = { - this = scope:claimer - } - } - save_scope_as = highest_denied_claim - } - claimant_rivalry_mercy_effect = yes - } - } + pre_auto_accept = { if = { limit = { scope:government_type = { @@ -2595,7 +2219,7 @@ grant_governorship_interaction = { } } scope:recipient = { - add_character_flag = { flag = granted_title_government_cooldown years = 30 } + add_character_flag = granted_title_government_blocker } if = { limit = { @@ -2636,6 +2260,60 @@ grant_governorship_interaction = { else = { } } - custom_tooltip = influence_award_notification + } + is_valid_showing_failures_only = { + scope:puppet_or_actor = { + this != scope:recipient + any_held_title = { + count > 1 + } + } + } + on_accept = { + } +} + +# Be aware that the actual granting of the title happens in code! +# See 'grant_titles_interaction' for functionality of granting different government types. +grant_governorship_interaction = { + icon = grant_governorship + category = interaction_category_vassal + common_interaction = yes + hidden = yes + + desc = grant_governorship_interaction_desc + + special_interaction = grant_governorship_interaction + interface = grant_titles + target_type = title + target_source = puppet_or_actor + target_filter = domain_titles + interface_priority = 60 + + ai_frequency = 6 + # actor character giving the titles + # recipient character receiving the titles + + is_shown = { + always = no + } + + is_valid_showing_failures_only = { + always = no + } + + can_send = { + always = no + } + + can_be_picked_title = { + } + + auto_accept = yes + + on_auto_accept = { + } + + on_accept = { } } diff --git a/common/character_interactions/06_ep3_interactions.txt b/common/character_interactions/06_ep3_interactions.txt index cfce52d86..c4c7a048b 100644 --- a/common/character_interactions/06_ep3_interactions.txt +++ b/common/character_interactions/06_ep3_interactions.txt @@ -2495,10 +2495,10 @@ demand_admin_interaction = { category = interaction_category_vassal icon = demand_admin_interaction - ai_maybe = yes + ai_maybe = no ai_min_reply_days = 4 ai_max_reply_days = 9 - can_send_despite_rejection = yes + can_send_despite_rejection = no ai_accept_negotiation = yes popup_on_receive = yes common_interaction = no @@ -2549,7 +2549,7 @@ demand_admin_interaction = { } scope:recipient = { NOT = { - has_variable = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker } OR = { prestige_level < 2 @@ -2584,7 +2584,7 @@ demand_admin_interaction = { is_landed = yes is_ruler = yes NOT = { - has_variable = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker } OR = { prestige_level < 2 @@ -2773,10 +2773,6 @@ demand_admin_interaction = { factor = 0 scope:recipient = { is_powerful_vassal = yes } } - modifier = { - factor = 0 - scope:recipient = { is_powerful_agent = yes } - } modifier = { factor = 0 scope:recipient.house = { is_powerful_family = yes } diff --git a/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt b/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt index 7a9c626c6..5003cf36f 100644 --- a/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt +++ b/common/decisions/dlc_decisions/ep_3/06_ep3_admin_decisions.txt @@ -20,14 +20,14 @@ estate_hire_agents_decisions = { desc = estate_hire_agents_decisions_desc selection_tooltip = estate_hire_agents_decisions_tooltip decision_group_type = admin - + cooldown = { years = 15 } - + is_shown = { - has_ep3_dlc_trigger = yes domicile ?= { has_domicile_parameter = estate_unlock_hire_agents_decision } + has_ep3_dlc_trigger = yes } is_valid = { @@ -43,7 +43,7 @@ estate_hire_agents_decisions = { years = 15 } } - + cost = { influence = major_influence_value } @@ -104,14 +104,14 @@ estate_bolster_security_decision = { desc = estate_bolster_security_decision_desc selection_tooltip = estate_bolster_security_decision_tooltip decision_group_type = admin - + cooldown = { years = 15 } - + is_shown = { - has_ep3_dlc_trigger = yes domicile ?= { has_domicile_parameter = estate_unlock_bolster_security_decision } + has_ep3_dlc_trigger = yes } is_valid = { @@ -127,7 +127,7 @@ estate_bolster_security_decision = { years = 15 } } - + cost = { influence = major_influence_value } @@ -184,14 +184,14 @@ estate_governor_patrols_decision = { desc = estate_governor_patrols_decision_desc selection_tooltip = estate_governor_patrols_decision_tooltip decision_group_type = admin - + cooldown = { years = 15 } - + is_shown = { - has_ep3_dlc_trigger = yes domicile ?= { has_domicile_parameter = estate_unlock_patrol_decision } + has_ep3_dlc_trigger = yes } is_valid = { @@ -224,7 +224,7 @@ estate_governor_patrols_decision = { } increase_governance_effect = { VALUE = 6 } } - + cost = { gold = { value = 0 @@ -245,11 +245,11 @@ estate_governor_patrols_decision = { } } } - + ai_potential = { is_governor = yes } - + ai_will_do = { base = 20 modifier = { @@ -305,14 +305,14 @@ estate_granary_decision = { desc = estate_granary_decision_desc selection_tooltip = estate_granary_decision_tooltip decision_group_type = admin - + cooldown = { years = 20 } - + is_shown = { - has_ep3_dlc_trigger = yes domicile ?= { has_domicile_parameter = estate_unlock_granary_decision } + has_ep3_dlc_trigger = yes } is_valid = { @@ -326,7 +326,7 @@ estate_granary_decision = { modifier = ep3_estate_granary_modifier years = 10 } - + # Descriptions - Make sure the triggers below matches the ones in the granary_modifier_scaling_value scripted value save_scope_as = domicile_owner # We save it for the descriptions custom_description_no_bullet = { text = estate_unlock_granary_decision_factors_tt } @@ -413,15 +413,15 @@ estate_granary_decision = { custom_tooltip = estate_unlock_granary_decision_no_factors_tt } } - + cost = { prestige = major_prestige_value } - + ai_potential = { is_governor = yes } - + ai_will_do = { base = 20 modifier = { @@ -485,27 +485,27 @@ admin_confirmation_decision = { hegemony = 0 } sort_order = 1000 -# picture = { -# trigger = { -# NOR = { -# government_has_flag = government_is_tribal -# government_has_flag = government_is_theocracy -# top_liege ?= { government_has_flag = government_is_tribal } -# top_liege ?= { government_has_flag = government_is_theocracy } -# } -# OR = { -# culture = { has_cultural_pillar = heritage_byzantine } -# top_liege ?= { -# OR = { -# culture = { has_cultural_pillar = heritage_byzantine } -# capital_barony ?= title:b_constantinople -# is_roman_emperor_primary_title_trigger = yes -# } -# } -# } -# } -# reference = "gfx/interface/illustrations/decisions/ep3_cerimonial_decision.dds" -# } + picture = { + trigger = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_theocracy + top_liege ?= { government_has_flag = government_is_tribal } + top_liege ?= { government_has_flag = government_is_theocracy } + } + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + top_liege ?= { + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + capital_barony ?= title:b_constantinople + is_roman_emperor_primary_title_trigger = yes + } + } + } + } + reference = "gfx/interface/illustrations/decisions/ep3_cerimonial_decision.dds" + } picture = { reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds" } @@ -516,11 +516,11 @@ admin_confirmation_decision = { } is_shown = { - has_ep3_dlc_trigger = yes - is_playable_character = yes is_governor = yes liege ?= top_liege - top_liege = { tgp_is_ceremonial_regent_trigger = no } # Not 'actual' ruler + top_liege ?= { tgp_is_ceremonial_regent_trigger = no } # Not 'actual' ruler + has_ep3_dlc_trigger = yes + is_playable_character = yes } is_valid = { @@ -541,9 +541,9 @@ admin_confirmation_decision = { } custom_tooltip = { text = admin_confirmation_grace_valid_tt - NOR = { - has_variable = confirmation_grace - has_variable = confirmation_cooldown_vassal + has_none_of_variables = { + name = confirmation_grace + name = confirmation_cooldown_vassal } } } @@ -574,7 +574,7 @@ admin_confirmation_decision = { } custom_tooltip = admin_confirmation_decision_effects show_as_tooltip = { - stress_impact = { + stress_and_fulfillment_impact = { shy = medium_stress_impact_gain humble = medium_stress_impact_gain } @@ -599,7 +599,7 @@ admin_confirmation_decision = { on_arrival_destinations = all_but_last } } - + ai_potential = { is_at_war = no } @@ -650,20 +650,20 @@ consolidate_rule_decision = { desc = consolidate_rule_decision_desc selection_tooltip = consolidate_rule_decision_tooltip decision_group_type = admin - + cooldown = { years = 15 } - + is_shown = { - has_ep3_dlc_trigger = yes highest_held_title_tier >= tier_empire # Only for Emperors - culture = { # Byzantium and others + culture ?= { # Byzantium and others has_cultural_tradition = tradition_religious_patronage } - faith = { # You cannot consolidate yourself... kinda + faith ?= { # You cannot consolidate yourself... kinda religious_head ?= { this != root } } + has_ep3_dlc_trigger = yes } is_valid = { @@ -681,14 +681,14 @@ consolidate_rule_decision = { custom_tooltip = consolidate_rule_decision_effect_tt trigger_event = ep3_decisions_event.4050 } - + cost = { influence = medium_influence_value piety = medium_piety_value } ai_potential = { - highest_held_title_tier = tier_empire # Only for Emperors + highest_held_title_tier >= tier_empire # Only for Emperors culture = { # Byzantium and others has_cultural_tradition = tradition_religious_patronage } @@ -776,28 +776,30 @@ convert_to_administrative_decision = { hegemony = 2000 } + cooldown = { years = 20 } + is_shown = { - OR = { - has_ep3_dlc_trigger = yes - has_tgp_dlc_trigger = yes - } - NOT = { - has_variable = granted_title_government_cooldown - } OR = { government_has_flag = government_is_feudal government_has_flag = government_is_clan government_has_flag = government_is_japan_feudal } + NOT = { + has_character_flag = granted_title_government_blocker + } trigger_if = { limit = { top_liege != this } liege = { government_has_mechanic = administrative } } + OR = { + has_tgp_dlc_trigger = yes + has_ep3_dlc_trigger = yes + } } is_valid = { NOT = { - has_variable = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker } trigger_if = { limit = { top_liege != this } @@ -871,13 +873,13 @@ convert_to_administrative_decision = { culture = { has_cultural_tradition = tradition_legalistic } has_realm_law = crown_authority_3 capital_county = { development_level > medium_development_level } - faith = { has_doctrine = tenet_legalism } + rite = { rite_has_tenet = tenet_legalism } dynasty = { has_dynasty_perk = erudition_legacy_5 } dynasty = { has_dynasty_perk = law_legacy_5 } } } } - + is_valid_showing_failures_only = { OR = { has_ep3_dlc_trigger = yes @@ -1048,7 +1050,7 @@ convert_to_administrative_decision = { } max = 3000 - + if = { # Much cheaper for vassals wanting to adopt their admin liege's government limit = { top_liege != this @@ -1058,12 +1060,12 @@ convert_to_administrative_decision = { } } } - + widget = { gui = "decision_view_widget_generic_multichoice_with_effects" controller = decision_option_list_controller decision_to_second_step_button = "SELECT_ACTION" - show_from_start = no + show_from_start = yes item = { # Administrative value = go_administrative_government @@ -1072,10 +1074,9 @@ convert_to_administrative_decision = { } is_valid = { top_liege = { - NOR = { - has_government = celestial_government - has_government = meritocratic_government - has_government = japan_administrative_government + trigger_if = { + limit = { government_has_mechanic = administrative } + government_has_flag = government_is_administrative } } } @@ -1093,10 +1094,9 @@ convert_to_administrative_decision = { } is_valid = { top_liege = { - NOR = { - has_government = administrative_government - has_government = meritocratic_government - has_government = japan_administrative_government + trigger_if = { + limit = { government_has_mechanic = administrative } + government_has_flag = government_is_celestial } } custom_tooltip = { @@ -1118,10 +1118,9 @@ convert_to_administrative_decision = { } is_valid = { top_liege = { - NOR = { - has_government = administrative_government - has_government = celestial_government - has_government = japan_administrative_government + trigger_if = { + limit = { government_has_mechanic = administrative } + government_has_flag = government_is_meritocratic } } custom_tooltip = { @@ -1143,10 +1142,9 @@ convert_to_administrative_decision = { } is_valid = { top_liege = { - NOR = { - has_government = administrative_government - has_government = celestial_government - has_government = meritocratic_government + trigger_if = { + limit = { government_has_mechanic = administrative } + government_has_flag = government_is_japan_administrative } } custom_tooltip = { @@ -1202,23 +1200,23 @@ convert_to_administrative_decision = { VALUE = yes } } - #if = { - # limit = { - # is_ai = no - # religion = religion:islam_religion - # has_title = title:k_rum - # OR = { - # has_title = title:c_byzantion - # any_sub_realm_title = { - # this = title:c_byzantion - # } - # } - # } - # add_achievement_global_variable_effect = { - # VARIABLE = finished_new_management_achievement - # VALUE = yes - # } - #} + if = { + limit = { + is_ai = no + religion = religion:islam_religion + has_title = title:k_rum + OR = { + has_title = title:c_byzantion + any_sub_realm_title = { + this = title:c_byzantion + } + } + } + add_achievement_global_variable_effect = { + VARIABLE = finished_new_management_achievement + VALUE = yes + } + } } } @@ -1232,12 +1230,12 @@ convert_to_administrative_decision = { ai_will_do = { base = 0 - # modifier = { - # OR = { - # is_roman_emperor_primary_title_trigger = yes - # } - # add = 100 - # } + modifier = { + OR = { + is_roman_emperor_primary_title_trigger = yes + } + add = 100 + } modifier = { add = -20 } @@ -1280,9 +1278,9 @@ convert_to_administrative_decision = { modifier = { culture = { OR = { - has_cultural_pillar = ethos_bureaucratic - has_cultural_pillar = ethos_courtly - has_cultural_pillar = ethos_egalitarian + has_cultural_pillar = ethos_bureaucratic + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_egalitarian } } add = 50 @@ -1296,8 +1294,8 @@ convert_to_administrative_decision = { modifier = { culture = { OR = { - has_cultural_tradition = tradition_fp3_enlightened_magnates - has_cultural_tradition = tradition_loyal_soldiers + has_cultural_tradition = tradition_fp3_enlightened_magnates + has_cultural_tradition = tradition_loyal_soldiers } } add = 20 @@ -1332,12 +1330,18 @@ convert_to_administrative_decision = { culture = { OR = { has_cultural_pillar = ethos_stoic - has_cultural_pillar = ethos_bellicose - has_cultural_pillar = ethos_communal + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_communal } } add = -50 } + modifier = { + culture = { + culture_is_historically_admin_trigger = yes + } + add = 100 + } } } @@ -1354,16 +1358,16 @@ convert_to_feudalism_from_administrative_decision = { desc = convert_to_feudalism_from_administrative_decision_desc is_shown = { + government_has_mechanic = administrative + # Ritsuryo gov has its own decisions + NOT = { government_has_flag = government_is_japan_administrative } + tgp_is_any_minister = no trigger_if = { limit = { has_title = title:h_china } NOT = { government_has_flag = government_is_celestial } } - government_has_mechanic = administrative - tgp_is_ceremonial_liege_trigger = no tgp_is_ceremonial_regent_trigger = no - tgp_is_any_minister = no - # Ritsuryo gov has its own decisions - NOT = { government_has_flag = government_is_japan_administrative } + tgp_is_ceremonial_liege_trigger = no } is_valid = { @@ -1373,30 +1377,7 @@ convert_to_feudalism_from_administrative_decision = { is_independent_ruler = no } top_liege ?= { - trigger_if = { - limit = { - has_realm_law_in_group = imperial_bureaucracy - } - has_realm_law = imperial_bureaucracy_0 - } - trigger_if = { - limit = { - has_realm_law_in_group = celestial_bureaucracy - } - has_realm_law = celestial_bureaucracy_0 - } - trigger_if = { - limit = { - has_realm_law_in_group = meritocratic_bureaucracy - } - has_realm_law = meritocratic_bureaucracy_0 - } - trigger_if = { - limit = { - has_realm_law_in_group = japanese_bureaucracy - } - has_realm_law = japanese_bureaucracy_0 - } + realm_law_authority_level_0 = yes } custom_tooltip = { text = governorship_is_on_the_border_tt @@ -1495,7 +1476,7 @@ convert_to_feudalism_from_administrative_decision = { limit = { root.monthly_character_income >= 20 } multiply = 1.1 } - + # Vassals has a slightly reduced cost if = { limit = { @@ -1572,7 +1553,7 @@ convert_to_feudalism_from_administrative_decision = { limit = { root.monthly_character_income >= 20 } multiply = 1.1 } - + # Vassals has a slightly reduced cost if = { limit = { @@ -1649,13 +1630,13 @@ renounce_governorship_decision = { } desc = { first_valid = { - triggered_desc = { + triggered_desc = { trigger = { government_allows = merit } desc = renounce_governorship_decision_desc_merit } - triggered_desc = { + triggered_desc = { trigger = { government_is_japanese_trigger = yes } @@ -1710,7 +1691,7 @@ renounce_governorship_decision = { tgp_step_down_title_recipient_tooltip_effect = yes if = { limit = { - government_allows = merit + government_allows = merit } add_character_modifier = { modifier = ep3_renounced_governorship_merit @@ -1732,7 +1713,7 @@ renounce_governorship_decision = { years = 15 } } - else = { + else = { add_gold = massive_gold_value add_character_modifier = { modifier = ep3_renounced_governorship @@ -1753,7 +1734,7 @@ renounce_governorship_decision = { player = root } } - + cost = { influence = minor_influence_value } @@ -1867,19 +1848,16 @@ change_imperial_aspirations_decision = { decision_group_type = admin is_shown = { - has_ep3_dlc_trigger = yes - is_playable_character = yes government_has_flag = government_is_administrative liege ?= { has_realm_law = acclamation_succession_law } + is_playable_character = yes + has_ep3_dlc_trigger = yes } is_valid = { - custom_tooltip = { - text = has_admin_government - government_has_flag = government_is_administrative - } + government_has_flag = government_is_administrative trigger_if = { # Unavailable if you are the top liege - Unless you have either modifier, so you may remove it. limit = { top_liege = this @@ -1907,12 +1885,12 @@ change_imperial_aspirations_decision = { is_at_war_with_liege = no NOT = { top_liege ?= root } } - + widget = { gui = "decision_view_widget_generic_multichoice_with_effects" controller = decision_option_list_controller decision_to_second_step_button = "SELECT_ACTION" - #show_from_start = yes + show_from_start = yes ### Remove yourself from competing for the throne item = { diff --git a/common/decisions/dlc_decisions/mpo/mpo_decisions.txt b/common/decisions/dlc_decisions/mpo/mpo_decisions.txt index 7083fd643..83321d554 100644 --- a/common/decisions/dlc_decisions/mpo/mpo_decisions.txt +++ b/common/decisions/dlc_decisions/mpo/mpo_decisions.txt @@ -1,21 +1,30 @@ -call_for_confederation_decision = { +### Call for Confederation ### +call_for_confederation_decision = { picture = { reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" } decision_group_type = major - ai_check_interval = 8 + + ai_check_interval_by_tier = { + barony = 0 + county = 8 + duchy = 8 + kingdom = 0 + empire = 0 + hegemony = 0 + } desc = call_for_confederation_decision_desc selection_tooltip = call_for_confederation_decision_tooltip is_shown = { - highest_held_title_tier <= tier_duchy - is_playable_character = yes is_independent_ruler = yes + highest_held_title_tier <= tier_duchy NOR = { - has_character_flag = forming_confederation is_confederation_member = yes + has_character_flag = forming_confederation } + is_playable_character = yes } is_valid = { @@ -44,10 +53,19 @@ has_trait = conqueror has_trait = greatest_of_khans } - OR = { - has_trait = diplomat - has_trait = family_first - confederation_foe_trigger = { CHARACTER = root } + trigger_if = { + limit = { + NOT = { + culture = { + has_cultural_parameter = forming_confederations_is_easier + } + } + } #When adjusting, adjust culture_parameter_forming_confederations_is_easier string + OR = { + has_trait = diplomat + has_trait = family_first + confederation_foe_trigger = { CHARACTER = root } + } } #This is just meant to stop player exploits trigger_if = { @@ -64,21 +82,13 @@ is_valid_showing_failures_only = { age >= 6 + NOT = { has_trait = infirm } + is_available = yes trigger_if = { limit = { - is_ai = no + is_ai = yes } - NOT = { exists = involved_activity } - NOT = { has_trait = infirm } - is_physically_able = yes - is_travelling = no - } - trigger_else = { - is_imprisoned = no - is_incapable = no - is_alive = yes is_migrating = no - NOT = { has_trait = infirm } } } @@ -349,8 +359,7 @@ } #Another confederation of your culture already exists modifier = { - any_in_global_list = { - variable = confederations + any_confederation = { has_variable = confederation_culture var:confederation_culture = root.culture } @@ -358,28 +367,39 @@ } #There's already another confederation nearby modifier = { - any_in_global_list = { - variable = confederations - any_confederation_member = { - in_diplomatic_range = root - } + any_confederation = { + is_house_based = no # any_confederation_member is not performant for house blocs + any_confederation_member = { in_diplomatic_range = root } } factor = 0.1 } + modifier = { + add = 300 + culture = { has_cultural_parameter = forming_confederations_is_easier } + } } } +### Abandon Confederation ### leave_confederation_decision = { picture = { reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" } - ai_check_interval = 12 + + ai_check_interval_by_tier = { + barony = 0 + county = 12 + duchy = 12 + kingdom = 0 + empire = 0 + hegemony = 0 + } desc = leave_confederation_decision_desc selection_tooltip = leave_confederation_decision_tooltip is_shown = { - is_confederation_member = yes + confederation ?= { is_house_based = no } } is_valid = { @@ -389,20 +409,7 @@ leave_confederation_decision = { } is_valid_showing_failures_only = { - trigger_if = { - limit = { - is_ai = no - } - NOT = { exists = involved_activity } - is_physically_able = yes - is_travelling = no - } - trigger_else = { - is_alive = yes - is_imprisoned = no - is_incapable = no - NOT = { exists = involved_activity } - } + is_available = yes } cost = { @@ -572,7 +579,7 @@ leave_confederation_decision = { faith = root.faith } } - faith = { has_doctrine = doctrine_pluralism_pluralistic } + rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } } confederation = { any_confederation_member = { @@ -615,7 +622,7 @@ leave_confederation_decision = { } } } - faith = { has_doctrine = doctrine_pluralism_pluralistic } + rite = { rite_has_doctrine = doctrine_pluralism_pluralistic } confederation = { any_confederation_member = { save_temporary_scope_as = confederate @@ -668,19 +675,10 @@ leave_confederation_decision = { modifier = { #Is wrong government type NOR = { government_has_flag = government_is_tribal - government_has_flag = government_is_nomadic - government_has_flag = government_is_herder + government_has_flag = government_is_in_steppe } add = 50 } - modifier = { #Is wrong government type - NOR = { - government_has_flag = government_is_republic - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - } - add = -100 - } modifier = { # Isolationist tradition confederation = { any_confederation_member = { @@ -791,12 +789,12 @@ leave_confederation_decision = { } } } - any_confederation_member = { - NOT = { - this = root - } - capital_province = { - squared_distance = { target = root.capital_province value < 100000 } + confederation = { + any_confederation_member = { + this != root + capital_province = { + squared_distance = { target = root.capital_province value < 100000 } + } } } } @@ -815,12 +813,12 @@ leave_confederation_decision = { } } } - any_confederation_member = { - NOT = { - this = root - } - capital_province = { - squared_distance = { target = root.capital_province value < 200000 } + confederation = { + any_confederation_member = { + this != root + capital_province = { + squared_distance = { target = root.capital_province value < 200000 } + } } } } @@ -964,7 +962,7 @@ leave_confederation_decision = { confederation = { any_confederation_member = { exists = root.house - house ?= root.dynasty + house ?= root.house } } } @@ -998,7 +996,7 @@ leave_confederation_decision = { AND = { has_trait = bastard root = { - faith = { NOT = { has_doctrine = doctrine_bastardry_none } } + rite = { NOT = { rite_has_doctrine = doctrine_bastardry_none } } } } has_trait = denounced @@ -1633,32 +1631,49 @@ leave_confederation_decision = { } } } + modifier = { + desc = "BARANGAY_TRADITION_REASON" + trigger = { + culture = { + has_cultural_parameter = invite_to_confederation_extra_reasons + } + } + add = -20 + } } } +### Master the Art of Command ### study_commander_trait_decision = { picture = { reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_concession.dds" } decision_group_type = nomad_minor - - ai_check_interval = 72 + + ai_check_interval_by_tier = { + barony = 0 + county = 144 + duchy = 144 + kingdom = 72 + empire = 72 + hegemony = 72 + } desc = study_commander_trait_decision_desc selection_tooltip = study_commander_trait_decision_tooltip is_shown = { - has_mpo_dlc_trigger = yes government_has_flag = government_is_nomadic is_playable_character = yes is_available_adult = yes + number_of_commander_traits < commander_trait_limit NOR = { has_trait = conqueror has_trait = greatest_of_khans has_character_flag = study_commander_trait_cooldown has_character_flag = is_learning_commander_trait } - number_of_commander_traits < commander_trait_limit + has_mpo_dlc_trigger = yes } is_valid = { @@ -1735,15 +1750,28 @@ mpo_decision_fertility_dance = { cooldown = { years = 5 } is_shown = { - has_mpo_dlc_trigger = yes government_has_flag = government_is_nomadic - is_landed = yes is_available_adult = yes + is_landed = yes + has_mpo_dlc_trigger = yes any_sub_realm_county = { uses_county_fertility = yes } } + widget = { + controller = create_holy_order + title_valid = { + trigger_if = { + limit = { exists = this } + is_capital_barony = yes + county = { + uses_county_fertility = yes + } + } + } + } + is_valid_showing_failures_only = { is_at_war = no is_incapable = no @@ -1790,21 +1818,15 @@ mpo_decision_fertility_dance = { } } } - - widget = { - controller = create_holy_order - barony_valid = { - trigger_if = { - limit = { exists = this } - is_capital_barony = yes - county = { - uses_county_fertility = yes - } - } - } - } - - ai_check_interval = 12 + + ai_check_interval_by_tier = { + barony = 0 + county = 36 + duchy = 12 + kingdom = 12 + empire = 12 + hegemony = 12 + } ai_potential = { is_landed = yes @@ -1862,11 +1884,11 @@ mpo_decision_introduce_heir = { has_trait = nomadic_philosophy } exists = player_heir - player_heir = { + player_heir ?= { + is_ai = yes any_heir_title = { count >= 1 } - is_ai = yes } } @@ -1884,7 +1906,7 @@ mpo_decision_introduce_heir = { } player_heir = { - custom_description = { + custom_tooltip = { text = player_heir_num_friends_tt num_of_relation_friend < 3 } @@ -1929,15 +1951,12 @@ mpo_decision_introduce_heir = { limit = { is_ai = no } - NOT = { exists = involved_activity } is_available = yes } trigger_else = { - is_alive = yes - is_imprisoned = no - is_incapable = no - NOT = { exists = involved_activity } + is_physically_able = yes } + is_in_activity = no player_heir = { is_imprisoned = no is_alive = yes @@ -2012,10 +2031,18 @@ mpo_decision_introduce_heir = { } } } - - ai_check_interval = 18 + + ai_check_interval_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 18 + empire = 18 + hegemony = 18 + } ai_potential = { + government_has_flag = government_is_nomadic exists = player_heir player_heir = { age >= 12 @@ -2259,14 +2286,28 @@ mpo_decision_introduce_heir = { # dlc_mpo_steppe_persia_expansion # dlc_mpo_steppe_siberia_further_expansion ## Eastern Steppe expansion regions: -# world_steppe_tarim +# dlc_mpo_steppe_hexi_tarim_expansion +# dlc_mpo_steppe_north_china_expansion +# dlc_mpo_steppe_central_china_expansion +# dlc_mpo_steppe_north_east_asia_expansion +# world_asia_korea +# world_asia_japan +### Expand The Steppe Decision ### expand_the_steppe_decision = { picture = { reference = "gfx/interface/illustrations/event_scenes/mpo_raid_burning_asian.dds" } decision_group_type = nomad_major - ai_check_interval = 8 + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 8 + empire = 8 + hegemony = 8 + } title = expand_the_steppe_decision_generic @@ -2647,11 +2688,11 @@ expand_the_steppe_decision = { ## Eastern Steppe item = { - value = world_steppe_tarim + value = dlc_mpo_steppe_hexi_tarim_expansion is_shown = { situation:the_great_steppe ?= { any_situation_sub_region = { - region_is_adjacent = geographical_region:world_steppe_tarim + region_is_adjacent = geographical_region:dlc_mpo_steppe_hexi_tarim_expansion } } } @@ -2661,16 +2702,150 @@ expand_the_steppe_decision = { situation:the_great_steppe ?= { NOT = { any_situation_sub_region = { - situation_sub_region_has_geographical_region = world_steppe_tarim + situation_sub_region_has_geographical_region = dlc_mpo_steppe_hexi_tarim_expansion } } } any_realm_province = { - geographical_region = world_steppe_tarim + geographical_region = dlc_mpo_steppe_hexi_tarim_expansion } } } - localization = world_steppe_tarim + localization = dlc_mpo_steppe_hexi_tarim_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_north_china_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_north_china_expansion + } + } + } + is_valid = { + custom_tooltip = { + text = custom_north_china_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = dlc_mpo_steppe_north_china_expansion + } + } + } + any_realm_province = { + geographical_region = dlc_mpo_steppe_north_china_expansion + } + } + } + localization = dlc_mpo_steppe_north_china_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_central_china_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_central_china_expansion + } + } + } + is_valid = { + custom_tooltip = { + text = custom_central_china_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = dlc_mpo_steppe_central_china_expansion + } + } + } + any_realm_province = { + geographical_region = dlc_mpo_steppe_central_china_expansion + } + } + } + localization = dlc_mpo_steppe_central_china_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = dlc_mpo_steppe_north_east_asia_expansion + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:dlc_mpo_steppe_north_east_asia_expansion + } + } + } + localization = dlc_mpo_steppe_north_east_asia_expansion + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = world_asia_korea + is_shown = { + situation:the_great_steppe ?= { + any_situation_sub_region = { + region_is_adjacent = geographical_region:world_asia_korea + } + } + } + is_valid = { + custom_tooltip = { + text = custom_korea_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = world_asia_korea + } + } + } + any_realm_province = { + geographical_region = world_asia_korea + } + } + } + localization = world_asia_korea + icon = "gfx/interface/icons/message_feed/banner.dds" + ai_chance = { + value = 100 + } + } + item = { + value = world_asia_japan + is_shown = { + # there is no strait in Japan XD + any_realm_province = { + geographical_region = special_mongol_empire_blue_horde_region + } + } + is_valid = { + custom_tooltip = { + text = custom_japan_expand_steppe_tt + situation:the_great_steppe ?= { + NOT = { + any_situation_sub_region = { + situation_sub_region_has_geographical_region = world_asia_japan + } + } + } + any_realm_province = { + geographical_region = world_asia_japan + } + } + } + localization = world_asia_japan icon = "gfx/interface/icons/message_feed/banner.dds" ai_chance = { value = 100 @@ -2679,29 +2854,34 @@ expand_the_steppe_decision = { } is_shown = { - has_mpo_dlc_trigger = yes - - government_has_flag = government_is_nomadic - any_character_situation = { situation:the_great_steppe ?= this } + government_has_flag = government_is_nomadic + OR = { + great_steppe_not_in_sub_region_trigger = { REGION = world_khorasan } great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_anatolia } great_steppe_not_in_sub_region_trigger = { REGION = custom_eastern_balkans } great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_northern_russia } - great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_southern_russia } great_steppe_not_in_sub_region_trigger = { REGION = custom_hungary } great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_poland } great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_baltic } great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_caucasus_expansion } great_steppe_not_in_sub_region_trigger = { REGION = world_transoxiana } - great_steppe_not_in_sub_region_trigger = { REGION = world_khorasan } great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_persia_expansion } great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_siberia_further_expansion } - great_steppe_not_in_sub_region_trigger = { REGION = world_steppe_tarim } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_hexi_tarim_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_north_china_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_central_china_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = dlc_mpo_steppe_north_east_asia_expansion } + great_steppe_not_in_sub_region_trigger = { REGION = world_asia_korea } + great_steppe_not_in_sub_region_trigger = { REGION = world_asia_japan } + great_steppe_not_in_sub_region_trigger = { REGION = ghw_region_southern_russia } } + + has_mpo_dlc_trigger = yes } is_valid = { @@ -2714,78 +2894,112 @@ expand_the_steppe_decision = { } completely_controls_region = ghw_region_anatolia } - trigger_if = { + trigger_else_if = { limit = { scope:custom_eastern_balkans = yes } completely_controls_region = custom_eastern_balkans } - trigger_if = { + trigger_else_if = { limit = { scope:ghw_region_northern_russia = yes } completely_controls_region = ghw_region_northern_russia } - trigger_if = { + trigger_else_if = { limit = { scope:ghw_region_southern_russia = yes } completely_controls_region = ghw_region_southern_russia } - trigger_if = { + trigger_else_if = { limit = { scope:custom_hungary = yes } completely_controls_region = custom_hungary } - trigger_if = { + trigger_else_if = { limit = { scope:ghw_region_poland = yes } completely_controls_region = ghw_region_poland } - trigger_if = { + trigger_else_if = { limit = { scope:ghw_region_baltic = yes } completely_controls_region = ghw_region_baltic } - trigger_if = { + trigger_else_if = { limit = { scope:dlc_mpo_steppe_caucasus_expansion = yes } completely_controls_region = dlc_mpo_steppe_caucasus_expansion } - trigger_if = { + trigger_else_if = { limit = { scope:world_transoxiana = yes } completely_controls_region = world_transoxiana } - trigger_if = { + trigger_else_if = { limit = { scope:world_khorasan = yes } completely_controls_region = world_khorasan } - trigger_if = { + trigger_else_if = { limit = { scope:dlc_mpo_steppe_persia_expansion = yes } completely_controls_region = dlc_mpo_steppe_persia_expansion } - trigger_if = { + trigger_else_if = { limit = { scope:dlc_mpo_steppe_siberia_further_expansion = yes } completely_controls_region = dlc_mpo_steppe_siberia_further_expansion } - trigger_if = { + + trigger_else_if = { limit = { - scope:world_steppe_tarim = yes + scope:dlc_mpo_steppe_hexi_tarim_expansion = yes } - completely_controls_region = world_steppe_tarim + completely_controls_region = dlc_mpo_steppe_hexi_tarim_expansion + } + trigger_else_if = { + limit = { + scope:dlc_mpo_steppe_north_china_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_north_china_expansion + } + trigger_else_if = { + limit = { + scope:dlc_mpo_steppe_central_china_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_central_china_expansion + } + trigger_else_if = { + limit = { + scope:dlc_mpo_steppe_north_east_asia_expansion = yes + } + completely_controls_region = dlc_mpo_steppe_north_east_asia_expansion + } + trigger_else_if = { + limit = { + scope:world_asia_korea = yes + } + completely_controls_region = world_asia_korea + } + trigger_else_if = { + limit = { + scope:world_asia_japan = yes + } + completely_controls_region = world_asia_japan + } + trigger_else = { + always = no } } @@ -2796,16 +3010,12 @@ expand_the_steppe_decision = { limit = { is_ai = no } - NOT = { exists = involved_activity } - NOT = { has_trait = infirm } is_available = yes } trigger_else = { - is_imprisoned = no - is_incapable = no - is_alive = yes - NOT = { has_trait = infirm } + is_physically_able = yes } + is_in_activity = no } cost = { @@ -2823,8 +3033,9 @@ expand_the_steppe_decision = { } } - effect = { - # Send a toast to yourself, as a confirmation that the Steppe Expansion happened + effect = { + # Send a toast to yourself, as a confirmation that the Steppe Expansion happened + save_scope_as = steppe_expander send_interface_toast = { type = steppe_expansion_happened title = expand_the_steppe_decision_notification_toast @@ -2860,6 +3071,7 @@ expand_the_steppe_decision = { } #Diligent overwork for nomads +### Manage Pasturage ### develop_fertility_decision = { ai_check_interval = 0 picture = { @@ -2875,13 +3087,13 @@ develop_fertility_decision = { cooldown = { years = 10 } is_shown = { + government_has_flag = government_is_nomadic OR = { has_trait = diligent has_trait = architect has_trait = lifestyle_surveyor } is_landed = yes - government_has_flag = government_is_nomadic } is_valid_showing_failures_only = { @@ -2929,8 +3141,17 @@ develop_fertility_decision = { } # New Tier Title for Nomads +### [ROOT.Char.Custom('GetDominateTitleLoc')] ### nomad_higher_tier_title_decision = { - ai_check_interval = 6 + + ai_check_interval_by_tier = { + barony = 0 + county = 6 + duchy = 6 + kingdom = 6 + empire = 0 + hegemony = 0 + } picture = { reference = "gfx/interface/illustrations/event_scenes/mpo_steppe_evening.dds" } @@ -3122,6 +3343,31 @@ nomad_higher_tier_title_decision = { else = { custom_tooltip = nomad_higher_tier_title_decision_custom_tooltip } + if = { + limit = { + scope:title_scope = { + tier >= tier_kingdom + } + OR = { + #Will first gain crowned laws as a king + scope:title_scope = { + tier = tier_kingdom + } + #Losing your crowned law + AND = { + OR = { + has_realm_law = crowned_king + has_realm_law = crowned_emperor + } + NOR = { + has_game_rule = coronation_laws_no_imperial_uncrowned + has_game_rule = coronation_laws_off + } + } + } + } + custom_tooltip = ACH_DOMINATE_TITLE_GAIN_WARNING + } } ai_potential = { @@ -3140,6 +3386,7 @@ nomad_higher_tier_title_decision = { } #Transition from Gurkhan to GREATEST KHAN EVER +### Become the Greatest of All Khans ### mpo_become_greatest_of_khans_decision = { picture = { reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" @@ -3164,25 +3411,32 @@ mpo_become_greatest_of_khans_decision = { cooldown = { years = 5 } - - ai_check_interval = 12 + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 0 + empire = 12 + hegemony = 12 + } sort_order = 200 decision_group_type = nomad_major is_shown = { government_has_flag = government_is_nomadic - exists = situation:the_great_steppe any_character_situation = { this = situation:the_great_steppe } - is_playable_character = yes NOR = { has_trait = greatest_of_khans any_owned_story = { story_type = story_greatest_of_khans } } + is_playable_character = yes + exists = situation:the_great_steppe } is_valid = { @@ -3207,10 +3461,7 @@ mpo_become_greatest_of_khans_decision = { exists = global_var:mpo_gok_war_ongoing } } - custom_tooltip = { - text = is_nomadic_tt - government_has_flag = government_is_nomadic - } + government_has_flag = government_is_nomadic custom_tooltip = { text = in_great_steppe_tt any_character_situation = { @@ -3220,11 +3471,10 @@ mpo_become_greatest_of_khans_decision = { is_at_war = no has_realm_law = nomadic_authority_5 prestige_level >= 4 - highest_held_title_tier = tier_empire + highest_held_title_tier >= tier_empire trigger_if = { # If you are player Temüjin we waive this requirements limit = { -# NOT = { this = character:125501 } - always = yes + NOT = { this = character:125501 } } OR = { sub_realm_size >= mpo_greatest_of_khans_target_counties @@ -3242,12 +3492,14 @@ mpo_become_greatest_of_khans_decision = { text = greatest_of_khans_vassal_culture_req_tt OR = { any_vassal = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic culture = { save_temporary_scope_as = culture_1 } } any_tributary = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic culture = { save_temporary_scope_as = culture_1 @@ -3256,6 +3508,7 @@ mpo_become_greatest_of_khans_decision = { } OR = { any_vassal = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOT = { culture = scope:culture_1 @@ -3265,6 +3518,7 @@ mpo_become_greatest_of_khans_decision = { } } any_tributary = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOT = { culture = scope:culture_1 @@ -3276,6 +3530,7 @@ mpo_become_greatest_of_khans_decision = { } OR = { any_vassal = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3286,6 +3541,7 @@ mpo_become_greatest_of_khans_decision = { } } any_tributary = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3302,6 +3558,7 @@ mpo_become_greatest_of_khans_decision = { } OR = { any_vassal = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3313,6 +3570,7 @@ mpo_become_greatest_of_khans_decision = { } } any_tributary = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3326,6 +3584,7 @@ mpo_become_greatest_of_khans_decision = { } OR = { any_vassal = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3338,6 +3597,7 @@ mpo_become_greatest_of_khans_decision = { } } any_tributary = { + highest_held_title_tier >= tier_duchy government_has_flag = government_is_nomadic NOR = { culture = scope:culture_1 @@ -3431,7 +3691,6 @@ mpo_become_greatest_of_khans_decision = { } effect = { - custom_description_no_bullet = { text = mpo_gok_war_of_submission_will_happen_tt } custom_tooltip = mpo_gok_cravens_wont_fight_tt custom_tooltip = mpo_gok_obedient_vassals_join_war_tt @@ -3475,7 +3734,6 @@ mpo_become_greatest_of_khans_decision = { } add_realm_law_skip_effects = single_heir_succession_kurultai_law } - custom_tooltip = gain_gok_dynasty_modifier_tt } custom_description_no_bullet = { text = mpo_gok_war_of_submission_defeat_tt } @@ -3972,6 +4230,7 @@ mpo_become_greatest_of_khans_decision = { } #GREATEST OF KHANS HAS BECOME LORD OF ALL +### Reform the Great Khaganate ### mpo_gok_world_conquest_decision = { picture = { reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" @@ -3979,17 +4238,26 @@ mpo_gok_world_conquest_decision = { decision_group_type = nomad_major desc = mpo_gok_world_conquest_decision_desc - ai_check_interval = 36 + cooldown = { years = 5 } + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 0 + empire = 36 + hegemony = 36 + } sort_order = 300 is_shown = { - exists = global_var:first_gok.dynasty - exists = global_var:greatest_of_khans_title - has_mpo_dlc_trigger = yes any_owned_story = { story_type = story_greatest_of_khans } is_playable_character = yes + has_mpo_dlc_trigger = yes + exists = global_var:greatest_of_khans_title + exists = global_var:first_gok.dynasty } is_valid = { @@ -4001,10 +4269,7 @@ mpo_gok_world_conquest_decision = { holder = root } is_independent_ruler = yes - custom_tooltip = { - text = is_nomadic_tt - government_has_flag = government_is_nomadic - } + government_has_flag = government_is_nomadic has_realm_law = nomadic_authority_5 #Legitimace is hamstrung a bit if you don't own legends trigger_if = { @@ -4035,7 +4300,7 @@ mpo_gok_world_conquest_decision = { prestige_level >= 4 } - highest_held_title_tier = tier_empire + highest_held_title_tier >= tier_empire OR = { sub_realm_size >= mpo_gok_world_conquest_target_counties @@ -4333,21 +4598,29 @@ mpo_gok_world_conquest_decision = { } } +### Move into Conquered Lands ### settle_people_decision = { picture = { reference = "gfx/interface/illustrations/holding_types/city_western.dds" } decision_group_type = nomad_major - - ai_check_interval = 36 + + ai_check_interval_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } desc = settle_people_decision_desc selection_tooltip = settle_people_decision_tooltip is_shown = { - has_mpo_dlc_trigger = yes government_has_flag = government_is_nomadic is_playable_character = yes + has_mpo_dlc_trigger = yes } is_valid = { @@ -4381,6 +4654,9 @@ settle_people_decision = { } effect = { + #GoK stops really being GoK + gok_government_change_story_end_effect = yes + save_scope_as = nomad_settling_down domicile.domicile_culture = { save_scope_as = invading_culture } domicile.domicile_faith = { save_scope_as = invading_faith } @@ -4732,23 +5008,8 @@ settle_people_decision = { } } } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_3 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_3 - } - } - } else = { - change_government = feudal_government - + assign_feudal_governments_effect = yes if = { limit = { NOT = { has_realm_law = crown_authority_3 } @@ -4760,7 +5021,6 @@ settle_people_decision = { } if = { limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } any_held_title = { is_nomad_title = yes } @@ -4810,54 +5070,10 @@ settle_people_decision = { } } } - nomad_domicile_refund_effect = yes - nomad_convert_herds_to_gold_special_troops_effect = yes - if = { - limit = { - scope:new_capital.title_province = { - has_holding_type = tribal_holding - } - } - change_government = tribal_government - if = { - limit = { - NOT = { has_realm_law = tribal_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = tribal_authority_1 - } - } - } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - else = { - change_government = feudal_government - - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } + settle_the_people_vassal_effect = yes if = { limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } any_held_title = { is_nomad_title = yes } @@ -4904,23 +5120,8 @@ settle_people_decision = { } } } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } else = { - change_government = feudal_government - + assign_feudal_governments_effect = yes if = { limit = { NOT = { has_realm_law = crown_authority_1 } @@ -4933,7 +5134,6 @@ settle_people_decision = { if = { limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } any_held_title = { is_nomad_title = yes } @@ -4981,23 +5181,8 @@ settle_people_decision = { } } } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } else = { - change_government = feudal_government - + assign_feudal_governments_effect = yes if = { limit = { NOT = { has_realm_law = crown_authority_1 } @@ -5009,7 +5194,6 @@ settle_people_decision = { } if = { limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } any_held_title = { is_nomad_title = yes } @@ -5215,6 +5399,12 @@ settle_people_decision = { NOR = { has_trait = greatest_of_khans has_trait = conqueror + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } } OR = { has_trait = content @@ -5380,21 +5570,29 @@ settle_people_decision = { } } +### Forsake Nomadism ### step_away_from_the_steppe_decision = { picture = { reference = "gfx/interface/illustrations/event_scenes/mpo_rural_village_asian.dds" } decision_group_type = nomad_minor - - ai_check_interval = 36 + + ai_check_interval_by_tier = { + barony = 0 + county = 36 + duchy = 36 + kingdom = 36 + empire = 36 + hegemony = 36 + } desc = step_away_from_the_steppe_decision_desc selection_tooltip = step_away_from_the_steppe_decision_tooltip is_shown = { - has_mpo_dlc_trigger = yes government_has_flag = government_is_nomadic is_playable_character = yes + has_mpo_dlc_trigger = yes } is_valid = { @@ -5423,6 +5621,8 @@ step_away_from_the_steppe_decision = { } effect = { + #GoK stops really being GoK + gok_government_change_story_end_effect = yes nomad_domicile_refund_effect = yes nomad_convert_herds_to_gold_special_troops_effect = yes every_sub_realm_county = { @@ -5614,45 +5814,14 @@ step_away_from_the_steppe_decision = { has_holding_type = tribal_holding } } - change_government = tribal_government - if = { - limit = { - NOT = { has_realm_law = tribal_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = tribal_authority_1 - } - } - } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } + assign_tribal_governments_effect = yes } else = { - change_government = feudal_government - - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } + assign_feudal_governments_effect = yes } + change_authority_effect = { CHANGE = 1 } if = { limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } any_held_title = { is_nomad_title = yes } @@ -5702,67 +5871,7 @@ step_away_from_the_steppe_decision = { } } } - nomad_domicile_refund_effect = yes - nomad_convert_herds_to_gold_special_troops_effect = yes - if = { - limit = { - scope:new_capital.title_province = { - has_holding_type = tribal_holding - } - } - change_government = tribal_government - if = { - limit = { - NOT = { has_realm_law = tribal_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = tribal_authority_1 - } - } - } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - else = { - change_government = feudal_government - - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - - if = { - limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } - any_held_title = { - is_nomad_title = yes - } - } - every_held_title = { - limit = { - is_nomad_title = yes - } - root = { - destroy_title = prev - } - } - } + settle_the_people_vassal_effect = yes every_vassal = { limit = { OR = { @@ -5778,67 +5887,7 @@ step_away_from_the_steppe_decision = { } } } - nomad_domicile_refund_effect = yes - nomad_convert_herds_to_gold_special_troops_effect = yes - if = { - limit = { - scope:new_capital.title_province = { - has_holding_type = tribal_holding - } - } - change_government = tribal_government - if = { - limit = { - NOT = { has_realm_law = tribal_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = tribal_authority_1 - } - } - } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - else = { - change_government = feudal_government - - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - - if = { - limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } - any_held_title = { - is_nomad_title = yes - } - } - every_held_title = { - limit = { - is_nomad_title = yes - } - root = { - destroy_title = prev - } - } - } + settle_the_people_vassal_effect = yes every_vassal = { limit = { @@ -5855,66 +5904,7 @@ step_away_from_the_steppe_decision = { } } } - nomad_domicile_refund_effect = yes - nomad_convert_herds_to_gold_special_troops_effect = yes - if = { - limit = { - scope:new_capital.title_province = { - has_holding_type = tribal_holding - } - } - change_government = tribal_government - if = { - limit = { - NOT = { has_realm_law = tribal_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = tribal_authority_1 - } - } - } - else_if = { - limit = { - ep3_is_clan_inclined_trigger = yes - } - change_government = clan_government - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - else = { - change_government = feudal_government - - if = { - limit = { - NOT = { has_realm_law = crown_authority_1 } - } - hidden_effect = { - add_realm_law_skip_effects = crown_authority_1 - } - } - } - if = { - limit = { - NOT = { government_has_flag = government_allows_nomad_domicile_titles } - any_held_title = { - is_nomad_title = yes - } - } - every_held_title = { - limit = { - is_nomad_title = yes - } - root = { - destroy_title = prev - } - } - } + settle_the_people_vassal_effect = yes } } } @@ -5982,6 +5972,12 @@ step_away_from_the_steppe_decision = { ai_potential = { NOR = { has_trait = greatest_of_khans + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } has_trait = conqueror has_realm_law = nomadic_authority_3 has_realm_law = nomadic_authority_4 @@ -6151,24 +6147,36 @@ step_away_from_the_steppe_decision = { } } +### Elevate Confederation ### confederation_kingdom_decision = { picture = { reference = "gfx/interface/illustrations/decisions/mpo_decision_confederation.dds" } decision_group_type = major - ai_check_interval = 12 + + ai_check_interval_by_tier = { + barony = 0 + county = 12 + duchy = 12 + kingdom = 0 + empire = 0 + hegemony = 0 + } + desc = confederation_kingdom_decision_desc is_shown = { is_confederation_member = yes is_landed = yes + NOT = { exists = confederation.leading_house } is_playable_character = yes + exists = confederation } is_valid = { prestige_level >= 3 is_independent_ruler = yes - custom_description = { + custom_tooltip = { text = confederation_kingdom_decision_vassal_req confederation = { any_confederation_member = { @@ -6239,7 +6247,7 @@ confederation_kingdom_decision = { limit = { government_has_flag = government_is_nomadic } - add = medium_herd_value_static + add = domicile.medium_herd_value_static } } } @@ -6272,7 +6280,7 @@ confederation_kingdom_decision = { tier = kingdom name = CONFEDERATION_CULTURE_NAME adj = CONFEDERATION_CULTURE_NAME_ADJ - pre = article_CONFEDERATION_CULTURE_NAME + article = article_CONFEDERATION_CULTURE_NAME } scope:new_title = { set_variable = { @@ -6375,21 +6383,29 @@ confederation_kingdom_decision = { } } +### Settle the Steppe ### settle_the_steppe_decision = { picture = { reference = "gfx/interface/illustrations/event_story/mpo_steppe_region.dds" } decision_group_type = nomad_major - - ai_check_interval = 360 + + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 0 + kingdom = 360 + empire = 360 + hegemony = 360 + } desc = settle_the_steppe_decision_desc selection_tooltip = settle_the_steppe_decision_tooltip is_shown = { - has_mpo_dlc_trigger = yes government_has_flag = government_is_nomadic is_playable_character = yes + has_mpo_dlc_trigger = yes } is_valid = { @@ -6481,17 +6497,9 @@ settle_the_steppe_decision = { } trigger_if = { limit = { - NOR = { - faith.religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } - } + ep3_is_clan_inclined_trigger = no } - faith.religion = religion:islam_religion - culture = { has_cultural_pillar = heritage_arabic } - culture = { has_cultural_pillar = heritage_iranian } - culture = { has_cultural_pillar = heritage_turkic } + ep3_is_clan_inclined_trigger = yes } } ai_chance = { @@ -6546,6 +6554,8 @@ settle_the_steppe_decision = { } effect = { + #GoK stops really being GoK + gok_government_change_story_end_effect = yes # MPO ACHIEVEMENT Settling In if = { limit = { is_ai = no } @@ -6693,6 +6703,7 @@ settle_the_steppe_decision = { } } title_province = { + holding_pre_feudalize_effect = yes set_holding_type = castle_holding } add_to_list = holding_conversion @@ -6913,6 +6924,12 @@ settle_the_steppe_decision = { NOR = { has_trait = greatest_of_khans has_trait = conqueror + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } } OR = { has_realm_law = nomadic_authority_4 @@ -6933,6 +6950,7 @@ settle_the_steppe_decision = { } } +### Become Nomadic ### become_nomadic_decision = { picture = { reference = "gfx/interface/illustrations/event_story/mpo_steppe_region.dds" @@ -6944,12 +6962,15 @@ become_nomadic_decision = { ai_check_interval = 0 is_shown = { - has_mpo_dlc_trigger = yes - NOT = { government_has_flag = government_is_nomadic } is_playable_character = yes - capital_county = { + NOR = { + government_has_flag = government_is_steppe_admin + government_has_flag = government_is_nomadic + } + capital_county ?= { any_county_situation = { OR = { + situation:the_great_steppe ?= this situation:game_rule_extra_nomads_arabs ?= this situation:game_rule_extra_nomads_sami ?= this situation:game_rule_extra_nomads_tibet ?= this @@ -6958,6 +6979,7 @@ become_nomadic_decision = { } } } + has_mpo_dlc_trigger = yes } is_valid = { diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index acf7a3456..d5bf28916 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -59,6 +59,13 @@ feudal_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } if = { limit = { government_has_flag = government_is_administrative @@ -171,14 +178,14 @@ feudal_government = { government_has_flag = government_is_administrative has_trait = content } - add = -15 + add = 5 } if = { limit = { government_has_flag = government_is_administrative has_trait = zealous } - add = 5 + add = -15 } if = { limit = { @@ -224,7 +231,7 @@ feudal_government = { republic_government = { primary_holding = city_holding - valid_holdings = { castle_holding monotown_holding } + valid_holdings = { castle_holding } required_county_holdings = { city_holding castle_holding church_holding } government_rules = { inherit_from_dynastic_government = no @@ -263,6 +270,7 @@ clan_government = { dynasty_named_realms = no always_use_patronym = yes allow_accolades = yes + subject_men_at_arms = yes } royal_court = any @@ -345,6 +353,13 @@ clan_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } if = { limit = { government_has_flag = government_is_administrative @@ -889,7 +904,7 @@ administrative_government = { mechanic_type = administrative is_mechanic_type_default = yes - possible_grant_vassal_governments = { theocracy_government ecclesiastical_government feudal_government clan_government } + possible_grant_vassal_governments = { theocracy_government ecclesiastical_government feudal_government clan_government } color = { 72 6 92 } realm_mask_offset = { 0.0 0.01 } @@ -1120,6 +1135,7 @@ nomad_government = { can_raze_holdings government_uses_domicile_but_not_adventurer government_uses_nomadic_authority + government_can_use_tributary_men_at_arms } ai = { @@ -1251,7 +1267,6 @@ celestial_government = { 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 = -3 men_at_arms_limit = -2 knight_limit = -5 vassal_limit = 20 @@ -1494,6 +1509,7 @@ mandala_government = { government_is_settled has_unique_government_perks no_powerful_vassals + government_can_use_tributary_men_at_arms } ai = { diff --git a/common/governments/02_theocratic_government_types.txt b/common/governments/02_theocratic_government_types.txt index 8ad1e25c4..0887142ba 100644 --- a/common/governments/02_theocratic_government_types.txt +++ b/common/governments/02_theocratic_government_types.txt @@ -37,6 +37,48 @@ theocracy_government = { } always = no } + } + + vassal_contract_group = theocracy_vassal + + # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). + flags = { + government_is_theocracy + government_is_settled + government_uses_church_authority + government_uses_domain_limit + government_can_use_tributary_men_at_arms + } + + mechanic_type = theocracy + min_appointment_tier = county + is_mechanic_type_default = yes + + possible_grant_vassal_governments = { feudal_government clan_government tribal_government } + + # Any positive weight is enough + grant_vassal_ai_will_do = { + value = 0 + if = { + limit = { + scope:title = { tier = tier_county } + NOT = { has_variable = grant_vassal_government_cooldown } + ai_zeal >= medium_positive_ai_value + rite = { + NOT = { rite_has_doctrine = doctrine_theocracy_lay_clergy } + rite_has_doctrine = doctrine_theocracy_temporal + } + realm_theocratic_county_share_ai_below_cap_trigger = yes + } + add = 10 + } + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } if = { limit = { government_has_flag = government_is_administrative @@ -195,41 +237,6 @@ theocracy_government = { } } - vassal_contract_group = theocracy_vassal - - # Use flags instead of has_government for moddability if possible (i.e., wherever not visible to the player). - flags = { - government_is_theocracy - government_is_settled - government_uses_church_authority - government_uses_domain_limit - gov_uses_non_crown_coa - government_is_basic_theocracy - government_can_use_tributary_men_at_arms - } - - mechanic_type = theocracy - min_appointment_tier = county - is_mechanic_type_default = yes - - # Any positive weight is enough - grant_vassal_ai_will_do = { - value = 0 - if = { - limit = { - scope:title = { tier = tier_county } - NOT = { has_variable = grant_vassal_government_cooldown } - ai_zeal >= medium_positive_ai_value - rite ?= { - NOT = { rite_has_doctrine = doctrine_theocracy_lay_clergy } - rite_has_doctrine = doctrine_theocracy_temporal - } - realm_theocratic_county_share_ai_below_cap_trigger = yes - } - add = 10 - } - } - color = hsv{ 0.00 0.00 0.78 } realm_mask_offset = { 0.0 0.02 } realm_mask_scale = { 0.95 0.95 } @@ -311,6 +318,8 @@ ecclesiastical_government = { min_appointment_tier = county domicile_type = ecclesiastical_domicile + possible_grant_vassal_governments = { feudal_government clan_government tribal_government } + # is_grant_government_shown already limits this to ecclesiastical theocracy faiths grant_vassal_ai_will_do = { value = 0 @@ -324,6 +333,13 @@ ecclesiastical_government = { } add = 10 } + if = { + limit = { + government_has_flag = government_is_administrative + is_independent_ruler = no + } + add = -500 + } if = { limit = { government_has_flag = government_is_administrative diff --git a/common/scripted_effects/00_administrative_effects.txt b/common/scripted_effects/00_administrative_effects.txt index d1a341bad..8fb381ded 100644 --- a/common/scripted_effects/00_administrative_effects.txt +++ b/common/scripted_effects/00_administrative_effects.txt @@ -45,6 +45,7 @@ change_to_administrative_holding_effect = { } change_to_administrative_effect = { + save_scope_as = governor if = { limit = { exists = scope:new_liege @@ -53,7 +54,7 @@ change_to_administrative_effect = { independent = no } NOR = { - has_character_flag = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker prestige_level > 2 piety_level > 2 AND = { @@ -82,7 +83,7 @@ change_to_administrative_effect = { independent = no } NOR = { - has_character_flag = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker prestige_level > 2 piety_level > 2 AND = { @@ -110,7 +111,7 @@ change_to_administrative_effect = { independent = no } NOR = { - has_character_flag = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker prestige_level > 2 piety_level > 2 AND = { diff --git a/common/scripted_effects/00_ep3_decision_effects.txt b/common/scripted_effects/00_ep3_decision_effects.txt index ab9fbdd0f..4645cb221 100644 --- a/common/scripted_effects/00_ep3_decision_effects.txt +++ b/common/scripted_effects/00_ep3_decision_effects.txt @@ -210,21 +210,6 @@ convert_to_administrative_from_feudalism_game_start_effect = { if = { limit = { NOT = { government_has_mechanic = administrative } - trigger_if = { - limit = { - independent = no - } - NOR = { - has_character_flag = granted_title_government_cooldown - prestige_level > 2 - piety_level > 2 - AND = { - dynasty ?= { - dynasty_prestige_level > 2 - } - } - } - } } change_government = administrative_government create_noble_family_effect = { GOVERNMENT_GIVER = this } diff --git a/common/scripted_effects/00_government_effects.txt b/common/scripted_effects/00_government_effects.txt index 9758aecc2..3112b884e 100644 --- a/common/scripted_effects/00_government_effects.txt +++ b/common/scripted_effects/00_government_effects.txt @@ -159,7 +159,7 @@ assign_new_government_effect = { } } NOR = { - has_character_flag = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker prestige_level > 2 piety_level > 2 AND = { @@ -184,7 +184,7 @@ assign_new_government_effect = { } } NOR = { - has_character_flag = granted_title_government_cooldown + has_character_flag = granted_title_government_blocker prestige_level > 2 piety_level > 2 AND = { diff --git a/common/scripted_rules/01_grant_title_rules.txt b/common/scripted_rules/01_grant_title_rules.txt index 4771ced44..6335061be 100644 --- a/common/scripted_rules/01_grant_title_rules.txt +++ b/common/scripted_rules/01_grant_title_rules.txt @@ -71,7 +71,9 @@ is_grant_government_shown = { government_has_flag = government_is_administrative government_has_flag = government_is_theocracy } - NOT = { faith.religion = religion:islam_religion } + NOT = { + faith.religion = religion:islam_religion + } } } }