feudalize_holding_interaction = { category = interaction_category_uncategorized hidden = yes special_interaction = feudalize_holding desc = feudalize_holding_interaction_desc target_type = title target_filter = actor_domain_titles auto_accept = yes is_shown = { scope:actor = { this = scope:recipient NOR = { government_has_flag = government_is_tribal government_has_flag = government_is_nomadic government_has_flag = government_is_herder } } } can_be_picked_title = { scope:target = { holder = scope:actor is_capital_barony = no # we'll use the county in that case trigger_if = { limit = { tier <= tier_county } title_province = { OR = { has_holding_type = tribal_holding has_holding_type = nomad_holding has_holding_type = herder_holding } } } trigger_else = { custom_description = { text = "feudalize_holding_interaction_title_not_county_or_below" always = no } } } } has_valid_target_showing_failures_only = { scope:target = { trigger_if = { limit = { tier <= tier_county } title_province = { barony_controller = scope:actor has_ongoing_construction = no } } } } cost = { gold = { scope:actor = { if = { limit = { scope:target.county = { has_variable = was_razed } } add = { value = 50 desc = BASE } } else_if = { limit = { scope:target.county = { culture = scope:actor.culture } } add = { value = 200 desc = BASE } } else = { add = { value = feudalize_holding_interaction_cost desc = BASE } } if = { limit = { # More expensive for admin to make barbarians civilized... government_has_flag = government_is_administrative } add = { value = feudalize_holding_interaction_cost multiply = 0.25 desc = has_admin_government } if = { limit = { # Admin get a bonus for high bureaucracy levels OR = { has_realm_law = imperial_bureaucracy_2 has_realm_law = imperial_bureaucracy_3 } } subtract = { value = feudalize_holding_interaction_cost multiply = { value = 0.1 if = { limit = { has_realm_law = imperial_bureaucracy_3 } add = 0.15 } } desc = imperial_bureaucracy } } } } } } on_accept = { scope:actor = { send_interface_toast = { type = event_toast_effect_good title = feudalize_holding_interaction_notification right_icon = scope:actor if = { limit = { scope:target.title_province = { OR = { has_holding_type = nomad_holding has_holding_type = herder_holding } } } if = { limit = { OR = { scope:target.county.culture = scope:actor.culture scope:target.county = { has_variable = was_razed } } } } else_if = { limit = { OR = { government_has_flag = government_is_tribal scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } } } scope:target.county = { add_county_modifier = { modifier = mpo_feudalize_nomadic_land_modifier years = 5 } } } else = { scope:target.county = { add_county_modifier = { modifier = mpo_feudalize_nomadic_land_modifier years = 30 } } } } if = { limit = { exists = scope:target.title_province } scope:target.title_province = { set_holding_type = castle_holding } } if = { limit = { scope:target = { title_province = { geographical_region = geographical_region:mpo_region_permafrost } } } if = { limit = { scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier } } remove_county_modifier = mpo_siberian_permafrost_modifier } else_if = { limit = { scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } } remove_county_modifier = mpo_siberian_permafrost_modifier_bad } } } } } # Interaction frequency determined by code, do not change ai_frequency = 0 # Used to determine which holding should be feudalized over another AND how important this AI goal is compared to others, like creating titles and constructing new holdings ai_will_do = { base = 1500 } } tribalize_holding_interaction = { category = interaction_category_uncategorized hidden = yes special_interaction = tribalize_holding desc = tribalize_holding_interaction_desc target_type = title target_filter = actor_domain_titles auto_accept = yes is_shown = { scope:actor = { this = scope:recipient government_has_flag = government_is_tribal } } can_be_picked_title = { scope:target = { holder = scope:actor is_capital_barony = no # we'll use the county in that case trigger_if = { limit = { tier <= tier_county } title_province = { OR = { has_holding_type = nomad_holding has_holding_type = herder_holding } } } trigger_else = { custom_description = { text = "feudalize_holding_interaction_title_not_county_or_below" always = no } } } } has_valid_target_showing_failures_only = { scope:target = { trigger_if = { limit = { tier <= tier_county } title_province = { barony_controller = scope:actor has_ongoing_construction = no } } } } cost = { gold = { scope:actor = { if = { limit = { scope:target.county = { has_variable = was_razed } } add = { value = 15 desc = BASE } } else = { add = { value = 50 desc = BASE } } } } prestige = { scope:actor = { if = { limit = { scope:target.county = { has_variable = was_razed } } add = { value = 25 desc = BASE } } else_if = { limit = { scope:target.county.culture = scope:actor.culture } add = { value = 50 desc = BASE } } else_if = { limit = { scope:target.county.culture = { has_same_culture_heritage = scope:actor.culture } } add = { value = 100 desc = BASE } } else = { add = { value = 300 desc = BASE } } } } } on_accept = { scope:actor = { send_interface_toast = { type = event_toast_effect_good title = feudalize_holding_interaction_notification right_icon = scope:actor if = { limit = { OR = { scope:target.county.culture = scope:actor.culture scope:target.county = { has_variable = was_razed } } } } else = { scope:target.county = { add_county_modifier = { modifier = mpo_feudalize_nomadic_land_modifier years = 5 } } } if = { limit = { exists = scope:target.title_province } scope:target.title_province = { set_holding_type = tribal_holding } } if = { limit = { scope:target = { title_province = { geographical_region = geographical_region:mpo_region_permafrost } } } if = { limit = { scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier } } remove_county_modifier = mpo_siberian_permafrost_modifier } else_if = { limit = { scope:target = { has_county_modifier = mpo_siberian_permafrost_modifier_bad } } remove_county_modifier = mpo_siberian_permafrost_modifier_bad } } } } } # Interaction frequency determined by code, do not change ai_frequency = 0 # Used to determine which holding should be feudalized over another AND how important this AI goal is compared to others, like creating titles and constructing new holdings ai_will_do = { base = 1500 } } support_feudalize_tribal_holding_interaction = { category = interaction_category_vassal icon = request_funding_interaction desc = support_feudalize_tribal_holding_interaction_desc target_type = title target_filter = recipient_domain_titles auto_accept = yes is_shown = { scope:actor = { NOT = { government_has_flag = government_is_tribal } } scope:recipient = { target_is_liege_or_above = scope:actor NOT = { government_has_flag = government_is_tribal } NOT = { this = scope:actor } any_held_title = { tier <= tier_county title_province = { has_holding_type = tribal_holding } } } } can_be_picked_title = { scope:target = { is_capital_barony = no # we'll use the county in that case trigger_if = { limit = { tier <= tier_county } title_province = { barony_controller = scope:recipient has_ongoing_construction = no } } } } has_valid_target_showing_failures_only = { scope:target = { trigger_if = { limit = { tier <= tier_county } title_province = { has_holding_type = tribal_holding } } trigger_else = { custom_description = { text = "feudalize_tribal_holding_interaction_title_not_county_or_below" always = no } } } } cost = { gold = { scope:actor = { add = { value = feudalize_holding_interaction_cost desc = BASE } if = { limit = { # More expensive for admin to make these barbarians civilized... government_has_flag = government_is_administrative } add = { value = feudalize_holding_interaction_cost multiply = 0.25 desc = has_admin_government } if = { limit = { # Admin get a bonus for high bureaucracy levels OR = { has_realm_law = imperial_bureaucracy_2 has_realm_law = imperial_bureaucracy_3 } } subtract = { value = feudalize_holding_interaction_cost multiply = { value = 0.1 if = { limit = { has_realm_law = imperial_bureaucracy_3 } add = 0.15 } } desc = imperial_bureaucracy } } } } } } is_highlighted = { # Highlight the interaction if we have the gold to spare scope:actor = { gold >= { value = feudalize_holding_interaction_cost if = { limit = { # More expensive for admin to convert these... Barbarians... government_has_flag = government_is_administrative } multiply = { value = 1.25 desc = has_admin_government } } } } } on_accept = { scope:recipient = { # Add some opinion to make it worthwhile add_opinion = { target = scope:actor modifier = grateful_opinion opinion = 15 } # Notify actor and recipient scope:actor = { send_interface_toast = { type = event_toast_effect_good title = feudalize_holding_interaction_notification left_icon = scope:actor right_icon = scope:target if = { limit = { exists = scope:target.title_province } scope:target.title_province = { set_holding_type = castle_holding } } } } } scope:actor = { # If you are admin, you get some influence for your efforts if = { limit = { government_has_flag = government_is_administrative } change_influence = medium_influence_gain } } } # The AI doesn't check this very often - So if they have more important expenses, they will put their gold to better use first. ai_frequency = 72 ai_targets = { ai_recipients = vassals max = 10 } ai_potential = { # Some basic triggers is_at_war = no is_adult = yes # The AI only does this if they have plenty of gold to spare gold >= { value = feudalize_holding_interaction_cost multiply = 4 } # Warring AI don't do this - They want to spend their gold on war! ai_has_warlike_personality = no ai_has_conqueror_personality = no } ai_will_do = { base = 25 modifier = { scope:actor = { ai_has_economical_boom_personality = yes } add = 50 } } }