diff --git a/common/artifacts/templates/00_historical_artifacts_templates.txt b/common/artifacts/templates/00_historical_artifacts_templates.txt index 70538291f..6d15776f4 100644 --- a/common/artifacts/templates/00_historical_artifacts_templates.txt +++ b/common/artifacts/templates/00_historical_artifacts_templates.txt @@ -152,14 +152,14 @@ al_taj_template = { } # can this character benefit from the full modifiers of the artifact? - can_benefit = { - OR = { - has_title = title:d_shiite - any_liege_or_above = { - has_title = title:d_shiite - } - } - } + #can_benefit = { + # OR = { + # has_title = title:d_shiite + # any_liege_or_above = { + # has_title = title:d_shiite + # } + # } + #} is_holy_relic = { OR = { diff --git a/common/casus_belli_types/00_subjugation.txt b/common/casus_belli_types/00_subjugation.txt index b3d399e1a..cdde01d7e 100644 --- a/common/casus_belli_types/00_subjugation.txt +++ b/common/casus_belli_types/00_subjugation.txt @@ -246,19 +246,19 @@ multiply = common_cb_piety_cost_multiplier # FP3: caliphal discounts. ## We have to do this here as we otherwise can't select what the war is. - if = { - limit = { - scope:attacker = { - has_title = title:d_sunni - # We scope directly to the struggle because e_arabia might not actually be _in_ the struggle. - struggle:persian_struggle ?= { has_struggle_phase_parameter = fp3_caliph_gets_cheaper_subjugation_cb } - } - } - multiply = { - value = fp3_caliph_gets_cheaper_subjugation_cb_actual_value - desc = CB_STRUGGLE_PHASE_DISCOUNT - } - } + #if = { + # limit = { + # scope:attacker = { + # has_title = title:d_sunni + # # We scope directly to the struggle because e_arabia might not actually be _in_ the struggle. + # struggle:persian_struggle ?= { has_struggle_phase_parameter = fp3_caliph_gets_cheaper_subjugation_cb } + # } + # } + # multiply = { + # value = fp3_caliph_gets_cheaper_subjugation_cb_actual_value + # desc = CB_STRUGGLE_PHASE_DISCOUNT + # } + #} } } diff --git a/common/casus_belli_types/03_fp2_wars.txt b/common/casus_belli_types/03_fp2_wars.txt new file mode 100644 index 000000000..cbc2cbec9 --- /dev/null +++ b/common/casus_belli_types/03_fp2_wars.txt @@ -0,0 +1,2 @@ +# Custom CBs for FP2 +# Overwritten \ No newline at end of file diff --git a/common/casus_belli_types/05_fp3_wars.txt b/common/casus_belli_types/05_fp3_wars.txt new file mode 100644 index 000000000..7eda3198f --- /dev/null +++ b/common/casus_belli_types/05_fp3_wars.txt @@ -0,0 +1,2 @@ +# Custom CBs for FP3 +# Overwritten \ No newline at end of file diff --git a/common/casus_belli_types/09_mpo_wars.txt b/common/casus_belli_types/09_mpo_wars.txt new file mode 100644 index 000000000..5e6ddda23 --- /dev/null +++ b/common/casus_belli_types/09_mpo_wars.txt @@ -0,0 +1,5758 @@ +#migration_cb +#mpo_nomad_invasion_cb +#humiliation_cb +#retaliation_cb +#sovereignty_cb +#mpo_great_war_of_defiance_cb +#mpo_gok_onslaught_cb + +########## +# Special CB used for migrating +########## + +# Used in code - the only legal way to start a migration war +# +migration_cb = { + icon = migration_cb + group = migration + + allow_hostages = no + white_peace_possible = no + target_de_jure_regions_above = yes + allowed_for_character = { + government_has_flag = government_is_nomadic + } + + ignore_effect = change_title_holder + valid_to_start = { always = no } + + should_invalidate = {} + + on_invalidated_desc = msg_remove_migration_cb_invalidated_message + + cost = {} + + on_declaration = { + on_declared_war = yes + scope:attacker = { + every_in_list = { + variable = obedient_vassals + limit = { is_ai = yes } + scope:war = { add_attacker = prev } + } + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = migration_cb_victory_desc_attacker + } + desc = migration_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { + save_scope_as = duchy_war + show_pow_release_message_effect = yes + if = { + limit = { + is_ai = yes + } + set_variable = { + name = migration_cooldown + years = migration_cooldown_value + } + } + } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + every_in_list = { + list = target_titles + custom_tooltip = MIGRATION_CB_TITLE + + conquest_cb_title_transfer = { + RELIGIOUS_WAR = no + } + } + + show_as_tooltip = { + every_in_list = { + list = vassals_taken + change_liege = { + liege = scope:attacker + change = scope:change + } + } + + every_in_list = { + list = titles_taken + change_title_holder = { + holder = scope:attacker + change = scope:change + take_baronies = yes + } + } + } + + resolve_title_and_vassal_change = scope:change + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = medium_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # Move into new lands + scope:attacker = { + domicile ?= { + move_domicile = scope:attacker.capital_province + } + } + + scope:war = { set_variable = migration_victory } + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = migration_cb_white_peace_desc_defender + } + desc = migration_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing pretty good against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not impactful as the scale are identical + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = migration_cb_defeat_desc_defender + } + desc = migration_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "MIGRATION_WAR_NAME" + war_name_base = "MIGRATION_WAR_NAME_BASE" + cb_name = "MIGRATION_WAR_CB_NAME" + + interface_priority = 79 + + attacker_wargoal_percentage = 0.8 + + defender_score_from_battles_scale = 300 + attacker_score_from_battles_scale = 300 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + + +################################### +# NOMAD INVASION +################################### + +mpo_nomad_invasion_cb = { + icon = migration_cb + group = invasion + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + allow_hostages = no + + defender_score_from_occupation_scale = 50 + attacker_score_from_occupation_scale = 150 + + allowed_for_character = { + is_independent_ruler = yes + government_has_flag = government_is_nomadic + trigger_if = { + limit = { + is_ai = yes + } + OR = { + is_landed = no + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + AND = { + ai_boldness >= 50 + capital_county = { + has_bad_season_nomadic_capital_root_trigger = yes + } + } + mpo_nomad_invasion_war_ai_trigger = { NOMAD = root } + } + trigger_if = { + limit = { + NOT = { + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + NOT = { + sub_realm_size > 40 + } + } + } + } + + allowed_for_character_display_regardless = { + custom_tooltip = { + text = mpo_nomad_invasion_cb_tt + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + mpo_has_gok_mongol_empire_trigger = no + } + + target_titles = all + target_title_tier = kingdom + target_de_jure_regions_above = yes + + ai_can_target_all_titles = { + always = yes + } + + max_ai_diplo_distance_to_title = 1000 + ai_score = { + value = { + add = { + if = { + limit = { + scope:attacker = { + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + title_province = { has_holding_type = castle_holding } + } + add = 1000 + } + } + } + else_if = { + limit = { + scope:attacker = { + OR = { + is_landed = no + AND = { + ai_boldness >= 50 + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + OR = { + sub_region_current_phase = situation_steppe_white_zud_season + sub_region_current_phase = situation_steppe_cold_zud_season + sub_region_current_phase = situation_steppe_severe_drought_season + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + } + } + } + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + title_province = { has_holding_type = castle_holding } + } + add = 100 + } + } + } + #IF THERE IS A SHOT ON ANATOLIA, TAKE IT TURKS! + if = { + limit = { + scope:attacker = { + culture = { + has_cultural_pillar = heritage_turkic + } + } + any_in_list = { + list = target_titles + tier = tier_kingdom + this = title:k_anatolia + OR = { + scope:defender.culture = { + has_cultural_pillar = heritage_byzantine + } + scope:defender = { + primary_title = title:e_byzantium + } + NOT = { + any_de_jure_county = { + culture = { + has_cultural_pillar = heritage_turkic + } + } + } + } + } + } + multiply = 20 + } + if = { + limit = { + scope:attacker = { + any_character_situation = { + this = situation:the_great_steppe + } + } + any_in_list = { + list = target_titles + tier = tier_kingdom + OR = { + this = title:k_anatolia + this = title:k_pontus + #this = title:k_delhi + this = title:k_bulgaria + #this = title:k_syria + this = title:k_nikaea + this = title:k_georgia + this = title:k_armenia + this = title:k_galicia-volhynia + #this = title:k_goguryeo + this = title:k_ruthenia + #empire = { + # OR = { + # this = title:e_persia + # this = title:e_turan + # this = title:e_yongliang + # this = title:e_zhongyuan + # this = title:e_great_yuan + # this = title:e_chagatai + # this = title:e_ilkhanate + # this = title:e_golden_horde + # this = title:e_tartaria + # this = title:e_andong + # this = title:e_caspian-pontic_steppe + # } + #} + } + } + } + multiply = 5 + } + #weigh down non-neighboring states + if = { + limit = { + NOT = { + scope:attacker = { + any_land_neighboring_realm_with_tributaries_owner = { + this = scope:defender + } + } + } + } + multiply = 0.1 + } + if = { + limit = { + scope:attacker = { + any_character_situation = { + this = situation:the_great_steppe + } + } + scope:defender = { + OR = { + is_roman_emperor_trigger = yes + sub_realm_size >= 150 + } + } + } + multiply = 1.5 + } + if = { + limit = { + scope:defender = { + culture = { + OR = { + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_berber + } + } + } + } + multiply = 0.25 + } + if = { + limit = { + scope:defender = { + any_character_war = { + using_cb = mpo_nomad_invasion_cb + } + } + } + multiply = 0.33 + } + if = { + limit = { + any_in_list = { + list = target_titles + has_variable = was_overrun + } + } + multiply = 0.2 + } + #Should not target islands... ever + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_kingdom + OR = { + #this = title:k_hitakami + #this = title:k_aynumosir + this = title:k_sardinia + this = title:k_krete + this = title:k_cyprus + empire ?= { + OR = { + #this = title:e_japan + this = title:e_britannia + #this = title:e_nusantara + #this = title:e_srivijaya + } + } + } + } + } + multiply = 0 + } + if = { + limit = { + scope:defender = { + current_military_strength > scope:attacker.eighty_percent_of_current_military_strength + } + } + multiply = 0.1 + } + } + if = { + limit = { + scope:attacker = { + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } + } + } + multiply = 0 + } + } + } + ai_score_mult = { + value = 1 + + # HOUSE RELATIONS + add = house_relation_ai_score_value + + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + + multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + trigger_if = { + limit = { + scope:attacker = { + is_ai = yes + } + } + any_in_de_jure_hierarchy = { + continue = { tier > tier_county } + count >= 6 + tier = tier_county + title_province = { + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + holder ?= { + OR = { + this = scope:defender + is_vassal_or_below_of = scope:defender + } + } + } + scope:defender = { + NOT = { + government_has_flag = government_is_nomadic + } + NOT = { + any_character_war = { + using_cb = mpo_nomad_invasion_cb + } + } + } + } + #At least one settled county, y'know + custom_tooltip = { + text = at_least_one_non_nomad_county_tt + any_de_jure_county = { + holder.top_liege = scope:defender + NOT = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + target_is_same_character_or_above = scope:defender + } + } + } + } + } + + on_invalidated_desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:attacker = { is_alive = no } + } + desc = msg_claim_war_invalidated_claimant_unavailable_dead_attacker_message + } + desc = msg_claim_war_invalidated_message + } + } + + on_invalidated = { + } + + cost = { + piety = { + value = 0 + add = common_cb_impious_piety_cost + multiply = 1.5 + } + prestige = { + value = nomad_invasion_cb_prestige_cost + } + } + + on_declaration = { + on_declared_war = yes + random_in_list = { + list = target_titles + limit = { + tier = tier_kingdom + } + save_scope_as = target + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_victory_desc_attacker + } + desc = overrunning_war_victory_desc + } + first_valid = { + triggered_desc = { + trigger = { + + mpo_overrunner_becomes_tribal_desc_trigger = yes + } + desc = overrunning_war_victory_desc_tribal + } + triggered_desc = { + trigger = { + mpo_overrunner_becomes_clan_desc_trigger = yes + } + desc = overrunning_war_victory_desc_clan + } + desc = overrunning_war_victory_desc_feudal + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_victory_warning_desc_attacker + } + desc = overrunning_war_victory_warning_desc + } + } + + on_victory = { + #GoK stops really being GoK + scope:attacker = { + gok_government_change_story_end_effect = yes + } + # MPO ACHIEVEMENT Nobody's Business + if = { + limit = { + scope:attacker = { is_ai = no } + } + scope:attacker = { + add_achievement_global_variable_effect = { + VARIABLE = mpo_nobodys_business_achievement_unlocked + VALUE = yes + } + } + } + scope:attacker = { + domicile.domicile_culture = { save_scope_as = invading_culture } + domicile.domicile_faith = { save_scope_as = invading_faith } + save_scope_value_as = { + name = invading_herd_value + value = domicile.herd + } + if = { + limit = { + exists = confederation + } + confederation = { + remove_confederation_member = scope:attacker + } + } + } + + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy and gold + scope:attacker = { + if = { + limit = { + scope:defender = { + government_has_flag = government_is_tribal + } + } + add_short_term_gold = medium_gold_value + } + else = { + add_short_term_gold = major_gold_value + } + add_legitimacy = medium_legitimacy_gain + } + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + + scope:defender = { + every_vassal = { + add_to_list = defender_vassals + } + } + + random_in_list = { + list = target_titles + limit = { + tier = tier_kingdom + } + save_scope_as = target + set_variable = { + name = was_overrun + years = 20 + } + } + scope:attacker = { + if = { + limit = { + mpo_overrunner_becomes_tribal_trigger = yes + } + save_scope_as = becoming_tribal + } + else_if = { + limit = { + mpo_overrunner_becomes_clan_trigger = yes + } + save_scope_as = becoming_clan + } + } + + scope:target = { + every_in_de_jure_hierarchy = { + limit = { + tier = tier_duchy + holder.top_liege = scope:defender + NOT = { + is_in_list = target_titles + } + } + add_to_list = target_titles + } + } + + scope:attacker = { save_scope_as = overrunner } + + #Add vassals to a list - they may move with attacker + scope:attacker = { + every_vassal = { + limit = { + mpo_overrunning_willing_vassal_trigger = yes + } + add_to_list = potential_overrunning_vassals + } + } + + #Wrap up being a nomad + scope:attacker = { + mpo_overrunning_ending_nomadism_effect = yes + every_tributary = { + custom = custom.every_tributary + end_tributary = yes + } + } + + #Tooltip that defender will lose vassals after losing title + scope:defender = { + if = { + limit = { + scope:target = { + holder = scope:defender + } + NOT = { + any_held_title = { + tier >= tier_kingdom + this = scope:target + } + } + } + custom_tooltip = overrunning_defender_lose_vassals_tt + } + } + #If defender loses rank, make sure vassals become independent instead of going under attacker + hidden_effect = { + scope:defender = { + #being demoted to duke + if = { + limit = { + NOT = { + any_held_title = { + tier >= tier_kingdom + NOT = { + is_in_list = target_titles + } + } + } + } + every_vassal = { + limit = { + highest_held_title_tier >= tier_duchy + NOT = { + any_held_title = { + OR = { + kingdom = scope:target + this = scope:target + } + } + } + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change_9 + } + becomes_independent = { change = scope:change_9 } + resolve_title_and_vassal_change = scope:change_9 + } + } + #being demoted to count + if = { + limit = { + NOT = { + any_held_title = { + tier >= tier_duchy + NOT = { + is_in_list = target_titles + } + } + } + } + every_vassal = { + limit = { + highest_held_title_tier >= tier_county + NOT = { + any_held_title = { + OR = { + kingdom = scope:target + this = scope:target + } + } + } + + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change_9 + } + becomes_independent = { change = scope:change_9 } + resolve_title_and_vassal_change = scope:change_9 + } + } + } + } + + scope:target = { + custom_tooltip = invasion_title_transfer_tt + } + + hidden_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + change = scope:change + take_occupied = no + } + every_in_list = { + list = target_titles + if = { + limit = { + tier = tier_duchy + OR = { + NOT = { exists = holder } + holder.top_liege = scope:defender + } + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + every_in_de_jure_hierarchy = { + limit = { + holder.top_liege = scope:defender + tier = tier_county + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + + resolve_title_and_vassal_change = scope:change + } + + + #Should gain target title, if possible + scope:attacker = { + if = { + limit = { + scope:target = { + OR = { + NOT = { + exists = holder + } + holder.top_liege = scope:defender + } + } + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change_0 + add_claim_on_loss = yes + } + scope:target = { + save_scope_as = new_primary + change_title_holder = { + holder = scope:attacker + change = scope:change_0 + } + } + resolve_title_and_vassal_change = scope:change_0 + } + else = { + #Gain capital duchy, if possible + if = { + limit = { + scope:target.title_capital_county.duchy = { + OR = { + NOT = { + exists = holder + } + holder.top_liege = scope:defender + } + } + } + hidden_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = change_1 + add_claim_on_loss = yes + } + scope:target.title_capital_county.duchy = { + change_title_holder = { + holder = scope:attacker + change = scope:change_1 + } + } + resolve_title_and_vassal_change = scope:change_1 + } + } + #Gain titular kingdom + if = { + limit = { + highest_held_title_tier < tier_kingdom + } + custom_tooltip = overrunning_gain_titular_kingdom_tt + hidden_effect = { + create_dynamic_title = { + tier = kingdom + name = FORMER_NOMAD_KINGDOM_NAME + adj = FORMER_NOMAD_KINGDOM_NAME_ADJ + } + scope:new_title = { + save_scope_as = new_primary + } + create_title_and_vassal_change = { + type = created + save_scope_as = change_2 + add_claim_on_loss = no + } + scope:new_title = { + set_destroy_on_gain_same_tier = yes + set_no_automatic_claims = yes + set_can_be_named_after_dynasty = yes + change_title_holder = { + holder = scope:attacker + change = scope:change_2 + } + set_color_from_title = scope:target + } + resolve_title_and_vassal_change = scope:change_2 + scope:new_title = { generate_coa = yes } + } + } + } + + #Make this their primary title, if highest tier + hidden_effect = { + if = { + limit = { + exists = scope:new_primary + NOT = { + highest_held_title_tier > scope:new_primary.tier + } + } + set_primary_title_to = scope:new_primary + } + } + } + + #Change attacker's government + scope:attacker = { + if = { + limit = { + exists = scope:becoming_tribal + } + nomad_convert_people_to_tribe_effect = yes + } + else_if = { + limit = { + exists = scope:becoming_clan + } + nomad_convert_people_to_clan_effect = yes + } + else = { + nomad_convert_people_to_feudal_effect = yes + } + } + + #Change capital to somewhere in new lands + scope:target = { + custom_tooltip = overrunning_move_capital_tt + } + + hidden_effect = { + scope:attacker = { + #Capital of kingdom, if available + if = { + limit = { + scope:target.title_capital_county = { + holder = scope:attacker + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + scope:target.title_capital_county = { + culture = { save_scope_as = expelled_culture } + } + scope:attacker = { + set_realm_capital = scope:target.title_capital_county + } + } + #Most developed duchy capital available + else_if = { + limit = { + scope:attacker = { + any_realm_de_jure_duchy = { + kingdom = scope:target + title_capital_county = { + holder = scope:attacker + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + } + } + scope:attacker = { + every_realm_de_jure_duchy = { + limit = { + kingdom = scope:target + title_capital_county = { + holder = scope:attacker + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + title_capital_county = { + add_to_list = duchy_capitals + } + } + } + ordered_in_list = { + list = duchy_capitals + order_by = development_level + culture = { save_scope_as = expelled_culture } + scope:attacker = { + set_realm_capital = prev + } + } + } + #Most developed county + else = { + ordered_realm_county = { + order_by = development_level + limit = { + kingdom = scope:target + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + culture = { save_scope_as = expelled_culture } + scope:attacker = { + set_realm_capital = prev + } + } + } + capital_county.duchy = { + save_scope_as = new_capital_duchy + } + } + } + + #Vassals gain titles + hidden_effect = { + scope:attacker = { + mpo_overrunning_vassal_title_distribution_effect = yes + } + } + + #Make sure defender vassals who should be independent... are + hidden_effect = { + if = { + limit = { + any_in_list = { + list = defender_vassals + liege = scope:attacker + } + } + every_in_list = { + list = defender_vassals + limit = { + liege = scope:attacker + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change_10 + } + becomes_independent = { change = scope:change_10 } + resolve_title_and_vassal_change = scope:change_10 + } + } + } + + scope:target = { + #Vassals tooltip + custom_tooltip = overrunning_vassals_gain_titles_tt + #We have the capital duchy and are ready to convert + custom_tooltip = overrunning_convert_capital_duchy_tt + custom_tooltip = overrunning_convert_dukes_capitals_tt + custom_tooltip = overrunning_convert_tribal_counties_tt + } + hidden_effect = { + scope:attacker.capital_county = { + duchy = { + save_scope_as = target_duchy + } + } + scope:attacker.capital_county = { + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + scope:attacker = { + every_vassal = { + limit = { + capital_county.kingdom = scope:target + highest_held_title_tier >= tier_duchy + } + #Convert capital to their culture + capital_county = { + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + } + while = { + limit = { + scope:invading_herd_value >= 5000 + any_sub_realm_county = { + NOT = { + culture = scope:invading_culture + } + } + } + random_sub_realm_county = { + limit = { + NOT = { + culture = scope:invading_culture + } + } + weight = { + base = 1 + modifier = { + add = { + every_neighboring_county = { + limit = { + culture = scope:invading_culture + } + add = 100 + } + } + any_neighboring_county = { + culture = scope:invading_culture + } + } + modifier = { + add = 10000 + any_neighboring_county = { + this = scope:attacker.capital_county + } + } + modifier = { + factor = 10 + is_coastal_county = yes + } + } + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + #Convert additional tribal county if possible + ordered_neighboring_county = { + order_by = { + value = development_level + multiply = -1 + } + limit = { + NOT = { culture = scope:invading_culture } + title_province = { + has_holding_type = tribal_holding + } + OR = { + holder = scope:attacker + holder = { + any_liege_or_above = { + this = scope:attacker + } + } + } + } + set_county_culture = scope:invading_culture + set_county_faith = scope:invading_faith + } + } + save_scope_value_as = { + name = invading_herd_value + value = { + add = scope:invading_herd_value + subtract = 5000 + } + } + } + } + } + #Counties lose development levels + scope:target = { + custom_tooltip = attackers_counties_lose_development + } + hidden_effect = { + scope:attacker = { + every_held_title = { + limit = { + tier = tier_county + kingdom = scope:target + } + if = { + limit = { + title_province = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + change_development_level = -1 + } + else_if = { + limit = { + current_year < 1065 + } + change_development_level = -2 + } + else_if = { + limit = { + current_year < 1250 + } + change_development_level = -3 + } + else = { + change_development_level = -5 + } + } + } + } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + modify_all_participants_fame_values = { + WINNER = scope:attacker + LOSER = scope:defender + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_invasion_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = 10 + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Event for attacker + scope:attacker = { + trigger_event = { + id = mpo_nomad_events.1040 + days = 1 + } + } + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_white_peace_desc_attacker + } + desc = overrunning_war_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_white_peace_effect = yes + + scope:attacker = { + add_dread = minor_dread_loss + add_legitimacy = minor_legitimacy_loss + add_prestige = mongol_invasion_cb_prestige_white_peace + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_surrender_desc_attacker + } + desc = overrunning_war_surrender_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + # Influence + add_influence_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Prestige loss for the attacker + scope:attacker = { + add_dread = major_dread_loss + add_legitimacy = major_legitimacy_loss + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 5 + } + add_prestige = { + value = massive_prestige_value + multiply = -1.0 + } + switch = { + trigger = has_realm_law + nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } + nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } + nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } + } + } + + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + claimant = scope:claimant + victory = no + } + + # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_claim_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "MPO_NOMAD_INVASION_WAR_NAME" + war_name_base = "MPO_NOMAD_INVASION_WAR_NAME_BASE" + cb_name = "MPO_NOMAD_INVASION_CB_NAME" + + interface_priority = 100 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +mpo_nomad_duchy_invasion_cb = { + icon = migration_cb + group = invasion + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + allow_hostages = no + + defender_score_from_occupation_scale = 50 + attacker_score_from_occupation_scale = 150 + + allowed_for_character = { + is_independent_ruler = yes + government_has_flag = government_is_nomadic + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier < tier_kingdom + #Are not capable of kingdom-level invasion + has_realm_law = nomadic_authority_2 + OR = { + is_landed = no + capital_county = { + has_bad_season_nomadic_capital_root_trigger = yes + } + mpo_nomad_duchy_invasion_war_ai_trigger = { NOMAD = root } + } + trigger_if = { + limit = { + NOT = { + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + sub_realm_size < 12 + } + } + } + + allowed_for_character_display_regardless = { + custom_tooltip = { + text = mpo_nomad_invasion_duchy_cb_tt + NOT = { + has_realm_law = nomadic_authority_1 + } + } + mpo_has_gok_mongol_empire_trigger = no + } + + target_titles = all + target_title_tier = duchy + target_de_jure_regions_above = yes + + ai_can_target_all_titles = { + has_character_flag = nomad_duchy_invasion_all_target_override + } + + max_ai_diplo_distance_to_title = 850 + ai_score = { + value = { + add = { + if = { + limit = { + scope:attacker = { + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + title_province = { has_holding_type = castle_holding } + } + add = 1000 + } + } + } + else_if = { + limit = { + scope:attacker = { + OR = { + is_landed = no + AND = { + ai_boldness >= 50 + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + OR = { + sub_region_current_phase = situation_steppe_white_zud_season + sub_region_current_phase = situation_steppe_cold_zud_season + sub_region_current_phase = situation_steppe_severe_drought_season + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + } + } + } + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + title_province = { has_holding_type = castle_holding } + } + add = 100 + } + } + } + if = { + limit = { + scope:attacker = { + any_character_situation = { + this = situation:the_great_steppe + } + } + any_in_list = { + list = target_titles + tier = tier_duchy + OR = { + kingdom ?= title:k_anatolia + kingdom ?= title:k_pontus + #kingdom ?= title:k_delhi + kingdom ?= title:k_bulgaria + #kingdom ?= title:k_syria + kingdom ?= title:k_nikaea + kingdom ?= title:k_georgia + kingdom ?= title:k_armenia + kingdom ?= title:k_galicia-volhynia + #kingdom ?= title:k_goguryeo + kingdom ?= title:k_ruthenia + #empire ?= { + # OR = { + # this = title:e_persia + # this = title:e_turan + # this = title:e_yongliang + # this = title:e_zhongyuan + # this = title:e_carpathia + # this = title:e_great_yuan + # this = title:e_chagatai + # this = title:e_ilkhanate + # this = title:e_golden_horde + # this = title:e_tartaria + # this = title:e_andong + # this = title:e_caspian-pontic_steppe + # } + #} + } + } + } + multiply = 5 + } + #weigh down non-neighboring states, nomadic heritage, already invaded targets + if = { + limit = { + scope:defender = { + OR = { + NOT = { + any_land_neighboring_realm_with_tributaries_owner = { + this = scope:attacker + } + } + culture = { + OR = { + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_berber + } + } + any_character_war = { + OR = { + using_cb = mpo_nomad_duchy_invasion_cb + using_cb = mpo_nomad_invasion_cb + } + } + current_military_strength > scope:attacker.eighty_percent_of_current_military_strength + } + } + } + multiply = 0.1 + } + if = { + limit = { + any_in_list = { + list = target_titles + has_variable = was_overrun + } + } + multiply = 0.2 + } + #Should not target islands... ever + if = { + limit = { + any_in_list = { + list = target_titles + tier = tier_duchy + OR = { + this = title:d_mallorca + this = title:d_canarias + #this = title:d_socotra + #this = title:d_tamna + this = title:d_northern_isles + kingdom =? title:k_iceland + #kingdom ?= title:k_hitakami + #kingdom ?= title:k_aynumosir + kingdom ?= title:k_sardinia + kingdom ?= title:k_krete + kingdom ?= title:k_cyprus + empire ?= { + OR = { + #this = title:e_japan + this = title:e_britannia + #this = title:e_nusantara + #this = title:e_srivijaya + } + } + } + } + } + multiply = 0 + } + } + if = { + limit = { + scope:attacker = { + any_owned_story = { + OR = { + story_type = story_mongol_invasion + story_type = story_greatest_of_khans + } + } + } + } + multiply = 0 + } + } + } + ai_score_mult = { + value = 1 + + # HOUSE RELATIONS + add = house_relation_ai_score_value + + # AI in struggles act insularly for wars that don't have a familial or legal basis. + multiply = struggle_wars_prioritise_struggle_targets_value + # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + + multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } + + valid_to_start = { + scope:target = { + #At least one settled county, y'know + custom_tooltip = { + text = at_least_one_non_nomad_county_tt + any_de_jure_county = { + holder.top_liege = scope:defender + NOT = { + title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + target_is_same_character_or_above = scope:defender + } + } + } + } + } + + on_invalidated_desc = msg_invasion_war_invalidated_message + + on_invalidated = { + } + + cost = { + piety = { + value = common_cb_impious_piety_cost + } + prestige = { + add = { + value = 800 + + desc = CB_BASE_COST + } + multiply = common_cb_prestige_cost_multiplier + if = { + limit = { + scope:attacker = { is_ai = yes } + } + multiply = 0.5 + } + } + } + + on_declaration = { + on_declared_war = yes + random_in_list = { + list = target_titles + limit = { + tier = tier_duchy + } + save_scope_as = target + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_duchy_war_victory_desc_attacker + } + desc = overrunning_duchy_war_victory_desc + } + first_valid = { + triggered_desc = { + trigger = { + + mpo_overrunner_becomes_tribal_desc_trigger = yes + } + desc = overrunning_war_victory_desc_tribal + } + triggered_desc = { + trigger = { + mpo_overrunner_becomes_clan_desc_trigger = yes + } + desc = overrunning_war_victory_desc_clan + } + desc = overrunning_war_victory_desc_feudal + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_victory_warning_desc_attacker + } + desc = overrunning_war_victory_warning_desc + } + } + + on_victory = { + #GoK stops really being GoK + scope:attacker = { + gok_government_change_story_end_effect = yes + } + + scope:attacker = { + domicile.domicile_culture = { save_scope_as = invading_culture } + domicile.domicile_faith = { save_scope_as = invading_faith } + save_scope_value_as = { + name = invading_herd_value + value = domicile.herd + } + if = { + limit = { + exists = confederation + } + confederation = { + remove_confederation_member = scope:attacker + } + } + } + + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy and gold + scope:attacker = { + if = { + limit = { + scope:defender = { + government_has_flag = government_is_tribal + } + } + add_short_term_gold = minor_gold_value + } + else = { + add_short_term_gold = medium_gold_value + } + add_legitimacy = minor_legitimacy_gain + } + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + + scope:defender = { + every_vassal = { + add_to_list = defender_vassals + } + } + + random_in_list = { + list = target_titles + limit = { + tier = tier_duchy + } + save_scope_as = target + set_variable = { + name = was_overrun + years = 20 + } + } + scope:attacker = { + if = { + limit = { + mpo_overrunner_becomes_tribal_trigger = yes + } + save_scope_as = becoming_tribal + } + else_if = { + limit = { + mpo_overrunner_becomes_clan_trigger = yes + } + save_scope_as = becoming_clan + } + } + + scope:target = { + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + holder.top_liege = scope:defender + NOT = { + is_in_list = target_titles + } + } + add_to_list = target_titles + } + } + + scope:attacker = { save_scope_as = overrunner } + + #Add vassals to a list - they may move with attacker + scope:attacker = { + every_vassal = { + limit = { + mpo_overrunning_willing_vassal_trigger = yes + } + add_to_list = potential_overrunning_vassals + } + } + + #Wrap up being a nomad + scope:attacker = { + mpo_overrunning_ending_nomadism_effect = yes + every_tributary = { + custom = custom.every_tributary + end_tributary = yes + } + } + + #Tooltip that defender will lose vassals after losing title + scope:defender = { + if = { + limit = { + scope:target = { + holder = scope:defender + } + NOT = { + any_held_title = { + tier >= tier_duchy + this = scope:target + } + } + } + custom_tooltip = overrunning_defender_lose_vassals_tt + } + } + #If defender loses rank, make sure vassals become independent instead of going under attacker + hidden_effect = { + scope:defender = { + #being demoted to duke + if = { + limit = { + NOT = { + any_held_title = { + tier >= tier_duchy + NOT = { + is_in_list = target_titles + } + } + } + } + every_vassal = { + limit = { + highest_held_title_tier >= tier_county + NOT = { + any_held_title = { + OR = { + kingdom = scope:target + this = scope:target + } + } + } + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change_9 + } + becomes_independent = { change = scope:change_9 } + resolve_title_and_vassal_change = scope:change_9 + } + } + } + } + + scope:target = { + custom_tooltip = overrunning_title_transfer_tt + } + + hidden_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + change = scope:change + take_occupied = no + } + every_in_list = { + list = target_titles + if = { + limit = { + tier = tier_duchy + OR = { + NOT = { exists = holder } + holder.top_liege = scope:defender + } + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + every_in_de_jure_hierarchy = { + limit = { + holder.top_liege = scope:defender + tier = tier_county + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + } + + resolve_title_and_vassal_change = scope:change + } + + #Should gain target title, if possible + scope:attacker = { + if = { + limit = { + scope:target = { + OR = { + NOT = { + exists = holder + } + holder.top_liege = scope:defender + } + } + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change_0 + add_claim_on_loss = yes + } + scope:target = { + save_scope_as = new_primary + change_title_holder = { + holder = scope:attacker + change = scope:change_0 + } + } + resolve_title_and_vassal_change = scope:change_0 + } + else = { + #Gain titular duchy + if = { + limit = { + highest_held_title_tier < tier_duchy + } + custom_tooltip = overrunning_gain_titular_duchy_tt + hidden_effect = { + create_dynamic_title = { + tier = duchy + name = FORMER_NOMAD_DUCHY_NAME + adj = FORMER_NOMAD_DUCHY_NAME_ADJ + } + scope:new_title = { + save_scope_as = new_primary + } + create_title_and_vassal_change = { + type = created + save_scope_as = change_2 + add_claim_on_loss = no + } + scope:new_title = { + set_destroy_on_gain_same_tier = yes + set_no_automatic_claims = yes + set_can_be_named_after_dynasty = yes + change_title_holder = { + holder = scope:attacker + change = scope:change_2 + } + set_color_from_title = scope:target + } + resolve_title_and_vassal_change = scope:change_2 + scope:new_title = { generate_coa = yes } + } + } + } + + #Make this their primary title, if highest tier + hidden_effect = { + if = { + limit = { + exists = scope:new_primary + NOT = { + highest_held_title_tier > scope:new_primary.tier + } + } + set_primary_title_to = scope:new_primary + } + } + } + + #Change attacker's government + scope:attacker = { + if = { + limit = { + exists = scope:becoming_tribal + } + nomad_convert_people_to_tribe_effect = yes + } + else_if = { + limit = { + exists = scope:becoming_clan + } + nomad_convert_people_to_clan_effect = yes + } + else = { + nomad_convert_people_to_feudal_effect = yes + } + } + + #Change capital to somewhere in new lands + scope:target = { + custom_tooltip = overrunning_move_capital_tt + } + + hidden_effect = { + scope:attacker = { + #Capital of duchy, if available + if = { + limit = { + scope:target.title_capital_county = { + holder = scope:attacker + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + scope:target.title_capital_county = { + culture = { save_scope_as = expelled_culture } + } + scope:attacker = { + set_realm_capital = scope:target.title_capital_county + } + } + #Most developed county + else = { + ordered_realm_county = { + order_by = development_level + limit = { + kingdom = scope:target + NOT = { + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + culture = { save_scope_as = expelled_culture } + scope:attacker = { + set_realm_capital = prev + } + } + } + capital_county.duchy = { + save_scope_as = new_capital_duchy + } + } + } + + #Vassals gain titles + hidden_effect = { + scope:attacker = { + mpo_duchy_overrunning_vassal_title_distribution_effect = yes + } + } + + #Make sure defender vassals who should be independent... are + hidden_effect = { + if = { + limit = { + any_in_list = { + list = defender_vassals + liege = scope:attacker + } + } + every_in_list = { + list = defender_vassals + limit = { + liege = scope:attacker + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change_10 + } + becomes_independent = { change = scope:change_10 } + resolve_title_and_vassal_change = scope:change_10 + } + } + } + + scope:target = { + #Vassals tooltip + custom_tooltip = overrunning_vassals_gain_titles_duchy_tt + } + #Counties lose development levels if not tribal + if = { + limit = { + scope:attacker = { + any_held_title = { + tier = tier_county + duchy = scope:target + NOT = { + title_province = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + } + } + scope:target = { + custom_tooltip = attackers_counties_lose_development + } + } + + hidden_effect = { + scope:attacker = { + every_held_title = { + limit = { + tier = tier_county + duchy = scope:target + NOT = { + title_province = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + if = { + limit = { + current_year < 1065 + } + change_development_level = -1 + } + else_if = { + limit = { + current_year < 1250 + } + change_development_level = -2 + } + else = { + change_development_level = -4 + } + } + } + } + + #Leave tributaries that don't border you + scope:attacker = { + every_tributary = { + limit = { + NOR = { + top_liege = scope:attacker.top_liege + any_realm_border_county = { + any_neighboring_county = { + holder = scope:attacker + } + } + } + } + custom = custom.every_no_longer_neighbor_tributary + end_tributary = yes + } + } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + modify_all_participants_fame_values = { + WINNER = scope:attacker + LOSER = scope:defender + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_invasion_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = 10 + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + #Event for attacker + scope:attacker = { + trigger_event = { + id = mpo_nomad_events.1040 + days = 1 + } + } + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_white_peace_desc_attacker + } + desc = overrunning_war_white_peace_desc + } + } + + on_white_peace = { + + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_white_peace_effect = yes + + scope:attacker = { + add_dread = minor_dread_loss + add_legitimacy = minor_legitimacy_loss + add_prestige = mongol_invasion_cb_prestige_white_peace + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + scope:defender = { + stress_and_fulfillment_impact = { + arrogant = medium_stress_impact_gain + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = invasion_war_white_peace_desc_defender + } + desc = invasion_war_white_peace_desc + } + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = overrunning_war_surrender_desc_attacker + } + desc = overrunning_war_surrender_desc + } + } + + on_defeat = { + + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + # Influence + add_influence_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Prestige loss for the attacker + scope:attacker = { + add_dread = major_dread_loss + add_legitimacy = major_legitimacy_loss + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + add_prestige = { + value = massive_prestige_value + multiply = -1.0 + } + switch = { + trigger = has_realm_law + nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } + nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } + nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } + } + } + + setup_invasion_cb = { + titles = target_titles + attacker = scope:attacker + defender = scope:defender + claimant = scope:claimant + victory = no + } + + # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_claim_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 10 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "MPO_NOMAD_DUCHY_INVASION_WAR_NAME" + war_name_base = "MPO_NOMAD_DUCHY_INVASION_WAR_NAME_BASE" + cb_name = "MPO_NOMAD_DUCHY_INVASION_CB_NAME" + + interface_priority = 100 + + use_de_jure_wargoal_only = yes + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +########## +# Humiliation CB +########## + +humiliation_cb = { + icon = humiliation_cb + group = humiliation + + ai_only_against_neighbors = yes + + allow_hostages = no + allowed_for_character = { + government_has_flag = government_is_nomadic + is_landed = yes + } + + allowed_against_character = { + scope:defender = { + government_has_flag = government_is_nomadic + is_landed = yes + NOT = { has_realm_law = nomadic_authority_5 } # If they've become Genghis it's too late for this + } + OR = { + # You have lower Dominance than them + scope:attacker = { + mpo_lower_nomad_authority_trigger = { CHARACTER = scope:defender } + } + # They're the Gurkhan + scope:defender = { is_gurkhan = yes } + } + } + + ignore_effect = change_title_holder + + should_invalidate = { + OR = { + scope:attacker = { NOT = { government_has_flag = government_is_nomadic } } + scope:defender = { NOT = { government_has_flag = government_is_nomadic } } + scope:defender = { is_landed = no } + } + } + + on_invalidated_desc = msg_remove_humiliation_cb_invalidated_message + + cost = { + prestige = { + add = { + value = 75 + desc = CB_BASE_COST + } + multiply = common_cb_prestige_cost_multiplier + if = { + limit = { + scope:attacker = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_free_humiliation + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:attacker + } + } + } + } + } + multiply = { + value = 0 + desc = CB_STEPPE_SEASON_DISCOUNT + } + } + } + } + + on_declaration = { + on_declared_war = yes + scope:attacker = { + every_in_list = { + variable = obedient_vassals + limit = { is_ai = yes } + scope:war = { add_attacker = prev } + } + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = humiliation_cb_victory_desc_attacker + } + desc = humiliation_cb_victory_desc + } + } + + on_victory = { + # Lowers the Dominance leavel of the Defender + scope:defender = { + lower_dominance_level_effect = yes + if = { + limit = { is_independent_ruler = yes } + # They will lose some land to Herders + custom_tooltip = humiliation_cb_release_herder_land_tt + mpo_release_herder_land_effect = yes + } + } + + scope:defender = { + pay_herd = { + target = scope:attacker + value = { + add = domicile.massive_herd_value + if = { + limit = { + scope:defender.primary_title.tier <= tier_duchy + } + multiply = 0.5 + } + } + } + } + + # You "take" some of their Prestige + scope:defender = { + add_prestige = major_prestige_loss + } + scope:attacker = { + add_prestige = major_prestige_gain + } + + scope:defender = { + # Some of their obedient vassals become not obedient + custom_tooltip = humiliation_cb_not_obedient_tt + every_vassal = { + limit = { + is_obedient_to = scope:defender + } + add_to_list = obedient_vassals + } + } + ordered_in_list = { + list = obedient_vassals + order_by = prowess + max = { + value = list_size:obedient_vassals + multiply = 0.5 + } + set_variable = { + name = not_obedient_humiliation_var + value = scope:defender + years = 5 + } + } + + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + + # Prestige Progress for the Attacker + scope:attacker = { + add_prestige_experience = { + every_in_list = { + list = target_titles + add = medium_prestige_value + } + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = humiliation_cb_white_peace_desc_defender + } + desc = humiliation_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing pretty good against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not impactful as the scale are identical + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = humiliation_cb_defeat_desc_defender + } + desc = humiliation_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "HUMILIATION_WAR_CB_NAME" + war_name_base = "HUMILIATION_WAR_CB_NAME_BASE" + cb_name = "HUMILIATION_WAR_CB_NAME" + + interface_priority = 79 + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_battles = 150 + max_attacker_score_from_battles = 150 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + ai_score = { + value = { + value = 25 + multiply = scope:attacker.ai_boldness + } + } +} + +########## +# Retaliation CB +########## + +retaliation_cb = { + icon = retaliation_cb + group = humiliation + + allow_hostages = no + allowed_for_character = { + government_allows = obedience + has_variable_list = retaliation_cb_var_list + exists = scope:defender + is_target_in_variable_list = { + name = retaliation_cb_var_list + target = scope:defender + } + is_landed = yes + } + + allowed_for_character_display_regardless = { # They're already your Tributary + scope:defender = { + NOT = { is_tributary_of = scope:attacker } + is_landed = yes + } + } + + allowed_against_character = { + scope:defender = { + government_has_flag = government_is_nomadic + } + } + + ai_score = { + value = { + value = 100 + scope:defender = { + every_sub_realm_county = { + add = 100 + } + } + scope:attacker = { + if = { + limit = { + domain_size >= domain_limit + } + multiply = 5 + } + } + if = { + limit = { + scope:attacker.ai_vengefulness > 0 + } + multiply = scope:attacker.ai_vengefulness + } + } + } + + ai_score_mult = { + value = 3 + } + + ignore_effect = change_title_holder + + should_invalidate = { + OR = { + scope:attacker = { is_landed = no } + scope:defender = { is_landed = no } + } + } + + on_invalidated_desc = msg_remove_retaliation_cb_invalidated_message + + cost = { + prestige = { + add = { + value = 75 + desc = CB_BASE_COST + } + multiply = common_cb_prestige_cost_multiplier + if = { + limit = { + scope:attacker = { + any_character_situation = { + any_situation_sub_region = { + has_sub_region_phase_parameter = the_great_steppe_free_retaliation + any_situation_sub_region_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = scope:attacker + } + } + } + } + } + multiply = { + value = 0 + desc = CB_STEPPE_SEASON_DISCOUNT + } + } + } + } + + on_declaration = { + on_declared_war = yes + scope:attacker = { + every_in_list = { + variable = obedient_vassals + limit = { is_ai = yes } + scope:war = { add_attacker = prev } + } + } + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = retaliation_cb_victory_desc_attacker + } + desc = retaliation_cb_victory_desc + } + } + + on_victory = { + # Make them a Tributary + if = { # This if/else exists for localization purposes, since it could be parsed before the war starts + limit = { exists = root.war } + start_tributary_from_war_effect = { + TRIBUTARY = scope:defender + SUZERAIN = scope:attacker + WAR = root.war + } + } + else = { + start_tributary_interaction_effect = { + TRIBUTARY = scope:defender + SUZERAIN = scope:attacker + } + } + + #If you tributarize a confederate, they leave their confederation + if = { + limit = { + scope:defender = { + is_confederation_member = yes + } + } + scope:defender.confederation = { + remove_confederation_member = scope:defender + } + } + + # They pay you Herd or Gold + if = { + limit = { + scope:defender = { government_has_flag = government_is_nomadic } + scope:attacker = { government_has_flag = government_is_nomadic } + } + scope:defender = { + pay_herd = { + target = scope:attacker + value = domicile.massive_herd_value + } + } + } + else = { + scope:defender = { + pay_short_term_gold = { + target = scope:attacker + gold = massive_gold_value + } + } + } + + + # You "take" some of their Prestige + scope:defender = { + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + add_prestige = major_prestige_loss + } + else_if = { + limit = { + highest_held_title_tier >= tier_duchy + } + add_prestige = medium_prestige_loss + } + else = { + add_prestige = minor_prestige_loss + } + } + scope:attacker = { + if = { + limit = { + scope:defender = { highest_held_title_tier >= tier_kingdom } + } + add_prestige = scope:defender.major_prestige_gain + } + else_if = { + limit = { + scope:defender = { highest_held_title_tier >= tier_duchy } + } + add_prestige = scope:defender.medium_prestige_gain + } + else = { + add_prestige = scope:defender.minor_prestige_gain + } + } + + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + + # Prestige Progress for the Attacker + every_in_list = { + list = target_titles + scope:attacker = { + add_prestige_experience = medium_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # We clean up the CB + hidden_effect = { + scope:attacker = { + remove_list_variable = { + name = retaliation_cb_var_list + target = scope:defender + } + } + } + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = retaliation_cb_white_peace_desc_defender + } + desc = retaliation_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing pretty good against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + scope:attacker = { + add_prestige = { + value = minor_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not impactful as the scale are identical + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_white_peace_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = retaliation_cb_defeat_desc_defender + } + desc = retaliation_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } + scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = medium_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "RETALIATION_WAR_CB_NAME" + war_name_base = "RETALIATION_WAR_CB_NAME_BASE" + cb_name = "RETALIATION_WAR_CB_NAME" + + interface_priority = 79 + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_battles = 150 + max_attacker_score_from_battles = 150 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 +} + +################# +# Domination CB # +################# +domination_cb = { + icon = county_conquest_cb + group = event + + should_show_war_goal_subview = yes + + allowed_for_character = { + always = no + } + + ignore_effect = change_title_holder + target_titles = all + use_de_jure_wargoal_only = yes + target_de_jure_regions_above = yes + white_peace_possible = no + + attacker_score_from_occupation_scale = 150 + attacker_score_from_battles_scale = 150 + defender_score_from_battles_scale = 150 + imprisonment_by_attacker_give_war_score = no + + ai_score_mult = { + value = 1 + } + + on_invalidated_desc = msg_county_conquest_war_invalidated_message + + cost = { + prestige = { + value = 50 + multiply = common_cb_prestige_cost_multiplier + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = county_conquest_cb_victory_desc_attacker + } + desc = county_conquest_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + + every_in_list = { + list = target_titles + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + scope:war = { + every_war_defender = { + custom = every_defender + limit = { + government_has_flag = government_is_in_steppe + } + if = { + limit = { + exists = this.confederation + } + confederation = { remove_confederation_member = prev } + } + + if = { # This if/else exists for localization purposes, since it could be parsed before the war starts + limit = { exists = root.war } + start_tributary_from_war_effect = { + TRIBUTARY = this + SUZERAIN = scope:attacker + WAR = root.war + } + } + else = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = scope:attacker + } + } + + add_opinion = { + modifier = crushed_opponent_opinion + target = scope:attacker + opinion = 15 + } + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + # Truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_white_peace_desc_defender + } + + } + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = county_conquest_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { + scope:attacker = { + is_local_player = yes + has_targeting_faction = yes + } + } + desc = county_conquest_cb_defeat_desc_attacker + } + desc = county_conquest_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + # Prestige loss for the attacker + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + add_prestige = medium_prestige_loss + add_dread = -50 + } + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + # Prestige for Defender + add_prestige_war_defender_effect = { + PRESTIGE_VALUE = medium_prestige_value + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 + } + + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "DOMINATION_WAR_WAR_NAME" + war_name_base = "DOMINATION_WAR_WAR_NAME_BASE" + cb_name = "DOMINATION_WAR_CB_NAME" + + interface_priority = 75 + + attacker_wargoal_percentage = 1.5 + + max_defender_score_from_battles = 150 + max_attacker_score_from_battles = 150 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + defender_ticking_warscore = 0.05 +} + + +###################### +# Nomadic De Jure CB # +###################### +de_jure_cb_nomadic = { + icon = individual_duchy_de_jure_cb + group = de_jure + should_check_for_interface_availability = no + + combine_into_one = yes + should_show_war_goal_subview = yes + mutually_exclusive_titles = { always = yes } + + allowed_for_character = { + scope:attacker = { + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier >= tier_kingdom + } + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_duchy + } + } + + allowed_against_character = { + NOR = { + scope:defender = { target_is_liege_or_above = scope:attacker } + scope:attacker = { target_is_liege_or_above = scope:defender } + } + } + target_titles = neighbor_land + target_title_tier = all + target_de_jure_regions_above = yes + ignore_effect = change_title_holder + ai_only_against_neighbors = yes + + valid_to_start = { + scope:target = { + trigger_if = { + limit = { + tier = tier_county + } + any_county_situation = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + } + } + } + trigger_else = { + any_de_jure_county = { + any_county_situation = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + } + } + } + } + tier = scope:attacker.mpo_de_jure_title_value + OR = { + # Internal + any_this_title_or_de_jure_above = { + holder ?= { + OR = { + this = scope:attacker + target_is_liege_or_above = scope:attacker + } + } + } + # External + AND = { + scope:attacker = { + highest_held_title_tier >= tier_kingdom + } + scope:target = { + NOT = { de_jure_liege = scope:attacker.primary_title } + switch = { + trigger = scope:target.tier + tier_empire = { + any_title_to_title_neighboring_empire = { + any_this_title_or_de_jure_above = { + this = scope:attacker.primary_title + } + } + } + tier_kingdom = { + any_title_to_title_neighboring_kingdom = { + any_this_title_or_de_jure_above = { + this = scope:attacker.primary_title + } + } + } + tier_duchy = { + any_title_to_title_neighboring_duchy = { + any_this_title_or_de_jure_above = { + this = scope:attacker.primary_title + } + } + } + } + } + } + } + } + } + + cost = { + prestige = { + value = 0 + # scale base value based on number of counties x 100 + add = { + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { # goes down, not up + limit = { + tier = tier_county + holder.top_liege = scope:defender + NOT = { target_is_de_jure_liege_or_above = scope:attacker.primary_title } + } + add = 300 + } + } + desc = CB_CLAIM_COST_TARGET_TITLES_FOREIGN + } + add = { + every_in_list = { + list = target_titles + every_in_de_jure_hierarchy = { # goes down, not up + limit = { + tier = tier_county + holder.top_liege = scope:defender + target_is_de_jure_liege_or_above = scope:attacker.primary_title + } + add = 100 + } + } + desc = CB_CLAIM_COST_TARGET_TITLES + } + + multiply = common_cb_prestige_cost_multiplier + } + } + + should_invalidate = { + NOT = { + any_in_list = { + list = target_titles + any_in_de_jure_hierarchy = { + tier = tier_county + holder = { + OR = { + this = scope:defender + target_is_liege_or_above = scope:defender + } + } + } + } + } + } + + on_invalidated_desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:attacker.liege = { + any_character_war = { + primary_defender = { + save_temporary_scope_as = defender_check + } + } + } + scope:defender = scope:defender_check + } + desc = msg_de_jure_duchy_war_invalidated_liege_war_message + } + desc = msg_de_jure_duchy_war_invalidated_message + } + } + + on_invalidated = { + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = de_jure_cb_victory_desc_attacker + } + desc = de_jure_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + mpo_war_vassal_tributary_effect = { WAR = root.war } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + modify_all_participants_fame_values = { + WINNER = scope:attacker + LOSER = scope:defender + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_de_jure_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = 2 + LOSER_FAME_SCALE = -2 + WINNER_ALLY_FAME_SCALE = 20 + LOSER_ALLY_FAME_SCALE = 20 + } + + # truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = de_jure_cb_white_peace_desc_defender + } + desc = de_jure_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + # Create an 'helper' de jure CB which we won't execute, but can use to determine how much Prestige should be given to war participants. + every_in_list = { + list = target_titles + save_temporary_scope_as = target + } + setup_de_jure_cb = { + attacker = scope:attacker + defender = scope:defender + victory = no + title = scope:target + } + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = scope:cb_prestige_factor # Set by 'setup_de_jure_cb' + multiply = -5.0 + } + } + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_de_jure_cb' + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 100 + LOSER_ALLY_FAME_SCALE = 100 + } + # Defender neither gains nor loses any prestige. + + # Truce + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = de_jure_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = de_jure_cb_defeat_desc_attacker + } + desc = de_jure_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Attacker must pay the defender war reparations. + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + } + + # Create an 'helper' de jure CB which we won't execute, but can use to determine how much Prestige should be given to war participants. + every_in_list = { + list = target_titles + save_temporary_scope_as = target + } + setup_de_jure_cb = { + attacker = scope:attacker + defender = scope:defender + victory = no + title = scope:target + } + # Attacker loses Prestige, all other participants gain Prestige based on their war contribution (Defender gets full Prestige). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = scope:cb_prestige_factor # Set by 'setup_de_jure_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 100 + LOSER_ALLY_FAME_SCALE = 100 + } + + # Truce + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + transfer_behavior = transfer + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "NOMAD_DEJURE_CB_WAR_NAME" + war_name_base = "NOMAD_DEJURE_CB_WAR_NAME_BASE" + cb_name = NOMAD_DEJURE_CB_NAME + cb_name_no_target = NOMAD_DEJURE_CB_NAME_GENERIC + interface_priority = 99 # Below the "take all" one + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_battles = 100 + max_attacker_score_from_battles = 100 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + defender_ticking_warscore = 0.05 + + max_ai_diplo_distance_to_title = 500 + + ai_score_mult = { + value = 3 + if = { + limit = { + scope:attacker = { + OR = { + is_landed = no + capital_county = { + any_county_situation_sub_region = { + situation_sub_region_has_county = prev + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + } + multiply = 0.33 + } + if = { + limit = { + scope:defender = { + any_owned_story = { + story_type = frankokratia_story + NOT = { has_variable = franko_war_complete } + } + } + } + multiply = 0 + } + } +} + +################## +# Sovereignty CB # +################## +sovereignty_cb = { + icon = retaliation_cb + group = subjugation + should_check_for_interface_availability = no + + allowed_for_character = { + scope:attacker = { + is_landed = yes + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier >= tier_kingdom + } + government_has_flag = government_is_nomadic + } + } + + allowed_against_character = { + scope:defender = { + is_landed = yes + government_has_flag = government_is_nomadic + } + NOR = { + scope:defender = { target_is_liege_or_above = scope:attacker } + scope:attacker = { target_is_liege_or_above = scope:defender } + } + } + target_titles = none + ignore_effect = change_title_holder + + valid_to_start = { + scope:defender = { + any_tributary = { + any_neighboring_top_liege_realm_owner = { + OR = { + this = scope:attacker + suzerain ?= scope:attacker + } + } + } + } + } + + cost = { + prestige = { + value = 250 + + multiply = common_cb_prestige_cost_multiplier + } + } + + should_invalidate = { + NOT = { + scope:defender = { + any_tributary = { + any_neighboring_top_liege_realm_owner = { + OR = { + this = scope:attacker + suzerain ?= scope:attacker + } + } + } + } + } + } + + on_invalidated_desc = must_neighbor_or_neighbor_tributary_tt + + on_invalidated = { + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = sovereignty_cb_victory_desc_attacker + } + desc = sovereignty_cb_victory_desc + } + } + + on_victory = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + + custom_tooltip = sovereignty_war_tributary_switch + hidden_effect = { + scope:defender = { + while = { + limit = { + any_tributary = { + any_neighboring_top_liege_realm_owner = { + OR = { + this = scope:attacker + suzerain ?= scope:attacker + } + } + } + } + random_tributary = { + limit = { + any_neighboring_top_liege_realm_owner = { + OR = { + this = scope:attacker + suzerain ?= scope:attacker + } + } + } + save_scope_as = current_tributary + start_tributary_from_war_effect = { + TRIBUTARY = scope:current_tributary + SUZERAIN = scope:attacker + WAR = root.war + } + } + } + } + } + + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. + modify_all_participants_fame_values = { + WINNER = scope:attacker + LOSER = scope:defender + FAME_BASE = 50 # Set by 'setup_de_jure_cb' + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = 2 + LOSER_FAME_SCALE = -2 + WINNER_ALLY_FAME_SCALE = 20 + LOSER_ALLY_FAME_SCALE = 20 + } + + # truce + add_truce_attacker_victory_effect = yes + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_white_peace_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = sovereignty_cb_white_peace_desc_defender + } + desc = sovereignty_cb_white_peace_desc + } + } + + on_white_peace = { + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } + + # Create an 'helper' de jure CB which we won't execute, but can use to determine how much Prestige should be given to war participants. + every_in_list = { + list = target_titles + save_temporary_scope_as = target + } + + # Prestige loss for the attacker + scope:attacker = { + add_prestige = { + value = 100 + multiply = -5.0 + } + } + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = 100 + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 100 + LOSER_ALLY_FAME_SCALE = 100 + } + # Defender neither gains nor loses any prestige. + + # Truce + add_truce_white_peace_effect = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = sovereignty_cb_defeat_desc_defender + } + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = sovereignty_cb_defeat_desc_attacker + } + desc = sovereignty_cb_defeat_desc + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Attacker must pay the defender war reparations. + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + } + + # Create an 'helper' de jure CB which we won't execute, but can use to determine how much Prestige should be given to war participants. + every_in_list = { + list = target_titles + save_temporary_scope_as = target + } + # Attacker loses Prestige, all other participants gain Prestige based on their war contribution (Defender gets full Prestige). + modify_all_participants_fame_values = { + WINNER = scope:defender + LOSER = scope:attacker + FAME_BASE = 10 + IS_RELIGIOUS_WAR = no + WINNER_FAME_SCALE = scale_10_war_defender_win + LOSER_FAME_SCALE = -10 + WINNER_ALLY_FAME_SCALE = 100 + LOSER_ALLY_FAME_SCALE = 100 + } + + # Truce + add_truce_attacker_defeat_effect = yes + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + transfer_behavior = transfer + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "SOVEREIGNTY_WAR_CB_NAME" + war_name_base = "SOVEREIGNTY_WAR_WAR_NAME_BASE" + #cb_name = NOMAD_DEJURE_CB_NAME + #cb_name_no_target = NOMAD_DEJURE_CB_NAME_GENERIC + interface_priority = 99 # Below the "take all" one + + attacker_wargoal_percentage = 0.8 + + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + + defender_ticking_warscore = 0.05 + + max_ai_diplo_distance_to_title = 500 + + ai_score = { + value = { + value = 50 + scope:defender = { + every_tributary = { + limit = { + any_neighboring_top_liege_realm_owner = { + OR = { + this = scope:attacker + suzerain ?= scope:attacker + } + } + } + every_sub_realm_county = { + add = 50 + } + } + } + scope:attacker = { + if = { + limit = { + domain_size >= domain_limit + } + multiply = 5 + } + } + } + } + + ai_score_mult = { + value = 1 + multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + } +} + + +#THE WAR THAT FORGES THE GREATEST OF KHANS +mpo_great_war_of_defiance_cb = { + icon = migration_cb + group = event + + full_occupation_by_defender_gives_victory = no + attacker_capital_gives_war_score = no + check_all_defenders_for_ticking_war_score = yes + defender_ticking_warscore_delay = { months = 4 } + defender_ticking_warscore = 0.125 + imprisonment_by_defender_give_war_score = no + defender_score_from_occupation_scale = 50 + attacker_score_from_occupation_scale = 50 + defender_score_from_battles_scale = 125 + attacker_score_from_battles_scale = 125 + ticking_war_score_targets_entire_realm = yes + + occupation_participation_mult = 0.5 + siege_participation_mult = 1 + battle_participation_mult = 7.5 + + allow_hostages = no + + allowed_against_character = { + is_landed = yes + any_character_situation = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + } + } + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_empire + } + + white_peace_possible = no + + cost = { + } + + target_titles = claim + target_title_tier = all + + on_declaration = { + on_declared_war = yes + } + + should_invalidate = { + scope:defender = { + OR = { + #Is vassal for some reason + is_independent_ruler = no + #Is landless nobody for some reason + NOR = { + is_landed = yes + is_landless_ruler = yes + } + } + + } + } + + on_invalidated_desc = { + desc = msg_great_war_of_defiance_war_invalidated_message + } + + on_invalidated = { + scope:attacker = { + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_war_attacker = { + add_to_list = anti_gok_attackers + } + } + } + every_in_list = { + list = anti_gok_attackers + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + } + scope:defender = { + add_prestige = medium_prestige_gain + remove_decision_cooldown = mpo_become_greatest_of_khans_decision + remove_character_modifier = aspiring_great_khan_modifier + } + mpo_gok_war_of_defiance_cleanup_effect = yes + remove_global_variable = mpo_gok_war_ongoing + + } + + on_victory_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = mpo_war_of_defiance_gok_loses_defender + } + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = mpo_war_of_defiance_gok_loses_attacker + } + desc = mpo_war_of_defiance_gok_loses_other + } + } + + on_victory = { + scope:attacker = { + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + save_scope_as = gok_war + every_war_attacker = { + add_to_list = anti_gok_attackers + } + every_war_defender = { + add_to_list = anti_gok_defenders + } + } + } + mpo_gok_war_of_defiance_cleanup_effect = yes + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + + scope:defender = { + #Vassals all become independent... + every_vassal = { + custom = custom.every_defender_vassal + limit = { + highest_held_title_tier >= tier_county + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + #Tributaries piss off + every_tributary = { + custom = custom.every_defender_tributary + end_tributary = yes + } + #You lose your titles to... herders + give_domain_to_herders = yes + add_legitimacy = monumental_legitimacy_loss + if = { + limit = { + government_has_flag = government_is_nomadic + exists = domicile + } + domicile = { + change_herd = negative_seventy_five_percent_herd_value + } + } + remove_short_term_gold = ninety_percent_gold_value + add_prestige = negative_seventy_five_percent_prestige_value + if = { + limit = { + government_has_flag = government_is_nomadic + has_realm_law = nomadic_authority_2 + NOT = { + has_realm_law = nomadic_authority_1 + } + } + add_realm_law = nomadic_authority_1 + } + else_if = { + limit = { + government_has_flag = government_is_nomadic + NOT = { + has_realm_law = nomadic_authority_1 + } + } + add_realm_law = nomadic_authority_2 + } + } + + custom_tooltip = mpo_war_of_defiance_gold_herd_tt + custom_tooltip = accolade_attackers_all_gain_glory_tt + hidden_effect = { + every_in_list = { + list = anti_gok_attackers + add_short_term_gold = medium_gold_value + if = { + limit = { + government_has_flag = government_is_nomadic + exists = domicile + } + domicile = { + change_herd = medium_herd_gain + } + } + if = { + limit = { + has_dlc_feature = accolades + } + accolade_attacker_war_end_glory_gain_very_high_effect = yes + } + } + } + scope:attacker = { + hidden_effect = { + add_opinion = { + modifier = tried_to_become_gok_opinion + target = scope:defender + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:defender + IMPRISONER = scope:attacker + } + } + + # Prestige level progress for the attacker + scope:attacker = { + add_prestige_experience = { + value = major_prestige_value + } + } + + # Prestige loss for the defender + scope:defender = { + add_prestige_level = -1 + } + + scope:attacker = { show_pow_release_message_effect = yes } + + #Memories + #Memory for Gurkhan + scope:defender = { + create_character_memory = { + type = gok_defeated_defiance_war + participants = { + opponent = scope:attacker + } + } + } + #Memory for Gurkhan vassals + every_in_list = { + list = anti_gok_defenders + limit = { + NOT = { + this = scope:defender + } + } + create_character_memory = { + type = gok_defeated_defiance_war_defenders + participants = { + gurkhan = scope:defender + } + } + } + #Memory for coalition + every_in_list = { + list = anti_gok_attackers + create_character_memory = { + type = gok_defeated_defiance_war_attackers + participants = { + gurkhan = scope:defender + } + } + } + + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 1 + } + remove_global_variable = mpo_gok_war_ongoing + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + # Truce + add_truce_attacker_victory_effect = yes + + #Notification event that Gurkhan is defeated + every_player = { + limit = { + OR = { + any_character_war = { + this = scope:gok_war + } + scope:defender = { + save_temporary_scope_as = root + } + mpo_war_of_defiance_notified_player_trigger = yes + } + } + trigger_event = { + id = mpo_greatest_of_khans.0103 + days = 2 + } + } + } + + on_white_peace_desc = {} + + on_defeat_desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = mpo_war_of_defiance_gok_wins_defender + } + desc = mpo_war_of_defiance_gok_wins_other + } + + } + + on_defeat = { + scope:defender = { + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_war_attacker = { + add_to_list = anti_gok_attackers + } + every_war_defender = { + add_to_list = anti_gok_defenders + } + } + } + + scope:defender = { + custom_tooltip = will_become_greatest_of_khans_tt + primary_title = { + save_scope_as = defender_title + } + custom_tooltip = every_new_vassal_becomes_obedient_tt + every_in_list = { + list = anti_gok_attackers + limit = { + government_has_flag = government_is_in_steppe + is_independent_ruler = yes + } + hidden_effect = { + add_opinion = { + modifier = obedience_opinion + target = scope:defender + years = 10 + } + } + if = { + limit = { + highest_held_title_tier < scope:defender.highest_held_title_tier + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = scope:defender + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + #They're the same rank... which is annoying + else_if = { + limit = { + highest_held_title_tier = scope:defender.highest_held_title_tier + } + hidden_effect = { + #Vassalize their vassals that are one rank lower than them + every_vassal = { + limit = { + highest_held_title_tier = prev.highest_held_title_tier_minus_one + } + hidden_effect = { + add_opinion = { + modifier = obedience_opinion + target = scope:defender + years = 10 + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = scope:defender + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + #Destroy all their same tier titles + every_held_title = { + limit = { + tier = scope:defender_title.tier + } + scope:attacker = { destroy_title = prev } + } + } + #Vassalize them + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = scope:defender + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + + add_legitimacy = monumental_legitimacy_gain + add_prestige = monumental_prestige_gain + + custom_tooltip = great_war_of_defiance_attackers_gold_tt + hidden_effect = { + every_in_list = { + list = anti_gok_attackers + limit = { + NOT = { + this = scope:attacker + } + } + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } + } + } + trigger_event = { + id = mpo_greatest_of_khans.0001 + days = 1 + } + } + # Truce + add_truce_attacker_defeat_effect = yes + + #Now uh... remove truces + scope:defender = { + custom_tooltip = gok_delete_all_truces_tt + hidden_effect = { + every_truce_target = { + scope:defender = { cancel_truce_one_way = prev } + } + } + } + + if = { + limit = { + has_dlc_feature = accolades + } + custom_tooltip = accolade_defenders_all_gain_glory_tt + hidden_effect = { + scope:defender = { + every_active_accolade = { + custom = custom.every_active_accolade + add_glory = massive_glory_gain + } + } + every_in_list = { + list = anti_gok_defenders + limit = { + NOT = { + this = scope:defender + } + } + every_active_accolade = { + add_glory = major_glory_gain + } + } + } + } + + # Legitimacy + scope:attacker = { + add_legitimacy = medium_legitimacy_loss + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 5 + } + } + + #Memories + #Memory for Gurkhan + scope:defender = { + create_character_memory = { + type = gok_won_defiance_war + participants = { + opponent = scope:attacker + } + } + } + #Memory for Gurkhan vassals + every_in_list = { + list = anti_gok_defenders + limit = { + NOT = { + this = scope:defender + } + } + create_character_memory = { + type = gok_won_defiance_war_defenders + participants = { + gurkhan = scope:defender + } + } + } + #Memory for coalition + every_in_list = { + list = anti_gok_attackers + create_character_memory = { + type = gok_won_defiance_war_attackers + participants = { + gurkhan = scope:defender + } + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = major_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 10 + LOSER_ALLY_FAME_SCALE = 1 + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + remove_global_variable = mpo_gok_war_ongoing + } + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + #This should sometimes invalidate, reflecting some reqs from decision + check_defender_inheritance_validity = yes + + transfer_behavior = transfer + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "MPO_GREAT_WAR_OF_DEFIANCE_NAME" + my_war_name = "MPO_GREAT_WAR_OF_DEFIANCE_NAME_MY" + war_name_base = "MPO_GREAT_WAR_OF_DEFIANCE_NAME_BASE" + cb_name = "MPO_GREAT_WAR_OF_DEFIANCE_NAME" + interface_priority = 60 + + should_show_war_goal_subview = yes + + attacker_wargoal_percentage = 0.5 + + max_defender_score_from_occupation = 75 + max_attacker_score_from_occupation = 150 + + max_ai_diplo_distance_to_title = 10000 +} + +#THE NEW WAR OF THE GREATEST OF KHANS +mpo_gok_onslaught_cb = { + icon = migration_cb + group = invasion + + allow_hostages = no + allowed_for_character = { + any_owned_story = { + OR = { + story_type = story_greatest_of_khans + story_type = story_mongol_invasion + } + } + has_mpo_dlc_trigger = yes + } + + allowed_for_character_display_regardless = { + prestige_level >= 1 + } + + allowed_against_character_display_regardless = { + scope:defender = { + is_independent_ruler = yes + is_landed = yes + } + } + + allowed_against_character = { + scope:attacker = { + ALL_FALSE = { + top_liege = scope:defender.top_liege + liege = scope:defender + } + } + } + + should_invalidate = { + scope:defender = { + OR = { + is_independent_ruler = no + is_landed = no + } + } + } + + on_invalidated_desc = msg_subjugation_war_invalidated_message + + on_invalidated = { + } + + cost = { + piety = { + value = 0 + if = { + limit = { + scope:attacker.faith.religious_head ?= scope:attacker + scope:defender.faith = scope:attacker.faith + } + add = { + value = 500 + desc = CB_BASE_COST + } + } + if = { + limit = { + scope:attacker = { is_ai = yes } + } + multiply = 0 + } + add = common_cb_impious_piety_cost + multiply = common_cb_piety_cost_multiplier + } + prestige = { + #Should be free for Greatest of Khans, this is for successors + add = { + value = 500 + desc = CB_BASE_COST + } + + multiply = common_cb_prestige_cost_multiplier + + # Genghis Khan gets it for free + if = { + limit = { scope:attacker = { has_character_flag = is_temujin } } + multiply = 0 + } + if = { + limit = { + scope:attacker = { is_ai = yes } + } + multiply = 0 + } + } + } + + on_declaration = { + on_declared_war = yes + } + + on_victory_desc = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:defender = { + AND = { + government_has_mechanic = administrative + any_vassal = { + count >= 2 + government_has_mechanic = administrative + highest_held_title_tier >= main_administrative_tier + } + } + } + scope:attacker = { is_local_player = yes } + } + desc = mpo_gok_onslaught_victory_attacker_admin + } + triggered_desc = { + trigger = { + scope:attacker = { is_local_player = yes } + } + desc = mpo_gok_onslaught_victory_attacker + } + triggered_desc = { + trigger = { + scope:defender = { + AND = { + government_has_mechanic = administrative + any_vassal = { + count >= 2 + government_has_mechanic = administrative + highest_held_title_tier >= main_administrative_tier + } + } + } + scope:defender = { is_local_player = yes } + } + desc = mpo_gok_onslaught_victory_defender_admin + } + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = mpo_gok_onslaught_victory_defender + } + triggered_desc = { + trigger = { + scope:defender = { + AND = { + government_has_mechanic = administrative + any_vassal = { + count >= 2 + government_has_mechanic = administrative + highest_held_title_tier >= main_administrative_tier + } + } + } + } + desc = mpo_gok_onslaught_victory_admin + } + desc = mpo_gok_onslaught_victory + } + } + } + + on_victory = { + #Catalyst if used against China + if = { + limit = { + exists = situation:dynastic_cycle + scope:defender = { + + any_character_situation = { + this = situation:dynastic_cycle + } + } + } + situation:dynastic_cycle = { + if = { + limit = { + scope:defender = { + any_realm_county = { + count >= 20 + any_county_situation = { + this = situation:dynastic_cycle + } + } + } + situation_top_has_catalyst = catalyst_event_mongol_empire_attacks_major + } + trigger_situation_catalyst = { + catalyst = catalyst_event_mongol_empire_attacks_major + character = scope:attacker + } + } + else_if = { + limit = { + situation_top_has_catalyst = catalyst_event_mongol_empire_attacks_minor + } + trigger_situation_catalyst = { + catalyst = catalyst_event_mongol_empire_attacks_minor + character = scope:attacker + } + } + } + } + scope:attacker = { + save_scope_as = gok + } + scope:defender = { + save_scope_as = gok_victim + primary_title = { + save_scope_as = defender_primary + } + #Scripted effect that selects acceptable-tier admin vassals to preserve and moves lower tier admin vassals under them + if = { + limit = { + NOT = { + scope:attacker = { + government_has_mechanic = administrative + } + } + any_vassal_or_below = { + highest_held_title_tier >= tier_kingdom + government_has_mechanic = administrative + } + } + hidden_effect = { + mpo_gok_onslaught_admin_vassal_reorganization = yes + } + } + every_vassal_or_below = { + limit = { + is_ai = no + highest_held_title_tier > tier_barony + } + add_to_list = defender_player_vassals + } + #Make list of defender's vassals eligible for transfer or un-landing + every_vassal_or_below = { + limit = { + trigger_if = { + limit = { + scope:attacker = { + NOT = { + government_has_mechanic = administrative + } + } + } + is_landed = yes + } + highest_held_title_tier >= tier_county + } + add_to_list = defender_vassals + } + #List of all defender's titles + every_held_title = { + limit = { + is_landless_type_title = no + tier >= tier_county + tier < tier_empire + } + add_to_list = target_titles + } + + every_vassal_or_below = { + limit = { + is_landed = yes + OR = { + AND = { + NOT = { + government_has_mechanic = administrative + } + highest_held_title_tier >= tier_duchy + gok_desirable_vassal_trigger = no + } + is_in_list = vulnerable_admin_vassals + } + } + every_held_title = { + limit = { + is_landless_type_title = no + tier >= tier_county + tier < tier_empire + is_head_of_faith = no + } + add_to_list = target_titles + } + } + if = { + limit = { + scope:defender = { + OR = { + any_held_title = { + has_variable = refused_submission + } + any_vassal_or_below = { + any_held_title = { + has_variable = refused_submission + } + } + } + } + } + scope:defender = { + save_scope_as = khans_retribution_target + } + } + } + scope:attacker = { + #Save value that's used to increase submit acceptance - you've successfully waged a war of terror! + custom_tooltip = goK_war_gain_all_titles + if = { + limit = { + scope:defender = { + NAND = { + government_has_mechanic = administrative + any_vassal = { + count >= 2 + government_has_mechanic = administrative + highest_held_title_tier >= main_administrative_tier + } + } + } + } + custom_tooltip = goK_war_gain_vassal_titles + } + custom_tooltip = gok_offer_submission_acceptance_bonus_tt + if = { + limit = { + NOT = { + has_variable = gok_terror_war_value + } + } + #Higher value if defender refused submission, causing this war + if = { + limit = { + exists = scope:khans_retribution_target + } + set_variable = { + name = gok_terror_war_value + value = { + value = scope:defender.highest_held_title_tier + multiply = 2 + } + } + } + else = { + set_variable = { + name = gok_terror_war_value + value = { + value = scope:defender.highest_held_title_tier + divide = 2 + ceiling = yes + } + } + } + } + else = { + if = { + limit = { + exists = scope:khans_retribution_target + #Cap the bonus so that powerful rulers should still resist + var:gok_terror_war_value < 60 + } + change_variable = { + name = gok_terror_war_value + add = { + value = scope:defender.highest_held_title_tier + multiply = 2 + } + } + } + else = { + change_variable = { + name = gok_terror_war_value + add = { + value = scope:defender.highest_held_title_tier + divide = 2 + ceiling = yes + } + } + } + } + + scope:attacker = { + if = { + limit = { + exists = scope:khans_retribution_target + } + hidden_effect = { + add_opinion = { + modifier = refused_the_great_khan_opinion + target = scope:defender + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:defender + IMPRISONER = scope:attacker + } + } + } + + scope:defender = { + if = { + limit = { + government_has_flag = government_is_nomadic + } + pay_herd = { + target = scope:attacker + value = domicile.major_herd_value + } + } + else = { + pay_short_term_gold = { + target = scope:attacker + gold = major_gold_value + } + + } + gok_realm_devastation_effect = yes + } + + gok_retribution_cleanup_effect = yes + + custom_tooltip = gok_cb_event_troops_tt + hidden_effect = { + if = { + limit = { + exists = scope:khans_retribution_target + exists = scope:requested_siege_army + } + gok_spawn_subjugated_siege_army_effect = { CHARACTER = scope:defender } + } + else_if = { + limit = { + exists = scope:khans_retribution_target + exists = scope:requested_quality_army + } + gok_spawn_subjugated_quality_army_effect = { CHARACTER = scope:defender } + } + else_if = { + limit = { + scope:defender = { + NOR = { + government_has_flag = government_is_in_steppe + government_has_flag = government_is_tribal + } + } + } + random_list = { + 1 = { + gok_spawn_subjugated_siege_army_effect = { CHARACTER = scope:defender } + } + 1 = { + gok_spawn_subjugated_quality_army_effect = { CHARACTER = scope:defender } + } + } + } + else = { + gok_spawn_subjugated_quality_army_effect = { CHARACTER = scope:defender } + } + } + show_pow_release_message_effect = yes + } + + # Legitimacy + add_legitimacy_attacker_victory_effect = yes + + #EP2 accolade glory gain for winning against higher ranked enemy + if = { + limit = { + scope:defender = { + sub_realm_size >= 20 + } + } + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } + } + else_if = { + limit = { + scope:defender = { + sub_realm_size >= 10 + } + } + scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } + } + else = { + scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } + } + + #Transfer vassals + hidden_effect = { + scope:defender = { + #If their tier is too high, destroy their empire + every_vassal = { + limit = { + highest_held_title_tier >= tier_empire + } + every_held_title = { + limit = { + tier >= tier_empire + } + add_to_list = defender_vassal_empires + } + every_in_list = { + list = defender_vassal_empires + holder = { destroy_title = prev } + } + } + + #transfer vassals + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = yes + } + every_in_list = { + list = defender_vassals + limit = { + OR = { + is_independent_ruler = yes + is_vassal_of = scope:defender + } + } + change_liege = { + liege = scope:attacker + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + + #destroy defender and vassal empires/hegemony + scope:defender = { + every_held_title = { + limit = { tier >= tier_empire } + add_to_list = defender_empires + } + if = { + limit = { + any_in_list = { + list = defender_empires + count >= 1 + } + } + every_in_list = { + list = defender_empires + holder = { destroy_title = prev } + } + } + } + + #Transfer titles and do cleanup + hidden_effect = { + #Transfer titles + scope:defender = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + every_in_list = { + list = target_titles + limit = { + tier < tier_empire + } + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + #If something broke and titles didn't get handed out... we'll still get you + if = { + limit = { + scope:defender = { + is_landed = yes + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = yes + } + #Transfer all of defender's vassals + scope:defender = { + every_vassal = { + limit = { + highest_held_title_tier >= tier_county + } + change_liege = { + liege = scope:attacker + change = scope:change + } + } + #transfer defender + change_liege = { + liege = scope:attacker + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + #Transfer vassals that ended up independent + if = { + limit = { + any_in_list = { + list = defender_vassals + highest_held_title_tier >= tier_county + is_ruler = yes + is_independent_ruler = yes + } + } + every_in_list = { + list = defender_vassals + limit = { + highest_held_title_tier >= tier_county + OR = { + is_independent_ruler = yes + NOT = { + top_liege ?= scope:attacker + } + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = yes + } + change_liege = { + liege = scope:attacker + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + } + } + + #Send notification event to surviving defender vassals + every_in_list = { + list = defender_player_vassals + limit = { + is_ai = no + top_liege = scope:attacker + } + trigger_event = { + id = mpo_greatest_of_khans.0050 + days = 2 + } + } + #Send taunt to unlanded losers + every_in_list = { + list = defender_player_vassals + limit = { + is_ai = no + NOT = { top_liege = scope:attacker } + } + trigger_event = { + id = mpo_greatest_of_khans.0051 + days = 2 + } + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = mongol_invasion_cb_ally_prestige + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 3 + } + + # Prestige level progress for the attacker + scope:attacker = { + add_prestige_experience = { + value = mongol_invasion_cb_prestige_experience_gain + } + } + + # Prestige loss for the defender + scope:defender = { + add_prestige = { + value = major_prestige_value + multiply = -1.0 + } + } + + # FP1: note the victory for future memorialisation via stele (if applicable). + scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + } + + on_white_peace_desc = { + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = mpo_gok_onslaught_white_peace_defender + } + desc = mpo_gok_onslaught_white_peace + } + } + } + + on_white_peace = { + + #Attacker gains all occupied counties + scope:defender = { + every_sub_realm_county = { + limit = { + county_controller = scope:attacker + } + add_to_list = occupied_counties + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + every_in_list = { + list = occupied_counties + change_title_holder = { + holder = scope:attacker + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + + scope:attacker = { show_pow_release_message_effect = yes } + + #EP2 accolade glory gain for doing ok against higher ranked enemy + scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # Not important as the scales are identical + FAME_BASE = mongol_invasion_cb_ally_prestige + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 5 + } + + add_truce_white_peace_effect = yes + + scope:attacker = { + add_prestige = major_prestige_loss + add_legitimacy = minor_legitimacy_loss + stress_and_fulfillment_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + gok_retribution_cleanup_effect = yes + } + + on_defeat_desc = { + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:attacker = { is_local_player = yes } } + desc = mpo_gok_onslaught_defeat_attacker + } + triggered_desc = { + trigger = { scope:defender = { is_local_player = yes } } + desc = mpo_gok_onslaught_defeat_defender + } + desc = mpo_gok_onslaught_defeat + } + } + } + + on_defeat = { + scope:attacker = { show_pow_release_message_effect = yes } + + scope:defender = { + mandala_peacemaker_perk_serenity_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + # Allies on both sides get full prestige value for helping in the war, based on their war participation. + modify_allies_of_participants_fame_values = { + WINNER = scope:defender # Not important as the scales are identical + FAME_BASE = mongol_invasion_cb_ally_prestige + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 10 + } + + # Truce + add_truce_attacker_defeat_effect = yes + + scope:defender = { + if = { + limit = { + OR = { + is_ai = no # AI mongols are bound to lose a war against a count or so due to warscore timeout, but that shouldn't slow them down + scope:attacker = { is_ai = no } # On the other hand, players shouldn't get away with it + } + } + + # Legitimacy + add_legitimacy_attacker_defeat_effect = yes + + scope:attacker = { + add_prestige = massive_prestige_loss + add_legitimacy = major_legitimacy_loss + stress_and_fulfillment_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + + add_prestige = mongol_invasion_cb_prestige_gain + #They defeated Genghis Khan... maybe they're a worthy foe? + if = { + limit = { + NOR = { + exists = global_var:gok_foe_conqueror_cooldown + scope:defender = { + has_trait = conqueror + } + } + } + hidden_effect = { + trigger_event = { + id = conqueror.0001 + days = 5 + } + } + set_global_variable = { + name = gok_foe_conqueror_cooldown + value = scope:defender + years = 5 + } + } + else_if = { + limit = { + scope:defender = { + has_trait = conqueror + } + } + hidden_effect = { + add_short_term_gold = major_gold_value + } + } + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 5 + } + } + + scope:attacker = { + every_vassal = { + custom = custom.every_vassal + add_opinion = { + modifier = liege_lost_mongol_invasion_war + target = prev + opinion = -40 + } + } + } + + scope:attacker = { + save_temporary_scope_as = loser + } + on_lost_aggression_war_discontent_loss = yes + } + } + + # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold + laamp_as_mercenary_payout_tooltip_effect = yes + + gok_retribution_cleanup_effect = yes + } + + transfer_behavior = transfer + + on_primary_attacker_death = inherit + on_primary_defender_death = inherit + + attacker_allies_inherit = yes + defender_allies_inherit = yes + + war_name = "MPO_GOK_ONSLAUGHT_NAME" + my_war_name = "MPO_GOK_ONSLAUGHT_NAME_MY" + war_name_base = "MPO_GOK_ONSLAUGHT_NAME_BASE" + cb_name = "MPO_GOK_ONSLAUGHT_NAME" + + interface_priority = 200 + + ticking_war_score_targets_entire_realm = yes + attacker_wargoal_percentage = 0.8 + attacker_ticking_warscore = 0 + max_defender_score_from_occupation = 150 + max_attacker_score_from_occupation = 150 + attacker_score_from_occupation_scale = 50 + defender_score_from_occupation_scale = 50 + + max_ai_diplo_distance_to_title = 500 + + ai_score_mult = { + value = 10 + #Declaring war on the frankokratia leader can really ruin the whole thing + if = { + limit = { + scope:defender = { + any_owned_story = { + story_type = frankokratia_story + NOT = { has_variable = franko_war_complete } + } + } + } + multiply = 0 + } + } +} diff --git a/common/character_interactions/00_fp3_interactions.txt b/common/character_interactions/00_fp3_interactions.txt new file mode 100644 index 000000000..fbb1f2455 --- /dev/null +++ b/common/character_interactions/00_fp3_interactions.txt @@ -0,0 +1,2518 @@ +# As a Supporter, demand that a Muslim ruler recognize your authority +# Success makes the Strengthen the Caliphate struggle decision easier to take +#fp3_demand_submission_interaction = { +# icon = demand_submission +# category = interaction_category_religion +# popup_on_receive = yes +# pause_on_receive = yes +# can_send_despite_rejection = yes +# ai_maybe = yes +# desc = fp3_demand_submission_interaction_desc +# +# greeting = positive +# notification_text = DEMAND_SUBMISSION_NOTIFICATION +# +# is_available = { +# trigger_if = { +# limit = { is_ai = yes } +# is_physically_able = yes +# } +# } +# +# is_shown = { +# scope:actor != scope:recipient +# struggle:persian_struggle ?= { has_struggle_phase_parameter = demand_submission_interaction_unlocked } +# scope:actor = { has_title = title:d_sunni } +# scope:recipient = { +# faith.religious_head ?= scope:actor +# has_trait = fp3_struggle_supporter +# any_character_struggle = { this = struggle:persian_struggle } +# } +# } +# +# cooldown_against_recipient = { years = 10 } +# +# ai_min_reply_days = 2 +# ai_max_reply_days = 7 +# +# ai_accept = { +# base = 0 +# # This is more flavorful than "base acceptance" +# modifier = { +# desc = DEMAND_SUBMISSION_I_AM_HEAD_OF_FAITH +# add = 50 +# } +# ## Piety +# # How pious are you? +# modifier = { +# # (Stolen shamelessly from piety_level_affects_vassalage_acceptance) +# add = { +# value = { +# value = -1 +# add = scope:actor.piety_level +# } +# multiply = 10 +# } +# desc = I_AM_PIOUS +# # Only matters if they aren't cynical +# NOT = { scope:recipient = { has_trait = cynical } } +# } +# # Are they cynical/zealous? +# modifier = { +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_CYNICAL +# add = -30 +# scope:recipient = { +# has_trait = cynical +# } +# } +# modifier = { +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_ZEALOUS +# add = 20 +# scope:recipient = { has_trait = zealous } +# } +# # Are you giving them extra piety? +# modifier = { +# add = 30 +# desc = STRUGGLE_MARRIAGE_ACCEPTANCE_USING_PIETY_AS_CURRENCY +# scope:piety_cost_reduction ?= yes +# } +# ## Opinion +# # Do they like you? +# opinion_modifier = { +# who = scope:recipient +# opinion_target = scope:actor +# multiplier = 0.25 +# desc = AI_OPINION_REASON +# } +# ## Personality +# # Are they ambitious? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_AMBITIOUS +# add = -30 +# scope:recipient = { has_trait = ambitious } +# } +# # Are they content? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_CONTENT +# add = 10 +# scope:recipient = { has_trait = content } +# } +# # Are they stubborn? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_STUBBORN +# add = -10 +# scope:recipient = { has_trait = stubborn } +# } +# # Are they arrogant? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_ARROGANT +# add = -10 +# scope:recipient = { has_trait = arrogant } +# } +# # Are they humble? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_HUMBLE +# add = 10 +# scope:recipient = { has_trait = humble } +# } +# # Are they trusting? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_TRUSTING +# add = 10 +# scope:recipient = { has_trait = trusting } +# } +# # Are they paranoid? +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_PARANOID +# add = -20 +# scope:recipient = { has_trait = paranoid } +# } +# # Are they loyal? +# # Independent rulers should rarely have this trait, but if your predecessor installed a puppet and died, then this makes it easier to demand submission from the puppet +# modifier = { +# desc = DEMAND_SUBMISSION_RECIPIENT_IS_LOYAL +# add = 20 +# scope:recipient = { has_trait = loyal } +# } +# ## Realm +# # Are you stronger/weaker than them? +# modifier = { +# add = { +# value = 1 +# subtract = { +# value = scope:recipient.max_military_strength # For foreign diplomacy, consider recipients max +# divide = { value = scope:actor.current_military_strength min = 1 } +# } +# multiply = 10 +# } +# desc = offer_vassalization_interaction_aibehavior_power_tt +# } +# # Reign duration +# modifier = { +# add = { +# value = scope:actor.primary_title.title_held_years +# subtract = 21 +# max = 20 +# } +# desc = DEMAND_SUBMISSION_SHORT_REIGN +# } +# ## Dread +# modifier = { +# add = intimidated_halved_reason_value +# scope:recipient = { +# has_dread_level_towards = { +# target = scope:actor +# level = 1 +# } +# } +# desc = INTIMIDATED_REASON +# } +# modifier = { +# add = cowed_halved_reason_value +# scope:recipient = { +# has_dread_level_towards = { +# target = scope:actor +# level = 2 +# } +# } +# desc = COWED_REASON +# } +# } +# +# on_accept = { +# scope:actor = { +# if = { +# limit = { scope:piety_cost_reduction ?= yes } +# add_piety = massive_piety_loss +# } +# add_hook = { +# target = scope:recipient +# type = caliphal_submission_hook +# } +# if = { +# limit = { has_variable = last_explicit_defied_caliph } +# remove_variable = last_explicit_defied_caliph +# } +# trigger_event = fp3_misc_decisions.0010 # Letter event informing player of success +# } +# scope:recipient = { +# if = { +# limit = { scope:piety_cost_reduction ?= yes } +# add_piety = massive_piety_gain +# } +# } +# +# # If we're a clan this interaction affects unity +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:actor +# TARGET = scope:recipient +# VALUE = medium_unity_gain +# DESC = clan_unity_forment_revolt.desc +# REVERSE_NON_HOUSE_TARGET = no +# } +# } +# +# on_decline = { +# scope:recipient = { +# custom_tooltip = DEMAND_SUBMISSION_INSTALL_LOYALIST_WARNING +# add_piety = medium_piety_loss +# remove_trait = fp3_struggle_supporter +# add_trait_force_tooltip = fp3_struggle_detractor +# # This is for the install loyalist CB discount +# set_variable = { +# name = last_explicit_defied_caliph +# value = scope:actor +# years = 30 +# } +# } +# scope:actor = { +# trigger_event = fp3_misc_decisions.0011 # Letter event informing player of failure +# } +# +# # If we're a clan this interaction affects unity +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:actor +# TARGET = scope:recipient +# VALUE = medium_unity_loss +# DESC = clan_unity_forment_revolt.desc +# REVERSE_NON_HOUSE_TARGET = no +# } +# } +# +# # Use piety to increase acceptance +# send_option = { +# flag = piety_cost_reduction +# localization = TRADE_PIETY_FOR_BETTER_AI_ACCEPTANCE +# } +# send_options_exclusive = no +# +# ai_targets = { +# ai_recipients = neighboring_rulers +# } +# +# ai_frequency_by_tier = { +# barony = 0 +# county = 0 +# duchy = 0 +# kingdom = 12 +# empire = 12 +# hegemony = 12 +# } +# +# # Very similar to ai_accept, but ignores effects that are < 10 in value for brevity's sake +# ai_will_do = { +# # The caliph generally _wants_ to be chucking these out all over the place. +# ## Basically, the more rulers submit to their authority, the better. +# ### Subs over drubs, as it were. +# base = 100 +# # Will demand rulers who were installed via the puppet CB +# modifier = { +# add = 200 +# scope:recipient = { +# has_trait = loyal +# scope:actor = { has_hook = prev } +# } +# } +# modifier = { +# add = { +# value = { +# value = -1 +# add = scope:actor.piety_level +# } +# multiply = 10 +# } +# NOT = { scope:recipient = { has_trait = cynical } } +# } +# modifier = { +# add = -30 +# scope:recipient = { +# has_trait = cynical +# } +# } +# modifier = { +# add = 20 +# scope:recipient = { has_trait = zealous } +# } +# opinion_modifier = { +# who = scope:recipient +# opinion_target = scope:actor +# multiplier = 0.25 +# } +# modifier = { +# add = -30 +# scope:recipient = { has_trait = ambitious } +# } +# modifier = { +# add = { +# value = 1 +# subtract = { +# value = scope:recipient.max_military_strength +# divide = { value = scope:actor.current_military_strength min = 1 } +# } +# multiply = 10 +# } +# } +# # Reign duration +# modifier = { +# add = { +# value = scope:actor.primary_title.title_held_years +# subtract = 21 +# max = 20 +# } +# } +# ## Dread +# modifier = { +# add = intimidated_halved_reason_value +# scope:recipient = { +# has_dread_level_towards = { +# target = scope:actor +# level = 1 +# } +# } +# } +# modifier = { +# add = cowed_halved_reason_value +# scope:recipient = { +# has_dread_level_towards = { +# target = scope:actor +# level = 2 +# } +# } +# } +# } +#} +# +#################################### +## Request Turkic invasion (can_request_incursion_interaction) +## By Hugo Cortell +#################################### +#fp3_request_turkic_invasion_interaction = { +# interface_priority = 100 +# common_interaction = yes +# category = interaction_category_hostile +# cooldown_against_recipient = { years = 2 } +# +# icon = request_mercenary +# desc = fp3_request_turkic_invasion_interaction_desc +# +# is_available = { +# OR = { +# AND = { +# has_trait = fp3_struggle_detractor +# any_character_struggle = { is_struggle_type = persian_struggle } +# } +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# trigger_if = { +# limit = { is_ai = yes } +# ai_greed <= 25 +# OR = { +# has_trait = fp3_struggle_detractor +# AND = { +# vassal_contract_has_flag = celestial_military_appointment +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# } +# NOT = { culture = { has_cultural_pillar = heritage_turkic } } +# ai_has_builder_or_pious_builder_personality = no +# is_at_war = no +# } +# } +# +# is_shown = { +# scope:recipient = { +# is_playable_character = yes +# is_landed = yes +# trigger_if = { +# limit = { +# scope:actor = { +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# } +# top_liege = scope:actor.top_liege +# } +# trigger_else = { +# OR = { +# any_character_struggle = { is_struggle_type = persian_struggle } +# title:d_sunni.holder ?= this +# } +# top_liege ?= this +# +# } +# is_ai = yes +# } +# scope:actor != scope:recipient +# } +# +# is_valid_showing_failures_only = { +# } +# +# populate_recipient_list = { +# scope:actor.top_liege = { +# every_independent_ruler = { +# limit = { +# is_ai = yes +# is_landed = yes +# is_physically_able = yes +# has_raised_armies = no +# is_at_war = no +# in_diplomatic_range = scope:actor +# highest_held_title_tier >= tier_county +# NOR = { +# is_allied_to = scope:recipient +# has_truce = scope:recipient +# this = scope:actor +# this = scope:recipient +# is_tributary_of = scope:recipient.top_liege +# } +# OR = { +# trigger_if = { +# limit = { +# NOT = { +# scope:actor = { +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# } +# } +# government_has_flag = government_is_clan +# } +# government_has_flag = government_is_tribal +# government_has_flag = government_is_nomadic +# government_has_flag = government_is_wanua +# government_has_flag = government_is_landless_adventurer +# } +# trigger_if = { +# limit = { +# scope:actor = { +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# } +# any_neighboring_top_liege_realm = { +# OR = { +# title:h_china ?= this +# any_title_to_title_neighboring_empire = { +# title:h_china ?= hegemony +# } +# } +# } +# } +# trigger_else = { +# culture = { +# OR = { +# has_cultural_pillar = heritage_turkic +# has_cultural_pillar = heritage_mongolic +# } +# } +# } +# } +# add_to_list = characters +# } +# } +# } +# +# send_options_exclusive = no +# +# send_option = { +# flag = war_support +# localization = fp3_request_turkic_invasion_interaction_option_join_war +# current_description = fp3_request_turkic_invasion_interaction_option_join_war_desc +# is_shown = { exists = scope:secondary_recipient } +# is_valid = { +# scope:actor = { +# NOR = { +# is_at_war_with = scope:recipient +# is_allied_to = scope:recipient +# has_truce = scope:recipient +# } +# tgp_is_hegemon_or_below_in_dynastic_cycle_trigger = no +# } +# } +# } +# +# send_option = { +# flag = financial_support +# localization = fp3_request_turkic_invasion_interaction_option_more_gold +# current_description = fp3_request_turkic_invasion_interaction_option_more_gold_desc +# is_shown = { exists = scope:secondary_recipient } +# is_valid = { +# custom_description = { +# text = fp3_please_dont_give_me_negative_gold +# fp3_request_invasion_troop_value_estimate > 0 +# } +# } +# } +# +# cost = { +# gold = { +# value = { +# value = scope:secondary_recipient.max_military_strength +# divide = 20 +# round = yes +# } +# add = { +# if = { +# limit = { scope:financial_support = yes } +# add = fp3_request_invasion_troop_value_estimate +# } +# } +# if = { +# limit = { +# scope:recipient = { has_title = title:d_sunni } +# struggle:persian_struggle = { has_struggle_phase_parameter = cheaper_incursions_vs_caliph } +# } +# divide = 2 +# } +# } +# } +# +# on_accept = { +# if = { +# limit = { exists = scope:secondary_recipient } +# +# scope:recipient = { +# if = { +# limit = { +# scope:actor = { +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# } +# capital_county = { +# save_scope_as = invasion_target_title +# } +# } +# else = { +# if = { +# limit = { +# any_realm_county = { +# this != scope:recipient.capital_county +# any_neighboring_county = { holder.top_liege = scope:secondary_recipient.top_liege } +# any_county_province = { geographical_region = world_persian_empire } +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# } +# random_realm_county = { +# limit = { +# this != scope:recipient.capital_county +# any_neighboring_county = { holder.top_liege = scope:secondary_recipient.top_liege } +# any_county_province = { geographical_region = world_persian_empire } +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# save_scope_as = invasion_target_title +# } +# } +# else_if = { +# limit = { +# any_realm_county = { +# this != scope:recipient.capital_county +# any_neighboring_county = { +# any_county_province = { geographical_region = world_persian_empire } +# holder.top_liege != prev.holder.top_liege +# } +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# } +# random_realm_county = { +# limit = { +# this != scope:recipient.capital_county +# any_neighboring_county = { +# any_county_province = { geographical_region = world_persian_empire } +# holder.top_liege != prev.holder.top_liege +# } +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# save_scope_as = invasion_target_title +# } +# } +# else_if = { +# limit = { +# any_realm_county = { +# this != scope:recipient.capital_county +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# } +# random_realm_county = { +# limit = { +# this != scope:recipient.capital_county +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# save_scope_as = invasion_target_title +# } +# } +# else_if = { +# limit = { +# any_realm_county = { +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# } +# random_realm_county = { +# limit = { +# NOR = { +# holder = scope:actor +# holder = { is_vassal_or_below_of = scope:actor } +# } +# } +# save_scope_as = invasion_target_title +# } +# } +# else = { +# random_realm_county = { save_scope_as = invasion_target_title } +# } +# } +# +# scope:invasion_target_title.duchy = { save_scope_as = text_title } +# +# hidden_effect = { # Not worth cluttering the UI with +# add_opinion = { +# modifier = fp3_incited_conflict +# target = scope:actor +# } +# add_opinion = { +# modifier = declared_war +# target = scope:secondary_recipient +# } +# } +# } +# +# scope:secondary_recipient = { +# add_gold = { +# value = { +# value = scope:secondary_recipient.max_military_strength +# divide = 20 +# round = yes +# } +# add = { +# if = { +# limit = { scope:financial_support = yes } +# add = fp3_request_invasion_troop_value_estimate +# } +# } +# if = { +# limit = { +# scope:recipient = { has_title = title:d_sunni } +# struggle:persian_struggle = { has_struggle_phase_parameter = cheaper_incursions_vs_caliph } +# } +# divide = 2 +# } +# } +# start_war = { +# casus_belli = fp3_turkic_invasion_cb +# target = scope:recipient +# target_title = scope:invasion_target_title.duchy +# } +# custom_tooltip = fp3_turkic_invasion_cb_result_tt +# if = { +# limit = { +# scope:financial_support = yes +# } +# trigger_event = fp3_misc_decisions.0006 +# if = { +# limit = { +# has_mpo_dlc_trigger = yes +# } +# show_as_tooltip = { +# spawn_army = { +# men_at_arms = { +# type = horse_archers +# stacks = fp3_request_invasion_troop_value_bonus_troops +# } +# men_at_arms = { +# type = steppe_raiders +# stacks = fp3_request_invasion_troop_value_bonus_troops +# } +# men_at_arms = { +# type = light_horsemen +# stacks = fp3_request_invasion_troop_value_bonus_troops +# } +# men_at_arms = { +# type = nomadic_riders +# stacks = fp3_request_invasion_troop_value_bonus_levy_nomads +# } +# location = capital_province +# uses_supply = yes +# inheritable = no +# name = turkic_tribal_event_troops +# } +# } +# } +# else = { +# show_as_tooltip = { +# spawn_army = { +# men_at_arms = { +# type = horse_archers +# stacks = fp3_request_invasion_troop_value_bonus_troops +# } +# men_at_arms = { +# type = light_horsemen +# stacks = fp3_request_invasion_troop_value_bonus_troops +# } +# levies = fp3_request_invasion_troop_value_bonus_levy_troops +# location = capital_province +# uses_supply = yes +# inheritable = no +# name = turkic_tribal_event_troops +# } +# } +# } +# } +# if = { +# limit = { scope:war_support = yes } +# custom_tooltip = fp3_request_turkic_invasion_interaction_option_join_war_outcome_tooltip +# trigger_event = fp3_misc_decisions.0005 +# } +# } +# +# scope:actor = { +# hidden_effect = { +# send_interface_toast = { +# type = event_toast_effect_good +# title = fp3_request_turkic_invasion_interaction_accept_notification.t +# left_icon = scope:secondary_recipient +# right_icon = scope:recipient +# +# show_as_tooltip = { +# custom_tooltip = fp3_request_turkic_invasion_interaction_accept_notification.desc +# } +# } +# } +# if = { +# limit = { +# top_participant_group:dynastic_cycle ?= { +# participant_group_type = expansion_movement +# } +# } +# add_secret = { +# target = scope:recipient +# type = secret_request_incursion +# } +# scope:secondary_recipient = { +# add_secret = { +# target = scope:recipient +# type = secret_request_incursion +# } +# } +# } +# } +# +# scope:recipient = { +# add_character_flag = { +# flag = incursion_ai_pacing +# years = 5 +# } +# hidden_effect = { +# send_interface_toast = { +# type = event_toast_effect_bad +# title = fp3_request_turkic_invasion_interaction_accept_notification.t +# left_icon = scope:secondary_recipient +# right_icon = scope:actor +# +# show_as_tooltip = { +# custom_tooltip = fp3_request_turkic_invasion_interaction_accept_target_notification.desc +# } +# } +# } +# } +# } +# } +# +# use_diplomatic_range = yes +# +# ai_accept = { +# base = 0 +# +# # Relationships: actor -> recipient / We avoid more relationship checks for balance reasons (and because important decisions tend to care little for relationships) +# modifier = { # Rivalry modifier. +# desc = offer_vassalization_interaction_aibehavior_rival_tt_2 +# trigger = { +# scope:secondary_recipient = { +# has_relation_rival = scope:actor +# NOT = { has_relation_nemesis = scope:actor } +# } +# } +# add = -10 +# } +# modifier = { # Nemesis modifier. +# desc = offer_vassalization_interaction_aibehavior_nemesis_tt_2 +# trigger = { +# scope:secondary_recipient = { +# has_relation_nemesis = scope:actor +# } +# } +# add = -100 +# } +# modifier = { # Same Dynasty modifier. +# desc = offer_vassalization_interaction_aibehavior_dynasty_tt_2 +# trigger = { +# scope:secondary_recipient = { +# dynasty = scope:actor.dynasty +# } +# } +# add = 10 +# } +# +# # Compare Opinion modifier +# opinion_modifier = { +# who = scope:secondary_recipient +# opinion_target = scope:actor +# multiplier = 0.25 +# } +# +# # Pledged to help in invasion +# modifier = { +# add = { +# value = scope:actor.max_military_strength +# divide = 70 +# round = yes +# } +# desc = HAS_YOUR_SUPPORT_REASON +# scope:war_support = yes +# } +# +# # Relative power (taken from PT interaction) +# modifier = { # A lot less levies than scope:secondary_recipient +# add = -100 +# scope:secondary_recipient.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_far_weaker_value +# desc = fp3_RTI_AI_RECIPIENT_IS_MUCH_WEAKER +# } +# modifier = { # Few less levies than scope:secondary_recipient +# add = -75 +# scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_weaker_value +# scope:secondary_recipient.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_somewhat_weaker_value +# desc = fp3_RTI_AI_RECIPIENT_IS_SOMEWHAT_WEAKER +# } +# modifier = { # Roughly equal levies with scope:secondary_recipient +# add = 10 +# scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_somewhat_weaker_value +# scope:secondary_recipient.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_somewhat_stronger_value +# desc = fp3_RTI_AI_RECIPIENT_IS_ROUGHLY_EQUAL +# } +# modifier = { # More levies than scope:secondary_recipient +# add = 50 +# scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_somewhat_stronger_value +# scope:secondary_recipient.max_military_strength <= scope:recipient.purchase_truce_interaction_recipient_far_stronger_value +# desc = fp3_RTI_AI_RECIPIENT_IS_SOMEWHAT_STRONGER +# } +# modifier = { # Many more levies than scope:secondary_recipient +# add = 75 +# scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_stronger_value +# desc = fp3_RTI_AI_RECIPIENT_IS_MUCH_STRONGER +# } +# +# # AI who are in debt will take whatever windfalls they can. +# modifier = { +# add = { +# value = scope:secondary_recipient.debt_level +# add = 1 # Our first level is 0, so we add one to always get a positive number. +# multiply = 10 +# } +# debt_level >= 0 +# desc = PT_AI_IS_IN_DEBT +# } +# +# # Pacifist AI don't like raiding +# modifier = { +# add = -25 +# scope:secondary_recipient.faith = { has_doctrine_parameter = pacifist } +# desc = PT_AI_IS_PACIFIST_FAITH_2 +# } +# modifier = { +# add = -25 +# scope:secondary_recipient.culture = { has_cultural_parameter = reduced_cost_for_conversion_to_pacifist_faith } +# desc = PT_AI_IS_PACIFIST_CULTURE_2 +# } +# # Distance +# modifier = { +# add = -25 +# "scope:secondary_recipient.capital_province.squared_distance(scope:recipient.capital_province)" >= squared_distance_medium +# "scope:secondary_recipient.capital_province.squared_distance(scope:recipient.capital_province)" < squared_distance_almost_massive +# desc = PT_AI_IS_FAR_AWAY +# } +# modifier = { +# add = -75 +# "scope:secondary_recipient.capital_province.squared_distance(scope:recipient.capital_province)" >= squared_distance_almost_massive +# desc = PT_AI_IS_VERY_FAR_AWAY +# } +# modifier = { +# add = 20 +# exists = scope:actor.var:movement_power +# scope:actor.var:movement_power >= very_high_movement_power_value +# desc = ACTOR_HIGH_MOVEMENT_POWER +# } +# +# # Offered proportional gold +# modifier = { +# add = 85 +# scope:financial_support = yes +# desc = GOLD_REASON +# } +# +# # AI value mod +# ai_value_modifier = { +# ai_greed = 0.5 +# ai_boldness = 0.25 +# min = 0 +# max = 25 +# } +# } +# can_send_despite_rejection = no +# ai_frequency_by_tier = { +# barony = 0 +# county = 72 +# duchy = 72 +# kingdom = 36 +# empire = 24 +# hegemony = 24 +# } +# ai_targets = { +# ai_recipients = neighboring_rulers +# ai_recipients = liege +# } +# ai_will_do = { +# base = 0 +# +# modifier = { +# add = 50 +# scope:recipient = { +# has_trait = fp3_struggle_supporter +# scope:recipient.max_military_strength >= scope:actor.max_military_strength +# } +# } +# +# modifier = { +# add = 50 +# title:d_sunni.holder ?= scope:recipient +# } +# +# modifier = { +# add = 100 +# scope:recipient = { +# has_relation_rival = scope:actor +# } +# } +# +# modifier = { +# factor = 0.1 +# scope:actor.liege ?= scope:recipient +# } +# +# modifier = { +# factor = 0 +# scope:recipient = { +# has_character_flag = incursion_ai_pacing +# } +# } +# +# modifier = { +# factor = 0 +# scope:recipient = { +# is_at_war = yes +# is_ai = no +# } +# } +# +# modifier = { +# factor = 0 +# scope:recipient = { +# is_ai = no +# is_liege_or_above_of = scope:actor +# } +# } +# +# modifier = { +# factor = 0 +# scope:recipient = { +# OR = { +# has_relation_friend = scope:actor +# has_relation_lover = scope:actor +# opinion = { +# target = scope:actor +# value >= 45 +# } +# } +# } +# } +# } +#} +# +#################################### +## Challenge House Head +## By Hugo Cortell +## Reworked by Joe Parkin +#################################### +#fp3_challenge_house_head_interaction = { +# icon = house_unity_sword +# category = interaction_category_hostile +# common_interaction = no +# ai_min_reply_days = 4 +# ai_max_reply_days = 9 +# popup_on_receive = yes +# pause_on_receive = yes +# use_diplomatic_range = no +# +# interface_priority = 107 +# +# desc = fp3_challenge_house_head_interaction_desc +# +# notification_text = { +# first_valid = { +# triggered_desc = { +# trigger = { scope:diplomacy = yes } +# desc = fp3_challenge_house_head_interaction_notification_diplomacy +# } +# desc = fp3_challenge_house_head_interaction_notification +# } +# } +# +# greeting = positive +# +# ai_maybe = yes +# +# cooldown_against_recipient = { years = 10 } +# +# is_available = { +# OR = { +# government_has_flag = government_is_clan +# government_is_japanese_trigger = yes +# } +# trigger_if = { +# limit = { is_ai = yes } +# is_house_head = no +# is_physically_able = yes +# } +# } +# +# is_shown = { +# has_fp3_dlc_trigger = yes +# scope:actor = { +# this != scope:recipient +# house ?= { +# house_head ?= scope:recipient +# OR = { +# has_house_unity_parameter = unity_can_challenge_house_head +# house_head ?= { government_is_japanese_trigger = yes } +# scope:actor = { +# any_character_struggle = { has_struggle_phase_parameter = unlocks_challenge_house_head_for_clans } +# } +# } +# } +# } +# } +# +# is_valid_showing_failures_only = { +# scope:actor = { +# is_at_war = no +# is_available_adult = yes +# } +# scope:recipient = { +# is_at_war = no +# is_available_adult = yes +# # Stop challenges from barons and counts against kings +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_tier_tt +# tier_difference = { +# target = scope:actor +# value <= 1 +# } +# } +# # Give some respite after a recent challenge +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_recent_tt +# NOT = { has_character_flag = fp3_challenge_house_head_recent_flag } +# } +# tgp_is_ceremonial_liege_trigger = no +# } +# } +# +# auto_accept = { +# trigger_if = { +# limit = { +# scope:recipient = { is_ruler = no } +# } +# scope:recipient = { is_ruler = no } +# } +# trigger_else_if = { +# limit = { scope:hook = yes } +# custom_description = { +# text = "spending_hook" +# subject = scope:actor +# object = scope:recipient +# scope:hook = yes +# } +# } +# trigger_else_if = { +# limit = { +# scope:recipient = { is_vassal_or_below_of = scope:actor } +# } +# scope:recipient = { is_vassal_or_below_of = scope:actor } +# } +# trigger_else_if = { +# limit = { +# scope:actor = { is_heir_of = scope:recipient } +# } +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_heir_bonus_desc +# scope:actor = { is_heir_of = scope:recipient } +# } +# } +# trigger_else = { always = no } +# } +# +# can_send = { +# scope:actor = { +# # Do not allow house heads who accepted a challenge to ping pong back and forth +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_accepted_tt +# NOT = { has_character_flag = accepted_house_head_challenge_flag } +# } +# } +# scope:recipient = { +# # Do not allow multiple challenges at the same time +# custom_tooltip = { +# text = fp3_challenge_house_head_interaction_ongoing_tt +# NOT = { has_character_flag = ongoing_house_head_challenge_flag } +# } +# } +# } +# +# on_send = { +# scope:recipient = { +# add_character_flag = { # stop multiple challenges at same time +# flag = ongoing_house_head_challenge_flag +# months = 1 +# } +# add_character_flag = { # stop AI constantly challenging players +# flag = ai_cooldown_house_head_challenge_flag +# years = 5 +# } +# } +# } +# +# on_accept = { +# scope:recipient = { save_scope_as = house_head } +# if = { +# limit = { +# OR = { +# scope:recipient = { is_vassal_or_below_of = scope:actor } +# scope:recipient = { is_ruler = no } +# } +# } +# scope:actor.house = { set_house_head = scope:actor } +# } +# else = { +# scope:actor = { +# save_scope_as = house_challenger +# if = { # Hook consumption +# limit = { scope:hook = yes } +# use_hook = scope:house_head +# } +# if = { +# limit = { scope:diplomacy = yes } +# custom_tooltip = fp3_challenge_house_head_interaction_tooltip_actor.diplomacy +# trigger_event = fp3_misc_decisions.0026 +# scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.diplomacy } +# house = { +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:house_challenger +# TARGET = scope:house_head +# VALUE = minor_unity_loss +# DESC = clan_unity_challenged_to_duel.desc +# REVERSE_NON_HOUSE_TARGET = yes +# } +# } +# } +# else = { +# if = { +# limit = { scope:lethal = no } +# custom_tooltip = fp3_challenge_house_head_interaction_tooltip_actor.a +# scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.b } +# house = { +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:house_challenger +# TARGET = scope:house_head +# VALUE = minor_unity_loss +# DESC = clan_unity_challenged_to_duel.desc +# REVERSE_NON_HOUSE_TARGET = yes +# } +# } +# } +# else = { +# custom_tooltip = fp3_challenge_house_head_interaction_tooltip_actor.a.lethal +# scope:house_head = { custom_tooltip = fp3_challenge_house_head_interaction_tooltip_recipient.b.lethal } +# house = { +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:house_challenger +# TARGET = scope:house_head +# VALUE = major_unity_loss +# DESC = clan_unity_challenged_to_duel.desc +# REVERSE_NON_HOUSE_TARGET = yes +# } +# } +# } +# # Admin Japanese can duel, but it is frowned upon +# scope:actor = { +# custom_description_no_bullet = { +# text = challenge_house_head_japanese_admin +# } +# if = { +# limit = { +# government_is_japanese_trigger = yes +# tgp_soryo_or_bushido_trigger = no +# } +# if = { +# limit = { scope:lethal = no } +# add_prestige = medium_prestige_loss +# } +# else = { +# add_prestige = major_prestige_loss +# add_prestige_level = -1 +# } +# } +# } +# trigger_event = fp3_misc_decisions.0022 +# } +# } +# if = { +# limit = { scope:diplomacy = no } +# if = { +# limit = { scope:lethal = no } +# custom_tooltip = fp3_challenge_house_head_interaction_duel_tooltip_warning +# } +# else = { custom_tooltip = fp3_challenge_house_head_interaction_duel_tooltip_warning_lethal } +# } +# } +# } +# +# on_decline = { # Get letter of rejection, to further escalate the situation if the player wills it +# scope:actor = { trigger_event = fp3_misc_decisions.0025 } +# scope:recipient = { +# add_prestige = major_prestige_loss +# remove_character_flag = ongoing_house_head_challenge_flag +# } +# } +# +# send_option = { +# flag = diplomacy +# localization = CHALLENGE_HOUSE_HEAD_DIPLOMACY_DUEL +# starts_enabled = { +# scope:actor = { tgp_soryo_or_bushido_trigger = no } +# } +# is_valid = { +# custom_tooltip = { +# text = CHALLENGE_HOUSE_HEAD_LETHAL_DUEL_INVALID_TT +# NOT = { scope:lethal = yes } +# } +# } +# } +# send_option = { +# flag = lethal +# localization = CHALLENGE_HOUSE_HEAD_LETHAL_DUEL +# is_valid = { +# scope:actor = { +# has_relation_rival = scope:recipient +# trigger_if = { +# limit = { government_is_japanese_trigger = yes } +# tgp_soryo_or_bushido_trigger = yes +# scope:recipient = { tgp_soryo_or_bushido_trigger = yes } +# } +# } +# custom_tooltip = { +# text = CHALLENGE_HOUSE_HEAD_LETHAL_DUEL_INVALID_TT +# NOT = { scope:diplomacy = yes } +# } +# } +# } +# send_option = { +# flag = hook +# localization = GENERIC_SPEND_A_HOOK +# is_valid = { +# scope:actor = { has_usable_hook = scope:recipient } +# } +# } +# should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } +# extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" +# send_options_exclusive = no +# +# # AI +# ai_accept = { +# base = 25 +# modifier = { +# add = -50 +# scope:lethal = yes +# desc = AI_AVOID_LETHAL_DUEL +# } +# modifier = { +# add = 15 +# scope:recipient = { has_trait = ambitious } +# desc = INTERACTION_AMBITIOUS +# } +# modifier = { +# add = 25 +# scope:recipient = { has_trait = brave } +# desc = INTERACTION_BRAVE +# } +# modifier = { +# add = { +# value = -25 +# if = { +# limit = { scope:lethal = yes } +# multiply = 2 +# } +# } +# scope:recipient = { has_trait = craven } +# desc = INTERACTION_CRAVEN +# } +# modifier = { +# scope:recipient.ai_greed != 0 +# add = { # Greedy people won't risk a position of power, even if their prestige suffers +# value = scope:recipient.ai_greed +# multiply = -1 +# max = 35 +# min = -35 +# } +# desc = AI_VALUE_MODIFIER_GREED +# } +# modifier = { +# scope:recipient.ai_honor != 0 +# add = { +# value = scope:recipient.ai_honor +# max = 75 +# min = -35 +# } +# desc = AI_VALUE_MODIFIER_HONOR +# } +# modifier = { +# scope:recipient.ai_energy != 0 +# add = { +# value = scope:recipient.ai_energy +# max = 10 +# min = -10 +# } +# desc = AI_VALUE_MODIFIER_ENERGY +# } +# modifier = { +# NOT = { scope:diplomacy = yes } +# add = { +# value = scope:recipient.prowess +# subtract = scope:actor.prowess +# multiply = 2 +# } +# desc = CTSC_RELATIVE_PROWESS +# } +# modifier = { +# scope:lethal = yes +# scope:recipient = { +# OR = { +# is_parent_of = scope:actor +# is_child_of = scope:actor +# } +# NOT = { has_relation_rival = scope:actor } +# } +# factor = 0.5 +# desc = AI_AVOID_LETHAL_DUEL_WITH_FAMILY +# } +# modifier = { +# NOT = { scope:diplomacy = yes } +# scope:recipient = { +# government_is_japanese_trigger = yes +# tgp_soryo_or_bushido_trigger = no +# } +# factor = 0.5 +# desc = AI_NOT_SORYO_OR_BUSHIDO +# } +# opinion_modifier = { +# opinion_target = scope:actor +# multiplier = 0.5 +# } +# } +# +# ai_frequency_by_tier = { +# barony = 0 +# county = 36 +# duchy = 24 +# kingdom = 6 +# empire = 1 +# hegemony = 1 +# } +# +# ai_target_quick_trigger = { +# adult = yes +# } +# +# ai_targets = { +# ai_recipients = dynasty +# ai_recipients = family +# max = 10 +# } +# +# ai_targets = { +# ai_recipients = liege +# ai_recipients = head_of_faith +# ai_recipients = hooked_characters +# ai_recipients = scripted_relations +# } +# +# ai_targets = { +# ai_recipients = peer_vassals +# ai_recipients = vassals +# ai_recipients = neighboring_rulers +# max = 30 +# } +# +# ai_will_do = { +# base = 5 +# # Base requirements for AI +# modifier = { +# add = -1000 +# AND = { +# NOT = { +# scope:recipient = { is_vassal_or_below_of = scope:actor } +# } +# OR = { +# AND = { +# top_liege = this +# highest_held_title_tier >= scope:recipient.highest_held_title_tier +# } +# is_powerful_vassal = yes +# is_close_or_extended_family_of = scope:recipient +# opinion = { +# target = scope:recipient +# value >= 25 +# } +# } +# } +# } +# # Tiers +# modifier = { +# add = 10 +# piety_level >= scope:recipient.piety_level +# } +# modifier = { +# add = 10 +# prestige_level >= scope:recipient.prestige_level +# } +# modifier = { +# add = 10 +# highest_held_title_tier >= scope:recipient.highest_held_title_tier +# } +# # Traits +# modifier = { +# add = 30 +# has_trait = ambitious +# } +# modifier = { +# add = 30 +# has_trait = brave +# } +# modifier = { +# add = -30 +# has_trait = craven +# } +# # Dread +# modifier = { +# add = -25 +# has_dread_level_towards = { +# target = scope:recipient +# level >= 1 +# } +# } +# modifier = { +# add = -25 +# has_dread_level_towards = { +# target = scope:recipient +# level >= 2 +# } +# } +# # Personality +# modifier = { +# ai_boldness > 0 +# add = { +# value = ai_boldness +# divide = 2 +# min = 1 +# } +# } +# modifier = { +# ai_greed >= 50 +# add = { +# value = ai_greed +# divide = 2 +# } +# } +# modifier = { +# ai_sociability = 100 +# add = 10 +# } +# # Higher in stature +# modifier = { +# is_independent_ruler = yes +# scope:recipient = { is_independent_ruler = no } +# add = 1000 +# } +# modifier = { +# highest_held_title_tier > scope:recipient.highest_held_title_tier +# scope:recipient = { is_independent_ruler = no } +# add = { +# value = highest_held_title_tier +# add = scope:recipient.highest_held_title_tier +# multiply = 10 +# } +# } +# modifier = { +# scope:recipient = { is_vassal_or_below_of = scope:actor } +# add = 500 +# } +# # Remove non dominant gender +# modifier = { +# scope:actor = { is_faith_dominant_gender = yes } +# scope:recipient = { is_faith_dominant_gender = no } +# factor = 2 +# } +# # Stop AI constantly challenging players +# modifier = { +# scope:recipient = { has_character_flag = ai_cooldown_house_head_challenge_flag } +# factor = 0 +# } +# # Stop AI game-overing players +# modifier = { +# scope:recipient = { +# trigger_if = { +# limit = { is_ai = no } +# is_landed = no +# any_held_title = { is_noble_family_title = yes } +# } +# } +# factor = 0 +# } +# } +#} +# +# +#################################### +## Change struggle allegiance +#################################### +#fp3_change_allegiance = { +# interface_priority = 30 +# category = interaction_category_diplomacy +# common_interaction = yes +# desc = { +# first_valid = { +# # Become a supporter. +# triggered_desc = { +# trigger = { +# scope:actor = { has_trait = fp3_struggle_supporter } +# } +# desc = fp3_change_allegiance.desc.actor_is_supporter +# } +# # Become a detractor. +# triggered_desc = { +# trigger = { +# scope:actor = { has_trait = fp3_struggle_detractor } +# } +# desc = fp3_change_allegiance.desc.actor_is_detractor +# } +# desc = fp3_change_allegiance.desc.fallback +# } +# } +# icon = change_allegiance +# +# greeting = positive +# notification_text = fp3_change_allegiance_notification +# +# should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } +# extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" +# +# send_options_exclusive = no +# +# ai_maybe = yes +# +# is_available = { +# any_character_struggle = { is_struggle_type = persian_struggle } +# trigger_if = { +# limit = { is_ai = yes } +# OR = { +# has_trait = fp3_struggle_detractor +# has_trait = fp3_struggle_supporter +# } +# primary_title.tier >= tier_duchy +# } +# } +# +# is_shown = { +# has_fp3_dlc_trigger = yes +# # There has to be a caliph around to sway on. +# ## Arguably narratively not, but mechanically, everything will break if we don't. +# exists = title:d_sunni.holder +# scope:recipient != scope:actor +# scope:actor = { +# OR = { +# # Detractors are made from supporters. +# AND = { +# has_trait = fp3_struggle_detractor +# scope:recipient = { has_trait = fp3_struggle_supporter } +# } +# # Supporters are made from detractors. +# AND = { +# has_trait = fp3_struggle_supporter +# scope:recipient = { has_trait = fp3_struggle_detractor } +# } +# # Neutrals can be asked either way, should they exist. +# AND = { +# OR = { +# has_trait = fp3_struggle_detractor +# has_trait = fp3_struggle_supporter +# } +# scope:recipient = { +# NOR = { +# has_trait = fp3_struggle_detractor +# has_trait = fp3_struggle_supporter +# } +# } +# } +# } +# } +# scope:recipient = { +# any_character_struggle = { is_struggle_type = persian_struggle } +# # You cannot ask the Caliph! +# NOT = { this = title:d_sunni.holder } +# } +# } +# +# is_valid_showing_failures_only = { +# scope:recipient = { +# # We want to disable some stuff for supporters who can't be persuaded away from the caliph. +# trigger_if = { +# limit = { has_trait = fp3_struggle_supporter } +# # Can't be allied to the caliph. +# NOT = { is_allied_to = title:d_sunni.holder } +# # Can't be strong hooked _by_ the caliph. +# NOT = { +# title:d_sunni.holder = { has_strong_hook = prev } +# } +# # Can't have only recently changed to become a supporter. +# custom_tooltip = { +# text = fp3_change_allegiance.tt.recently_voluntarily_became_supporter +# OR = { +# NOT = { has_variable = last_explicit_friday_prayer_caliph } +# NOT = { var:last_explicit_friday_prayer_caliph = title:d_sunni.holder } +# } +# } +# } +# # Likewise, some circumstances can force them to stay as a detractor. +# trigger_if = { +# limit = { has_trait = fp3_struggle_detractor } +# # Can't have only recently changed to become a detractor. +# custom_tooltip = { +# text = fp3_change_allegiance.tt.recently_voluntarily_became_detractor +# OR = { +# NOT = { has_variable = last_explicit_friday_prayer_caliph } +# NOT = { var:last_explicit_friday_prayer_caliph = title:d_sunni.holder } +# } +# } +# # Can't have been forced into becoming a detractor by the caliph overstepping. +# custom_tooltip = { +# text = fp3_change_allegiance.tt.recently_forced_to_detractor +# OR = { +# NOT = { has_variable = last_explicit_defied_caliph } +# NOT = { var:last_explicit_defied_caliph = title:d_sunni.holder } +# } +# } +# } +# # Plus some general stuff. +# is_at_war = no +# # Can't have recently been convinced to change their minds. +# custom_tooltip = { +# text = fp3_change_allegiance.tt.recently_changed_mind +# NOT = { has_character_flag = fp3_change_allegiance_recipient_cooldown } +# } +# custom_tooltip = { +# text = fp3_change_allegiance.tt.recently_refused +# NOT = { has_character_flag = fp3_change_allegiance_refused_cooldown } +# } +# # They must be an orthodox Sunni. +# custom_tooltip = { +# text = fp3_change_allegiance.tt.hof_is_d_sunni +# faith.religious_head ?= title:d_sunni.holder +# } +# } +# scope:actor = { is_available_adult = yes } +# } +# +# auto_accept = { +# custom_description = { +# text = "spending_hook" +# subject = scope:actor +# object = scope:recipient +# scope:hook = yes +# } +# } +# +# ai_accept = { +# base = 0 +# +# # Those who already have a stance are more set in their ways. +# ## Detractors +# modifier = { +# add = -25 +# scope:actor = { has_trait = fp3_struggle_supporter } +# scope:recipient = { has_trait = fp3_struggle_detractor } +# desc = INTERACTION_DETRACTOR +# } +# ## Supporters +# modifier = { +# add = -25 +# scope:actor = { has_trait = fp3_struggle_detractor } +# scope:recipient = { has_trait = fp3_struggle_supporter } +# desc = INTERACTION_SUPPORTER +# } +# +# # Opinions +# ## Opinion of you +# opinion_modifier = { +# who = scope:recipient +# opinion_target = scope:actor +# multiplier = { +# value = 1 +# # Despawn this if you're not the caliph. +# if = { +# limit = { scope:actor = title:d_sunni.holder } +# multiply = 0 +# } +# } +# } +# ## Opinion of the caliph +# opinion_modifier = { +# who = scope:recipient +# opinion_target = title:d_sunni.holder +# multiplier = { +# value = 0.5 +# # If you're the caliph, you can take the full amount. +# if = { +# limit = { scope:actor = title:d_sunni.holder } +# add = 0.5 +# } +# } +# } +# # Traits. +# ## Become supporter. +# ### ++ Zealous. +# modifier = { +# add = 25 +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_ZEALOUS +# scope:actor = { has_trait = fp3_struggle_supporter } +# scope:recipient = { has_trait = zealous } +# } +# ## Become detractor. +# ### -- Cynical. +# modifier = { +# add = 25 +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_CYNICAL +# scope:actor = { has_trait = fp3_struggle_detractor } +# scope:recipient = { has_trait = cynical } +# } +# ## Neutral. +# ### ++ Fickle. +# modifier = { +# add = 25 +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_FICKLE +# scope:recipient = { has_trait = fickle } +# } +# ### + Disloyal. +# modifier = { +# add = 15 +# desc = HAS_LOYAL_TRAIT +# scope:recipient = { has_trait = disloyal } +# } +# ### - Loyal. +# modifier = { +# add = 15 +# desc = HAS_DISLOYAL_TRAIT +# scope:recipient = { has_trait = loyal } +# } +# ### -- Stubborn. +# modifier = { +# add = 25 +# desc = ASK_FOR_CONVERSION_RECIPIENT_IS_STUBBORN +# scope:recipient = { has_trait = stubborn } +# } +# # Diplomacy +# ## Scope:actor's for convincing +# modifier = { +# add = { +# value = scope:actor.diplomacy +# multiply = 5 +# } +# desc = INTERACTION_DIPLOMACY_ACTOR +# } +# ## Scope:recipient's for resisting +# modifier = { +# add = { +# value = scope:recipient.diplomacy +# multiply = -3 +# } +# desc = INTERACTION_DIPLOMACY_RECIPIENT +# } +# } +# +# cost = { +# prestige = medium_prestige_value +# } +# +# # Use hook +# send_option = { +# flag = hook +# is_valid = { +# scope:actor = { +# has_usable_hook = scope:recipient +# } +# } +# localization = GENERIC_SPEND_A_HOOK +# } +# +# on_accept = { +# # Use our hook if we have to. +# if = { +# limit = { always = scope:hook } +# scope:actor = { +# use_hook = scope:recipient +# } +# } +# # If we're a clan this interaction affects unity +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:actor +# TARGET = scope:recipient +# VALUE = medium_unity_gain +# DESC = clan_unity_changed_alignment.desc +# REVERSE_NON_HOUSE_TARGET = no +# } +# # Run the actual effects. +# scope:actor = { +# send_interface_toast = { +# type = event_toast_effect_good +# title = recipient_joined_your_side_title +# left_icon = scope:recipient +# +# scope:recipient = { +# if = { +# limit = { scope:actor = { has_trait = fp3_struggle_detractor } } +# if = { +# limit = { has_trait = fp3_struggle_supporter } +# remove_trait = fp3_struggle_supporter +# } +# add_trait_force_tooltip = fp3_struggle_detractor +# +# # Catalyst +# hidden_effect = { +# if = { +# limit = { +# scope:actor = { +# any_character_struggle = { +# involvement = involved +# phase_has_catalyst = catalyst_turn_supporter_into_detractor +# } +# } +# } +# every_character_struggle = { +# involvement = involved +# activate_struggle_catalyst = { +# catalyst = catalyst_turn_supporter_into_detractor +# character = scope:actor +# } +# log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_turn_supporter_into_detractor } +# } +# } +# } +# } +# else = { +# if = { +# limit = { has_trait = fp3_struggle_detractor } +# remove_trait = fp3_struggle_detractor +# } +# add_trait_force_tooltip = fp3_struggle_supporter +# +# # Catalyst +# hidden_effect = { +# if = { +# limit = { +# scope:actor = { +# any_character_struggle = { +# involvement = involved +# phase_has_catalyst = catalyst_turn_detractor_into_supporter +# } +# } +# } +# every_character_struggle = { +# involvement = involved +# activate_struggle_catalyst = { +# catalyst = catalyst_turn_detractor_into_supporter +# character = scope:actor +# } +# log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_turn_detractor_into_supporter } +# } +# } +# } +# } +# } +# } +# } +# # Aaaaand flag scope:recipient as on cooldown for a while. +# scope:recipient = { +# set_variable = { +# name = fp3_change_allegiance_recipient_cooldown +# years = 20 +# } +# } +# } +# +# on_decline = { +# add_clan_unity_interaction_effect = { +# CHARACTER = scope:actor +# TARGET = scope:recipient +# VALUE = medium_unity_loss +# DESC = clan_unity_refused_alignment.desc +# REVERSE_NON_HOUSE_TARGET = no +# } +# scope:actor = { +# if = { +# limit = { +# scope:actor = { has_trait = fp3_struggle_detractor } +# } +# send_interface_toast = { +# type = event_toast_effect_bad +# title = recipient_refused_to_join_your_side_title +# left_icon = scope:recipient +# progress_towards_rival_effect = { +# REASON = rival_rejected_switching_to_struggle_detractor +# CHARACTER = scope:recipient +# OPINION = default_rival_opinion +# } +# } +# } +# else = { +# send_interface_toast = { +# type = event_toast_effect_bad +# title = recipient_refused_to_join_your_side_title +# left_icon = scope:recipient +# progress_towards_rival_effect = { +# REASON = rival_rejected_switching_to_struggle_supporter +# CHARACTER = scope:recipient +# OPINION = default_rival_opinion +# } +# } +# } +# } +# scope:recipient = { +# set_variable = { +# name = fp3_change_allegiance_refused_cooldown +# years = 20 +# } +# } +# } +# ai_frequency_by_tier = { +# barony = 0 +# county = 0 +# duchy = 120 +# kingdom = 120 +# empire = 120 +# hegemony = 120 +# } +# +# ai_targets = { +# ai_recipients = liege +# ai_recipients = neighboring_rulers +# ai_recipients = peer_vassals +# ai_recipients = vassals +# ai_recipients = top_realm_domicile_owners +# max = 10 +# } +# +# ai_will_do = { +# base = -50 # Let's limit it to specific character to avoid pure chaos +# +# ############### +# ## BASE +# ############### +# +# # AI Values +# ## Detractors run off of lacking zeal +# modifier = { +# add = { +# value = ai_zeal +# multiply = -2 +# } +# has_trait = fp3_struggle_detractor +# ai_zeal <= -1 +# } +# ## Supporters run off of turbo-charged zeal +# modifier = { +# add = { +# value = ai_zeal +# multiply = 2 +# } +# has_trait = fp3_struggle_supporter +# ai_zeal >= 1 +# } +# +# # The caliph wants to use this all the time. +# modifier = { +# has_title = title:d_sunni +# add = 200 +# } +# +# ############### +# ## TRAITS +# ############### +# +# # schemer +# modifier = { +# add = 15 +# has_trait = schemer +# } +# +# # theologian +# modifier = { +# add = 25 +# has_trait = theologian +# } +# +# # intrigue education +# modifier = { +# add = 15 +# has_trait = education_intrigue +# } +# +# # learning education +# modifier = { +# add = 25 +# has_trait = education_learning +# } +# +# ################ +# ## RELATIONSHIP +# ################ +# +# # more likely to do it against friend and lover +# modifier = { +# add = 50 +# scope:recipient = { +# OR = { +# has_relation_friend = scope:actor +# has_relation_lover = scope:actor +# has_relation_soulmate = scope:actor +# has_relation_best_friend = scope:actor +# } +# } +# } +# +# # boost against liege for Ambitious +# modifier = { +# add = 50 +# scope:actor = { +# has_trait = ambitious +# is_vassal_of = scope:recipient +# } +# } +# +# # never target your rivals +# modifier = { +# add = -1000 +# scope:recipient = { +# OR = { +# has_relation_rival = scope:actor +# has_relation_nemesis = scope:actor +# } +# } +# } +# +# ################ +# ## STRUGGLE +# ################ +# +# modifier = { +# add = 100 +# OR = { +# AND = { +# scope:recipient = { has_trait = fp3_struggle_supporter } +# scope:actor = { +# has_trait = fp3_struggle_detractor +# any_character_struggle = { +# involvement = involved +# phase_has_catalyst = catalyst_turn_supporter_into_detractor +# } +# } +# } +# AND = { +# scope:recipient = { has_trait = fp3_struggle_detractor } +# scope:actor = { +# has_trait = fp3_struggle_supporter +# any_character_struggle = { +# involvement = involved +# phase_has_catalyst = catalyst_turn_detractor_into_supporter +# } +# } +# } +# } +# } +# } +#} +# +# +#################################### +## Request honorary titles +#################################### +#fp3_request_honorary_titles_interaction = { +# interface_priority = 30 +# category = interaction_category_religion +# common_interaction = yes +# desc = fp3_request_honorary_titles_interaction_desc +# icon = honorary_titles +# +# greeting = positive +# +# auto_accept = yes +# +# cooldown = { years = 10 } +# +# cost = { +# piety = { +# value = major_piety_value +# if = { +# limit = { # cheaper for the actual liege +# scope:actor = { +# any_vassal = { +# any_held_title = { +# this = title:d_sunni +# } +# } +# } +# } +# subtract = medium_piety_value +# } +# } +# } +# +# is_available = { +# trigger_if = { +# limit = { is_ai = yes } +# any_vassal = { +# any_held_title = { +# this = title:d_sunni +# } +# } +# } +# } +# +# is_shown = { +# fp3_reward_from_vassalization_ending = yes +# } +# +# is_valid = { +# # honorary titles should be unique +# custom_tooltip = { +# text = one_of_the_title_is_available_tt +# scope:actor = { +# house ?= { +# NAND = { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_intrigue_modifier +# } +# any_house_member = { +# has_character_modifier = fp3_honorary_title_scholarship_modifier +# } +# +# any_house_member = { +# has_character_modifier = fp3_honorary_title_stewardship_modifier +# } +# any_house_member = { +# has_character_modifier = fp3_honorary_title_diplomacy_modifier +# } +# any_house_member = { +# has_character_modifier = fp3_honorary_title_piety_modifier +# } +# any_house_member = { +# has_character_modifier = fp3_honorary_title_prestige_modifier +# } +# any_house_member = { +# has_character_modifier = fp3_honorary_title_martial_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = intrigue_option +# localization = fp3_honorary_title_intrigue_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_intrigue_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = scholarship_option +# localization = fp3_honorary_title_scholarship_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_scholarship_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = stewardship_option +# localization = fp3_honorary_title_stewardship_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_stewardship_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = diplomacy_option +# localization = fp3_honorary_title_diplomacy_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_diplomacy_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = piety_option +# localization = fp3_honorary_title_piety_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_piety_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = prestige_option +# localization = fp3_honorary_title_prestige_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_prestige_modifier +# } +# } +# } +# } +# } +# } +# +# send_option = { +# flag = martial_option +# localization = fp3_honorary_title_martial_modifier +# is_valid = { +# NOT = { +# scope:actor = { +# house ?= { +# any_house_member = { +# has_character_modifier = fp3_honorary_title_martial_modifier +# } +# } +# } +# } +# } +# } +# +# on_accept = { +# scope:actor = { +# send_interface_toast = { +# type = event_toast_effect_good +# title = new_honorary_title_acquired_title +# left_icon = scope:recipient +# +# switch = { +# trigger = yes +# scope:intrigue_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_intrigue_modifier +# } +# } +# scope:scholarship_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_scholarship_modifier +# } +# } +# scope:stewardship_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_stewardship_modifier +# } +# } +# scope:diplomacy_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_diplomacy_modifier +# } +# } +# scope:piety_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_piety_modifier +# } +# } +# scope:prestige_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_prestige_modifier +# } +# } +# scope:martial_option = { +# add_character_modifier = { +# modifier = fp3_honorary_title_martial_modifier +# } +# } +# } +# } +# } +# } +# +# ai_frequency_by_tier = { +# barony = 0 +# county = 0 +# duchy = 0 +# kingdom = 60 +# empire = 60 +# hegemony = 60 +# } +# +# ai_targets = { +# ai_recipients = vassals +# } +# +# ai_will_do = { +# base = 100 +# } +#} +# +# +#################################### +## Request house unity interference +#################################### +#fp3_request_house_unity_change_interaction = { +# interface_priority = 30 +# category = interaction_category_religion +# common_interaction = yes +# desc = fp3_request_house_unity_change_interaction_desc +# icon = unity_harmonious +# +# greeting = positive +# +# +# auto_accept = yes +# +# cooldown = { years = 10 } +# +# cost = { +# piety = medium_piety_value +# } +# +# is_available = { +# government_has_flag = government_is_clan +# trigger_if = { +# limit = { is_ai = yes } +# any_vassal = { +# any_held_title = { +# this = title:d_sunni +# } +# } +# } +# } +# +# is_shown = { +# fp3_reward_from_vassalization_ending = yes +# } +# +# is_valid = { +# # only valid for the actual liege +# custom_tooltip = { +# text = you_are_the_liege_of_the_caliph_tt +# scope:actor = { +# is_liege_or_above_of = scope:recipient +# } +# scope:recipient = { +# any_held_title = { +# this = title:d_sunni +# } +# } +# } +# } +# +# send_option = { +# flag = unity_gain +# localization = INCREASE_HOUSE_UNITY +# starts_enabled = { always = yes } +# } +# +# send_option = { +# flag = unity_loss +# localization = DECREASE_HOUSE_UNITY +# } +# +# on_accept = { +# scope:recipient = { save_scope_as = unity_target } +# scope:actor = { +# save_scope_as = unity_character +# house = { +# add_unity_value = { +# value = { +# if = { +# limit = { scope:unity_gain = yes } +# add = medium_unity_gain +# } +# else_if = { +# limit = { scope:unity_loss = yes } +# add = medium_unity_loss +# } +# } +# character = scope:actor +# desc = clan_unity_caliph_interfered_with_unity.desc +# } +# } +# } +# } +# +# ai_frequency_by_tier = { +# barony = 0 +# county = 0 +# duchy = 0 +# kingdom = 60 +# empire = 60 +# hegemony = 60 +# } +# +# ai_targets = { +# # For the AI, we limit it to neighboring_rulers +# ai_recipients = vassals +# } +# +# ai_will_do = { +# base = 100 +# } +#} diff --git a/common/coat_of_arms/template_lists/coa_templates.txt b/common/coat_of_arms/template_lists/coa_templates.txt index a7109269d..e2ee9dee4 100644 --- a/common/coat_of_arms/template_lists/coa_templates.txt +++ b/common/coat_of_arms/template_lists/coa_templates.txt @@ -150,29 +150,29 @@ 60 = circled_indian_template_offset_inverted } # India proper (to tone down those very cultural specific designs vs catch all) - special_selection = { - trigger = { - exists = scope:title - scope:title = { - any_this_title_or_de_jure_above = { - OR = { - this = title:h_india - this = title:e_deccan - this = title:e_rajastan - this = title:k_gondwana - this = title:k_bihar - this = title:k_orissa - } - } - } - } - 100 = indian_single_template - 100 = indian_single_template_inverted - 100 = indian_single_template_senester - 100 = indian_single_template_senester_inverted - 100 = circled_indian_single_symbol_template - 100 = circled_indian_single_symbol_template_inverted - } + #special_selection = { + # trigger = { + # exists = scope:title + # scope:title = { + # any_this_title_or_de_jure_above = { + # OR = { + # this = title:h_india + # this = title:e_deccan + # this = title:e_rajastan + # this = title:k_gondwana + # this = title:k_bihar + # this = title:k_orissa + # } + # } + # } + # } + # 100 = indian_single_template + # 100 = indian_single_template_inverted + # 100 = indian_single_template_senester + # 100 = indian_single_template_senester_inverted + # 100 = circled_indian_single_symbol_template + # 100 = circled_indian_single_symbol_template_inverted + #} # Tamgha users - Circle/Roundel special_selection = { diff --git a/common/customizable_localization/00_divinity_custom_loc.txt b/common/customizable_localization/00_divinity_custom_loc.txt index b3a64b9c8..76e6a163f 100644 --- a/common/customizable_localization/00_divinity_custom_loc.txt +++ b/common/customizable_localization/00_divinity_custom_loc.txt @@ -1390,7 +1390,7 @@ GetActualBishopTitle = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } OR = { has_title = title:d_et_georgia - has_title = title:d_et_kartli + #has_title = title:d_et_kartli has_title = title:d_et_moscow } } @@ -1401,7 +1401,7 @@ GetActualBishopTitle = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } OR = { has_title = title:d_et_georgia - has_title = title:d_et_kartli + #has_title = title:d_et_kartli has_title = title:d_et_moscow } } @@ -1409,26 +1409,26 @@ GetActualBishopTitle = { } # Patriarch exception - text = { - trigger = { - OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } - OR = { - primary_title ?= title:d_et_alexandria - primary_title ?= title:d_et_antioch - primary_title ?= title:d_et_aquileia - primary_title ?= title:d_et_jerusalem - cp:councillor_court_chaplain ?= { - OR = { - primary_title ?= title:d_et_alexandria - primary_title ?= title:d_et_antioch - primary_title ?= title:d_et_aquileia - primary_title ?= title:d_et_jerusalem - } - } - } - } - localization_key = councillor_court_chaplain_orthodox_clerical_region_holy_site - } + #text = { + # trigger = { + # OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } + # OR = { + # primary_title ?= title:d_et_alexandria + # primary_title ?= title:d_et_antioch + # primary_title ?= title:d_et_aquileia + # primary_title ?= title:d_et_jerusalem + # cp:councillor_court_chaplain ?= { + # OR = { + # primary_title ?= title:d_et_alexandria + # primary_title ?= title:d_et_antioch + # primary_title ?= title:d_et_aquileia + # primary_title ?= title:d_et_jerusalem + # } + # } + # } + # } + # localization_key = councillor_court_chaplain_orthodox_clerical_region_holy_site + #} text = { trigger = { @@ -2218,27 +2218,27 @@ GetActualDukeTheocracyTitle = { type = character # 'Early Out' keys for the Eastern Christian sees that keep their own head titles rather than Patriarch. - text = { - trigger = { - has_title = title:d_coptic_papacy - is_female = yes - } - localization_key = coptic_religious_head_title_female - } + #text = { + # trigger = { + # has_title = title:d_coptic_papacy + # is_female = yes + # } + # localization_key = coptic_religious_head_title_female + #} - text = { - trigger = { - has_title = title:d_coptic_papacy - } - localization_key = coptic_religious_head_title - } + #text = { + # trigger = { + # has_title = title:d_coptic_papacy + # } + # localization_key = coptic_religious_head_title + #} - text = { - trigger = { - has_title = title:d_apostolic_church - } - localization_key = apostolic_religious_head_title - } + #text = { + # trigger = { + # has_title = title:d_apostolic_church + # } + # localization_key = apostolic_religious_head_title + #} text = { trigger = { @@ -3043,7 +3043,7 @@ GetActualBishopTitlePossessive = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } OR = { has_title = title:d_et_georgia - has_title = title:d_et_kartli + #has_title = title:d_et_kartli has_title = title:d_et_moscow } } @@ -3054,7 +3054,7 @@ GetActualBishopTitlePossessive = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:oriental_orthodox_religion } OR = { has_title = title:d_et_georgia - has_title = title:d_et_kartli + #has_title = title:d_et_kartli has_title = title:d_et_moscow } } diff --git a/common/decisions/00_cultural_tradition_decisions.txt b/common/decisions/00_cultural_tradition_decisions.txt new file mode 100644 index 000000000..c7cf9336e --- /dev/null +++ b/common/decisions/00_cultural_tradition_decisions.txt @@ -0,0 +1,577 @@ +### Recruit Terrain Specialist ### +recruit_terrain_specialist_decision = { + ai_check_interval_by_tier = { + barony = 0 + county = 0 + duchy = 60 + kingdom = 60 + empire = 60 + hegemony = 60 + } + picture = { + trigger = { + government_has_flag = government_is_nomadic + } + reference = "gfx/interface/illustrations/activity_splash_screens/tour_arrival_tribal_neutral.dds" + } + picture = { + trigger = { + culture = { has_graphical_japanese_culture_group_trigger = yes } + } + reference = "gfx/interface/illustrations/decisions/tgp_dominance.dds" + } + picture = { + trigger = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + reference = "gfx/interface/illustrations/event_scenes/tgp_camp_asia.dds" + } + picture = { + trigger = { + culture = { has_graphical_india_culture_group_trigger = yes } + } + reference = "gfx/interface/illustrations/decisions/tgp_projects_mandala_capital.dds" + } + picture = { + reference = "gfx/interface/illustrations/decisions/decision_recruitment.dds" + } + sort_order = 10 + decision_group_type = courtier + + is_shown = { + # You can hire at least one type of terrain expert + OR = { + culture ?= { + OR = { + has_cultural_parameter = can_recruit_mountain_specialist + has_cultural_parameter = can_recruit_open_specialist + has_cultural_parameter = can_recruit_dry_specialist + has_cultural_parameter = can_recruit_hill_specialist + has_cultural_parameter = can_recruit_jungle_specialist + has_cultural_parameter = can_recruit_forest_specialist + has_cultural_parameter = can_recruit_winter_specialist + root = { + has_trait = nomadic_philosophy + } + } + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + is_landless_adventurer = no + } + + is_valid = { + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + } + domicile ?= { + has_domicile_building_or_higher = character_warfare_yurt_03 + } + } + } + + is_valid_showing_failures_only = { + is_imprisoned = no + } + + desc = { + random_valid = { + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_winter_specialist } } + desc = recruit_winter_specialist_decision_desc + } + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_forest_specialist } } + desc = recruit_forest_specialist_decision_desc + } + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_mountain_specialist } } + desc = recruit_mountain_specialist_decision_desc + } + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_dry_specialist } } + desc = recruit_dry_specialist_decision_desc + } + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_hill_specialist } } + desc = recruit_hill_specialist_decision_desc + } + triggered_desc = { + trigger = { culture = { has_cultural_parameter = can_recruit_jungle_specialist } } + desc = recruit_jungle_specialist_decision_desc + } + triggered_desc = { + trigger = { + OR = { + culture = { has_cultural_parameter = can_recruit_open_specialist } + has_trait = nomadic_philosophy + } + } + desc = recruit_open_specialist_decision_desc + } + triggered_desc = { + trigger = { + NOR = { + culture = { has_cultural_parameter = can_recruit_winter_specialist } + culture = { has_cultural_parameter = can_recruit_forest_specialist } + culture = { has_cultural_parameter = can_recruit_mountain_specialist } + culture = { has_cultural_parameter = can_recruit_dry_specialist } + culture = { has_cultural_parameter = can_recruit_hill_specialist } + culture = { has_cultural_parameter = can_recruit_jungle_specialist } + culture = { has_cultural_parameter = can_recruit_open_specialist } + has_trait = nomadic_philosophy + } + } + desc = recruit_terrain_specialist_decision_desc + } + } + } + + cost = { + gold = { + value = minor_gold_value + } + prestige = { + value = medium_prestige_value + } + } + + cooldown = { years = 5 } + + widget = { + gui = "decision_view_widget_option_list_generic" + controller = decision_option_list_controller + decision_to_second_step_button = "CHOOSE_TERRAIN_SPECIALIST_DECISION_NEXT_STEP_BUTTON" + show_from_start = yes + + item = { # Winter Soldier + value = recruit_winter_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_winter_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_winter_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_winter_specialist_decision + localization = recruit_winter_specialist_decision + icon = "gfx/interface/icons/traits/winter_soldier.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_winter_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = winter_soldier } + multiply = 0 + } + } + } + item = { # Forest Fighter + value = recruit_forest_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_forest_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_forest_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_forest_specialist_decision + localization = recruit_forest_specialist_decision + icon = "gfx/interface/icons/traits/forest_fighter.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_forest_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = forest_fighter } + multiply = 0 + } + } + } + item = { # Rough Terrain Expert + value = recruit_mountain_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_mountain_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_mountain_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_mountain_specialist_decision + localization = recruit_mountain_specialist_decision + icon = "gfx/interface/icons/traits/rough_terrain_expert.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_mountain_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = rough_terrain_expert } + multiply = 0 + } + } + } + item = { # Desert Warrior + value = recruit_dry_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_dry_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_dry_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_dry_specialist_decision + localization = recruit_dry_specialist_decision + icon = "gfx/interface/icons/traits/desert_warrior.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_dry_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = desert_warrior } + multiply = 0 + } + } + } + item = { # Rough Terrain Expert + value = recruit_hill_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_hill_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_hill_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_hill_specialist_decision + localization = recruit_hill_specialist_decision + icon = "gfx/interface/icons/traits/rough_terrain_expert.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_hill_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = rough_terrain_expert } + multiply = 0 + } + } + } + item = { # Jungle Stalker + value = recruit_jungle_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_jungle_specialist_decision_valid_tt + OR = { + culture = { + has_cultural_parameter = can_recruit_jungle_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_jungle_specialist_decision + localization = recruit_jungle_specialist_decision + icon = "gfx/interface/icons/traits/jungle_stalker.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_jungle_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = jungle_stalker } + multiply = 0 + } + } + } + item = { # Open Terrain Expert + value = recruit_open_specialist_decision + is_valid = { + custom_tooltip = { + text = recruit_open_specialist_decision_valid_tt + OR = { + has_trait = nomadic_philosophy + culture = { + has_cultural_parameter = can_recruit_open_specialist + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + } + current_description = recruit_open_specialist_decision + localization = recruit_open_specialist_decision + icon = "gfx/interface/icons/traits/open_terrain_expert.dds" + ai_chance = { + value = 0 + if = { + limit = { + culture = { + has_cultural_parameter = can_recruit_open_specialist + } + } + add = 100 + } + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + add = 50 + } + if = { + limit = { has_trait = open_terrain_expert } + multiply = 0 + } + } + } + } + + effect = { + if = { + limit = { + OR = { + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } + custom_tooltip = recruit_terrain_specialist_decision_minister_tooltip + } + else = { + custom_tooltip = recruit_terrain_specialist_decision_tooltip + } + hidden_effect = { + if = { + limit = { scope:recruit_winter_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = winter_soldier + SPECIALIST_TEMPLATE_CHARACTER = winter_commander_character + } + } + else_if = { + limit = { scope:recruit_forest_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = forest_fighter + SPECIALIST_TEMPLATE_CHARACTER = forest_commander_character + } + } + else_if = { + limit = { scope:recruit_mountain_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = rough_terrain_expert + SPECIALIST_TEMPLATE_CHARACTER = mountain_commander_character + } + } + else_if = { + limit = { scope:recruit_dry_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = desert_warrior + SPECIALIST_TEMPLATE_CHARACTER = desert_commander_character + } + } + else_if = { + limit = { scope:recruit_hill_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = rough_terrain_expert + SPECIALIST_TEMPLATE_CHARACTER = hill_commander_character + } + } + else_if = { + limit = { scope:recruit_jungle_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = jungle_stalker + SPECIALIST_TEMPLATE_CHARACTER = jungle_commander_character + } + } + else_if = { + limit = { scope:recruit_open_specialist_decision = yes } + recruit_terrain_specialist_effect = { + SPECIALIST_TRAIT = open_terrain_expert + SPECIALIST_TEMPLATE_CHARACTER = open_commander_character + } + } + } + } + + ai_potential = { + OR = { + culture = { + OR = { + has_cultural_parameter = can_recruit_winter_specialist + has_cultural_parameter = can_recruit_forest_specialist + has_cultural_parameter = can_recruit_mountain_specialist + has_cultural_parameter = can_recruit_dry_specialist + has_cultural_parameter = can_recruit_hill_specialist + has_cultural_parameter = can_recruit_jungle_specialist + has_cultural_parameter = can_recruit_open_specialist + root = { + has_trait = nomadic_philosophy + } + } + } + has_title = title:e_minister_grand_marshal + has_title = title:e_minister_of_war + } + } +} + +### Sacrifice Bear ### +sacrifice_bear_decision = { + picture = { + reference = "gfx/interface/illustrations/terrain_types/taiga.dds" + } + sort_order = 180 + + ai_check_interval = 0 + + cooldown = { years = 5 } + + desc = sacrifice_bear_decision_desc + + is_shown = { + rite ?= { rite_has_parameter = allows_bear_sacrifice } + is_landless_adventurer = no + } + + is_valid_showing_failures_only = { + is_capable_adult = yes + is_imprisoned = no + } + + is_valid = { + custom_tooltip = { + text = tgp_has_acquired_bear + has_character_modifier = hunt_captive_beast_modifier + } + } + + effect = { + custom_tooltip = { + text = sacrifice_bear_decision_effect + trigger_event = culture_tradition_events.3100 + } + } + + ai_potential = { + } + + ai_will_do = { + base = 100 + } +} diff --git a/common/decisions/30_mongol_invasion_decisions.txt b/common/decisions/30_mongol_invasion_decisions.txt index 54520a0a8..842982998 100644 --- a/common/decisions/30_mongol_invasion_decisions.txt +++ b/common/decisions/30_mongol_invasion_decisions.txt @@ -1,263 +1,264 @@ ### Submit to the Great Khan ### -submit_to_the_great_khan_decision = { - ai_check_interval_by_tier = { - barony = 0 - county = 12 - duchy = 12 - kingdom = 12 - empire = 12 - hegemony = 12 - } - picture = { - reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" - } - desc = submit_to_the_great_khan_decision_opening_desc - selection_tooltip = submit_to_the_great_khan_decision_tooltip - - sort_order = 110 - decision_group_type = major - - is_shown = { - is_independent_ruler = yes - OR = { - exists = global_var:mongol_empire_has_spawned - AND = { - exists = global_var:greatest_of_khans_title - exists = global_var:greatest_of_khans_title.holder - } - } - OR = { - any_neighboring_top_liege_realm_owner = { - mpo_has_gok_mongol_empire_trigger = yes - } - AND = { - is_ai = no # this heavier check is for players, AI will only evaluate decision when immediately bordering the Mongols - any_neighboring_top_liege_realm_owner = { - any_neighboring_top_liege_realm_owner = { - mpo_has_gok_mongol_empire_trigger = yes - } - } - } - } - mpo_has_gok_mongol_empire_trigger = no - is_landless_adventurer = no - } - - is_valid_showing_failures_only = { - highest_held_title_tier < tier_empire - } - - effect = { - if = { - limit = { - exists = confederation - } - confederation = { - #Your confederation will survive, it has more members - if = { - limit = { - any_confederation_member = { - count >= 2 - NOT = { - this = root - } - } - } - remove_confederation_member = root - } - #Your confederation is toast - else = { - disband_confederation = yes - } - } - } - hidden_effect = { - if = { - limit = { - exists = title:e_mongol_empire.holder - } - title:e_mongol_empire.holder = { - save_scope_as = mongol_emperor - } - } - else = { - random_neighboring_top_liege_realm_owner = { - limit = { mpo_has_gok_mongol_empire_trigger = yes } - save_scope_as = mongol_emperor - } - if = { - limit = { - NOT = { - exists = scope:mongol_emperor - } - } - random_neighboring_top_liege_realm_owner = { - limit = { - mpo_has_gok_mongol_empire_trigger = yes - } - random_neighboring_top_liege_realm_owner = { - limit = { - mpo_has_gok_mongol_empire_trigger = yes - } - save_scope_as = mongol_emperor - } - } - } - } - } - every_character_war = { - limit = { - primary_defender = root - } - end_war = white_peace - } - hidden_effect = { - debug_log = "A ruler submitted to the khan" - debug_log_scopes = yes - } - save_scope_as = recipient - scope:mongol_emperor = { - send_interface_message = { - type = event_gok_submission_with_text - title = mpo_greatest_of_khans.0020_title - left_icon = root - - root = { - create_title_and_vassal_change = { - type = swear_fealty - save_scope_as = title_change - add_claim_on_loss = no - } - change_liege = { - liege = scope:mongol_emperor - change = scope:title_change - } - resolve_title_and_vassal_change = scope:title_change - if = { - limit = { - government_has_flag = government_is_nomadic - } - pay_herd = { - target = scope:mongol_emperor - value = domicile.major_herd_value - } - } - else_if = { - limit = { - NOT = { - government_has_flag = government_is_herder - } - } - pay_short_term_gold = { - target = scope:mongol_emperor - gold = major_gold_value - } - } - if = { - limit = { - #khan is still nomadic or pluralist and thus doesn't care about religion - scope:mongol_emperor = { - rite = { - rite_has_doctrine = doctrine_pluralism_pluralistic - } - } - OR = { - government_has_flag = government_is_feudal - government_has_flag = government_is_clan - } - } - hidden_effect = { - if = { - limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) - vassal_contract_set_obligation_level = { type = religious_rights level = 1 } - } - } - custom_tooltip = religious_protection_tt - } - } - } - } - } - - ai_potential = { - OR = { - exists = global_var:mongol_empire_has_spawned - AND = { - exists = global_var:greatest_of_khans_title - exists = global_var:greatest_of_khans_title.holder - } - } - is_independent_ruler = yes - highest_held_title_tier < tier_empire - trigger_if = { - limit = { - government_has_flag = government_is_nomadic - } - domicile = { - herd >= massive_herd_value - } - } - trigger_if = { - limit = { - NOT = { - government_has_flag = government_is_in_steppe - } - } - gold >= medium_gold_value - } - } - - ai_will_do = { # is_shown trigger means AI will only evaluate these when immediate neighbors with the Mongols - base = 0 - # Very likely if you're an independent count bordering the Empire - modifier = { - add = 25 - highest_held_title_tier = tier_county - } - # Fairly likely if you're an independent duke bordering the Empire - modifier = { - add = 10 - highest_held_title_tier = tier_duchy - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } - } - } - # A little bit likely if you're an independent king in the Altaic group bordering the Empire - modifier = { - add = 10 - highest_held_title_tier = tier_duchy - OR = { - culture = { has_cultural_pillar = heritage_mongolic } - culture = { has_cultural_pillar = heritage_turkic } - } - } - # More likely if you're Craven - modifier = { - factor = 1.25 - has_trait = craven - } - # Unlikely if you're Brave - modifier = { - factor = 0.2 - has_trait = brave - } - # Unlikely if you're Arrogant - modifier = { - factor = 0.1 - has_trait = arrogant - } - # Very likely if you're already allies - modifier = { - factor = 1.5 - any_ally = { - mpo_has_gok_mongol_empire_trigger = yes - } - } - # The AI should never do this as a king or above - modifier = { - factor = 0 - highest_held_title_tier >= tier_kingdom - } - } -} +#submit_to_the_great_khan_decision = { +# ai_check_interval_by_tier = { +# barony = 0 +# county = 12 +# duchy = 12 +# kingdom = 12 +# empire = 12 +# hegemony = 12 +# } +# picture = { +# reference = "gfx/interface/illustrations/decisions/mpo_decision_great_khan.dds" +# } +# desc = submit_to_the_great_khan_decision_opening_desc +# selection_tooltip = submit_to_the_great_khan_decision_tooltip +# +# sort_order = 110 +# decision_group_type = major +# +# is_shown = { +# is_independent_ruler = yes +# OR = { +# exists = global_var:mongol_empire_has_spawned +# AND = { +# exists = global_var:greatest_of_khans_title +# exists = global_var:greatest_of_khans_title.holder +# } +# } +# OR = { +# any_neighboring_top_liege_realm_owner = { +# mpo_has_gok_mongol_empire_trigger = yes +# } +# AND = { +# is_ai = no # this heavier check is for players, AI will only evaluate decision when immediately bordering the Mongols +# any_neighboring_top_liege_realm_owner = { +# any_neighboring_top_liege_realm_owner = { +# mpo_has_gok_mongol_empire_trigger = yes +# } +# } +# } +# } +# mpo_has_gok_mongol_empire_trigger = no +# is_landless_adventurer = no +# } +# +# is_valid_showing_failures_only = { +# highest_held_title_tier < tier_empire +# } +# +# effect = { +# if = { +# limit = { +# exists = confederation +# } +# confederation = { +# #Your confederation will survive, it has more members +# if = { +# limit = { +# any_confederation_member = { +# count >= 2 +# NOT = { +# this = root +# } +# } +# } +# remove_confederation_member = root +# } +# #Your confederation is toast +# else = { +# disband_confederation = yes +# } +# } +# } +# hidden_effect = { +# if = { +# limit = { +# exists = title:e_mongol_empire.holder +# } +# title:e_mongol_empire.holder = { +# save_scope_as = mongol_emperor +# } +# } +# else = { +# random_neighboring_top_liege_realm_owner = { +# limit = { mpo_has_gok_mongol_empire_trigger = yes } +# save_scope_as = mongol_emperor +# } +# if = { +# limit = { +# NOT = { +# exists = scope:mongol_emperor +# } +# } +# random_neighboring_top_liege_realm_owner = { +# limit = { +# mpo_has_gok_mongol_empire_trigger = yes +# } +# random_neighboring_top_liege_realm_owner = { +# limit = { +# mpo_has_gok_mongol_empire_trigger = yes +# } +# save_scope_as = mongol_emperor +# } +# } +# } +# } +# } +# every_character_war = { +# limit = { +# primary_defender = root +# } +# end_war = white_peace +# } +# hidden_effect = { +# debug_log = "A ruler submitted to the khan" +# debug_log_scopes = yes +# } +# save_scope_as = recipient +# scope:mongol_emperor = { +# send_interface_message = { +# type = event_gok_submission_with_text +# title = mpo_greatest_of_khans.0020_title +# left_icon = root +# +# root = { +# create_title_and_vassal_change = { +# type = swear_fealty +# save_scope_as = title_change +# add_claim_on_loss = no +# } +# change_liege = { +# liege = scope:mongol_emperor +# change = scope:title_change +# } +# resolve_title_and_vassal_change = scope:title_change +# if = { +# limit = { +# government_has_flag = government_is_nomadic +# } +# pay_herd = { +# target = scope:mongol_emperor +# value = domicile.major_herd_value +# } +# } +# else_if = { +# limit = { +# NOT = { +# government_has_flag = government_is_herder +# } +# } +# pay_short_term_gold = { +# target = scope:mongol_emperor +# gold = major_gold_value +# } +# } +# if = { +# limit = { +# #khan is still nomadic or pluralist and thus doesn't care about religion +# scope:mongol_emperor = { +# rite = { +# rite_has_doctrine = doctrine_pluralism_pluralistic +# } +# } +# OR = { +# government_has_flag = government_is_feudal +# government_has_flag = government_is_clan +# } +# } +# hidden_effect = { +# if = { +# limit = { is_independent_ruler = no } # To avoid errors during tooltip generation (prior to the contract being generated) +# vassal_contract_set_obligation_level = { type = religious_rights level = 1 } +# } +# } +# custom_tooltip = religious_protection_tt +# } +# } +# } +# } +# } +# +# ai_potential = { +# OR = { +# exists = global_var:mongol_empire_has_spawned +# AND = { +# exists = global_var:greatest_of_khans_title +# exists = global_var:greatest_of_khans_title.holder +# } +# } +# is_independent_ruler = yes +# highest_held_title_tier < tier_empire +# trigger_if = { +# limit = { +# government_has_flag = government_is_nomadic +# } +# domicile = { +# herd >= massive_herd_value +# } +# } +# trigger_if = { +# limit = { +# NOT = { +# government_has_flag = government_is_in_steppe +# } +# } +# gold >= medium_gold_value +# } +# } +# +# ai_will_do = { # is_shown trigger means AI will only evaluate these when immediate neighbors with the Mongols +# base = 0 +# # Very likely if you're an independent count bordering the Empire +# modifier = { +# add = 25 +# highest_held_title_tier = tier_county +# } +# # Fairly likely if you're an independent duke bordering the Empire +# modifier = { +# add = 10 +# highest_held_title_tier = tier_duchy +# OR = { +# culture = { has_cultural_pillar = heritage_mongolic } +# culture = { has_cultural_pillar = heritage_turkic } +# } +# } +# # A little bit likely if you're an independent king in the Altaic group bordering the Empire +# modifier = { +# add = 10 +# highest_held_title_tier = tier_duchy +# OR = { +# culture = { has_cultural_pillar = heritage_mongolic } +# culture = { has_cultural_pillar = heritage_turkic } +# } +# } +# # More likely if you're Craven +# modifier = { +# factor = 1.25 +# has_trait = craven +# } +# # Unlikely if you're Brave +# modifier = { +# factor = 0.2 +# has_trait = brave +# } +# # Unlikely if you're Arrogant +# modifier = { +# factor = 0.1 +# has_trait = arrogant +# } +# # Very likely if you're already allies +# modifier = { +# factor = 1.5 +# any_ally = { +# mpo_has_gok_mongol_empire_trigger = yes +# } +# } +# # The AI should never do this as a king or above +# modifier = { +# factor = 0 +# highest_held_title_tier >= tier_kingdom +# } +# } +#} +# \ No newline at end of file diff --git a/common/decisions/80_major_decisions.txt b/common/decisions/80_major_decisions.txt index e62aec6c2..6c19d7c5e 100644 --- a/common/decisions/80_major_decisions.txt +++ b/common/decisions/80_major_decisions.txt @@ -1694,403 +1694,403 @@ accept_cannibalism_decision = { ################################################## ### Found University ### -found_university_decision = { - picture = { - reference = "gfx/interface/illustrations/decisions/decision_misc.dds" - } - decision_group_type = major - ai_check_interval = 0 - - desc = found_university_decision_desc - selection_tooltip = found_university_decision_tooltip - - is_shown = { - always = no # Universities are now built like normal special buildings so they can be seen in the Economy Mapmode, keeping this decision around in case we want to retool it into something else - highest_held_title_tier >= tier_duchy - any_sub_realm_barony = { - OR = { #A place where universities historically existed early - this = title:b_fes - this = title:b_cairo - this = title:b_bologna - this = title:b_salamanca - this = title:b_madrid - this = title:b_oxford - this = title:b_cambridge - this = title:b_padua - this = title:b_siena - this = title:b_coimbra - this = title:b_napoli - this = title:b_tirakka - this = title:b_milano - this = title:b_lund - this = title:b_vienna - this = title:b_speyer - this = title:b_krakow - this = title:b_pisa - this = title:b_turin - this = title:b_ferrara - this = title:b_leipzig - this = title:b_messina - this = title:b_barcelona - this = title:b_dumbarton - } - title_province = { - has_university_building_trigger = no - } - } - } - - is_valid = { - prestige_level >= 4 - - OR = { - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_fes } - title:b_fes.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_fes.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_fes.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_cairo } - title:b_cairo.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_cairo.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_cairo.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_bologna } - title:b_bologna.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_bologna.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_bologna.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_salamanca } - title:b_salamanca.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_salamanca.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_salamanca.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_madrid } - title:b_madrid.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_madrid.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_madrid.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_oxford } - title:b_oxford.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_oxford.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_oxford.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_cambridge } - title:b_cambridge.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_cambridge.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_cambridge.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_padua } - title:b_padua.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_padua.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_padua.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_siena } - title:b_siena.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_siena.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_siena.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_coimbra } - title:b_coimbra.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_coimbra.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_coimbra.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_napoli } - title:b_napoli.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_napoli.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_napoli.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_tirakka } - title:b_tirakka.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_tirakka.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_tirakka.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_milano } - title:b_milano.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_milano.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_milano.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_lund } - title:b_lund.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_lund.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_lund.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_vienna } - title:b_vienna.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_vienna.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_vienna.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_speyer } - title:b_speyer.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_speyer.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_speyer.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_krakow } - title:b_krakow.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_krakow.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_krakow.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_pisa } - title:b_pisa.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_pisa.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_pisa.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_turin } - title:b_turin.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_turin.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_turin.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_ferrara } - title:b_ferrara.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_ferrara.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_ferrara.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_leipzig } - title:b_leipzig.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_leipzig.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_leipzig.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_messina } - title:b_messina.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_messina.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_messina.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_barcelona } - title:b_barcelona.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_barcelona.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_barcelona.title_province = { has_special_building_slot = no } - } - } - } - trigger_if = { - limit = { - any_sub_realm_barony = { this = title:b_dumbarton } - title:b_dumbarton.title_province = { NOT = { exists = var:university } } - } - AND = { - title:b_dumbarton.county = { development_level >= 30 } - custom_description = { - text = no_special_building_slot - title:b_dumbarton.title_province = { has_special_building_slot = no } - } - } - } - } - } - - is_valid_showing_failures_only = { - is_ruler = yes - is_available_adult = yes - } - - effect = { - save_scope_as = founder - - show_as_tooltip = { found_university_decision_effect = yes } - - trigger_event = major_decisions.2001 - every_player = { - limit = { - this != root - is_within_diplo_range = { CHARACTER = root } - } - trigger_event = major_decisions.2002 - } - } - - cost = { - prestige = medium_prestige_value - } - - ai_potential = { - always = no - } - - ai_will_do = { - base = 0 - } -} +#found_university_decision = { +# picture = { +# reference = "gfx/interface/illustrations/decisions/decision_misc.dds" +# } +# decision_group_type = major +# ai_check_interval = 0 +# +# desc = found_university_decision_desc +# selection_tooltip = found_university_decision_tooltip +# +# is_shown = { +# always = no # Universities are now built like normal special buildings so they can be seen in the Economy Mapmode, keeping this decision around in case we want to retool it into something else +# highest_held_title_tier >= tier_duchy +# any_sub_realm_barony = { +# OR = { #A place where universities historically existed early +# this = title:b_fes +# this = title:b_cairo +# this = title:b_bologna +# this = title:b_salamanca +# this = title:b_madrid +# this = title:b_oxford +# this = title:b_cambridge +# this = title:b_padua +# this = title:b_siena +# this = title:b_coimbra +# this = title:b_napoli +# this = title:b_tirakka +# this = title:b_milano +# this = title:b_lund +# this = title:b_vienna +# this = title:b_speyer +# this = title:b_krakow +# this = title:b_pisa +# this = title:b_turin +# this = title:b_ferrara +# this = title:b_leipzig +# this = title:b_messina +# this = title:b_barcelona +# this = title:b_dumbarton +# } +# title_province = { +# has_university_building_trigger = no +# } +# } +# } +# +# is_valid = { +# prestige_level >= 4 +# +# OR = { +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_fes } +# title:b_fes.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_fes.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_fes.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_cairo } +# title:b_cairo.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_cairo.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_cairo.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_bologna } +# title:b_bologna.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_bologna.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_bologna.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_salamanca } +# title:b_salamanca.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_salamanca.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_salamanca.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_madrid } +# title:b_madrid.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_madrid.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_madrid.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_oxford } +# title:b_oxford.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_oxford.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_oxford.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_cambridge } +# title:b_cambridge.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_cambridge.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_cambridge.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_padua } +# title:b_padua.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_padua.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_padua.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_siena } +# title:b_siena.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_siena.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_siena.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_coimbra } +# title:b_coimbra.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_coimbra.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_coimbra.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_napoli } +# title:b_napoli.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_napoli.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_napoli.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_tirakka } +# title:b_tirakka.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_tirakka.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_tirakka.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_milano } +# title:b_milano.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_milano.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_milano.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_lund } +# title:b_lund.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_lund.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_lund.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_vienna } +# title:b_vienna.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_vienna.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_vienna.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_speyer } +# title:b_speyer.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_speyer.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_speyer.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_krakow } +# title:b_krakow.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_krakow.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_krakow.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_pisa } +# title:b_pisa.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_pisa.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_pisa.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_turin } +# title:b_turin.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_turin.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_turin.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_ferrara } +# title:b_ferrara.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_ferrara.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_ferrara.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_leipzig } +# title:b_leipzig.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_leipzig.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_leipzig.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_messina } +# title:b_messina.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_messina.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_messina.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_barcelona } +# title:b_barcelona.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_barcelona.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_barcelona.title_province = { has_special_building_slot = no } +# } +# } +# } +# trigger_if = { +# limit = { +# any_sub_realm_barony = { this = title:b_dumbarton } +# title:b_dumbarton.title_province = { NOT = { exists = var:university } } +# } +# AND = { +# title:b_dumbarton.county = { development_level >= 30 } +# custom_description = { +# text = no_special_building_slot +# title:b_dumbarton.title_province = { has_special_building_slot = no } +# } +# } +# } +# } +# } +# +# is_valid_showing_failures_only = { +# is_ruler = yes +# is_available_adult = yes +# } +# +# effect = { +# save_scope_as = founder +# +# show_as_tooltip = { found_university_decision_effect = yes } +# +# trigger_event = major_decisions.2001 +# every_player = { +# limit = { +# this != root +# is_within_diplo_range = { CHARACTER = root } +# } +# trigger_event = major_decisions.2002 +# } +# } +# +# cost = { +# prestige = medium_prestige_value +# } +# +# ai_potential = { +# always = no +# } +# +# ai_will_do = { +# base = 0 +# } +#} ################################################## # Build a Glass Monument @@ -3186,7 +3186,7 @@ set_de_jure_capital_decision = { } scope:old_capital ?= { duchy = { save_scope_as = current_duchy } - title:d_zun_warriors = { + title:d_laamp_zolt = { save_scope_as = placeholder_duchy } scope:current_duchy = { 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 a48d4c41f..ef006377d 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 @@ -1202,23 +1202,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 + # } + #} } } diff --git a/common/decisions/dlc_decisions/fp_3/fp3_islamic_decisions.txt b/common/decisions/dlc_decisions/fp_3/fp3_islamic_decisions.txt index 886785cac..3ebf5e04f 100644 --- a/common/decisions/dlc_decisions/fp_3/fp3_islamic_decisions.txt +++ b/common/decisions/dlc_decisions/fp_3/fp3_islamic_decisions.txt @@ -1,357 +1,357 @@ ### Avenge the Battle of Nahrawan ### -avenge_the_battle_of_nahrawan_decision = { - picture = { - reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_supremacy.dds" - } - decision_group_type = major - ai_check_interval_by_tier = { - barony = 0 - county = 0 - duchy = 0 - kingdom = 120 - empire = 120 - hegemony = 120 - } - sort_order = 30 - - title = { - first_valid = { - triggered_desc = { - trigger = { - faith = { - OR = { - has_doctrine = tenet_fp3_fedayeen - has_doctrine = tenet_warmonger - has_doctrine_parameter = pluralism_fundamentalist_proselytization_bonus - } - } - } - desc = destroy_the_apostates_decision_name - } - desc = avenge_the_battle_of_nahrawan_decision_name - } - } - - desc = avenge_the_battle_of_nahrawan_decision_desc - - selection_tooltip = avenge_the_battle_of_nahrawan_decision_tooltip - - is_shown = { - has_fp3_dlc_trigger = yes - faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } - capital_province ?= { - OR = { - geographical_region = world_persian_empire - geographical_region = world_middle_east - } - } - NOT = { - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:avenge_the_battle_of_nahrawan_decision - } - } - } - - is_valid = { - completely_controls_region = world_mesopotamia - custom_description = { - text = "restore_high_priesthood_holy_sites" - faith = { - any_holy_site = { - OR = { - county.holder = root - county.holder.top_liege = { this = root } - } - count >= 3 - } - } - } - custom_description = { - text = avenge_the_battle_of_nahrawan_sunni_caliphate_irrelevant - NOT = { exists = title:d_sunni.holder } - } - custom_description = { - text = avenge_the_battle_of_nahrawan_shia_caliphate_irrelevant - NOT = { exists = title:d_shiite.holder } - } - } - - is_valid_showing_failures_only = { - is_alive = yes - not = { exists = involved_activity } - is_imprisoned = no - } - - - effect = { - save_scope_as = avenger - - #Sunni penalty scope save - title:e_arabia = { - random_de_jure_county_holder = { #If there's a big Sunni presence in Arabia - limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_empire - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_kingdom - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_duchy - } - faith = { - save_scope_as = sunni_faith - } - } - } - - title:e_persia = { - random_de_jure_county_holder = { #If there's a big Sunni presence in Persia - limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_empire - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_kingdom - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_sunni_doctrine } - highest_held_title_tier = tier_duchy - } - faith = { - save_scope_as = sunni_faith - } - } - } - - #Shia penalty scope save - title:e_arabia = { - random_de_jure_county_holder = { #If there's a big Shia presence in Arabia - limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_empire - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_kingdom - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_duchy - } - faith = { - save_scope_as = shia_faith - } - } - } - - #Shia penalty scope save - title:e_persia = { - random_de_jure_county_holder = { #If there's a big Shia presence in Persia - limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_empire - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_kingdom - } - alternative_limit = { - faith = { has_doctrine = muhammad_succession_shia_doctrine } - highest_held_title_tier = tier_duchy - } - faith = { - save_scope_as = shia_faith - } - } - } - - show_as_tooltip = { avenge_the_battle_of_nahrawan_scripted_effect = yes } #Actually applied in fp3_decision.0011 - Prestige, religion bonuses - - #Events - trigger_event = fp3_decision.0011 - every_player = { - limit = { - this != scope:avenger - is_within_diplo_range = { CHARACTER = scope:avenger } - } - trigger_event = fp3_decision.0012 - } - - #Can only be done once - add_to_global_variable_list = { - name = unavailable_unique_decisions - target = flag:avenge_the_battle_of_nahrawan_decision - } - } - - ai_will_do = { - base = 100 - } -} +#avenge_the_battle_of_nahrawan_decision = { +# picture = { +# reference = "gfx/interface/illustrations/decisions/fp3/fp3_decision_supremacy.dds" +# } +# decision_group_type = major +# ai_check_interval_by_tier = { +# barony = 0 +# county = 0 +# duchy = 0 +# kingdom = 120 +# empire = 120 +# hegemony = 120 +# } +# sort_order = 30 +# +# title = { +# first_valid = { +# triggered_desc = { +# trigger = { +# faith = { +# OR = { +# has_doctrine = tenet_fp3_fedayeen +# has_doctrine = tenet_warmonger +# has_doctrine_parameter = pluralism_fundamentalist_proselytization_bonus +# } +# } +# } +# desc = destroy_the_apostates_decision_name +# } +# desc = avenge_the_battle_of_nahrawan_decision_name +# } +# } +# +# desc = avenge_the_battle_of_nahrawan_decision_desc +# +# selection_tooltip = avenge_the_battle_of_nahrawan_decision_tooltip +# +# is_shown = { +# has_fp3_dlc_trigger = yes +# faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } +# capital_province ?= { +# OR = { +# geographical_region = world_persian_empire +# geographical_region = world_middle_east +# } +# } +# NOT = { +# is_target_in_global_variable_list = { +# name = unavailable_unique_decisions +# target = flag:avenge_the_battle_of_nahrawan_decision +# } +# } +# } +# +# is_valid = { +# completely_controls_region = world_mesopotamia +# custom_description = { +# text = "restore_high_priesthood_holy_sites" +# faith = { +# any_holy_site = { +# OR = { +# county.holder = root +# county.holder.top_liege = { this = root } +# } +# count >= 3 +# } +# } +# } +# custom_description = { +# text = avenge_the_battle_of_nahrawan_sunni_caliphate_irrelevant +# NOT = { exists = title:d_sunni.holder } +# } +# custom_description = { +# text = avenge_the_battle_of_nahrawan_shia_caliphate_irrelevant +# NOT = { exists = title:d_shiite.holder } +# } +# } +# +# is_valid_showing_failures_only = { +# is_alive = yes +# not = { exists = involved_activity } +# is_imprisoned = no +# } +# +# +# effect = { +# save_scope_as = avenger +# +# #Sunni penalty scope save +# title:e_arabia = { +# random_de_jure_county_holder = { #If there's a big Sunni presence in Arabia +# limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_empire +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_kingdom +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_duchy +# } +# faith = { +# save_scope_as = sunni_faith +# } +# } +# } +# +# title:e_persia = { +# random_de_jure_county_holder = { #If there's a big Sunni presence in Persia +# limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_empire +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_kingdom +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_sunni_doctrine } +# highest_held_title_tier = tier_duchy +# } +# faith = { +# save_scope_as = sunni_faith +# } +# } +# } +# +# #Shia penalty scope save +# title:e_arabia = { +# random_de_jure_county_holder = { #If there's a big Shia presence in Arabia +# limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_empire +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_kingdom +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_duchy +# } +# faith = { +# save_scope_as = shia_faith +# } +# } +# } +# +# #Shia penalty scope save +# title:e_persia = { +# random_de_jure_county_holder = { #If there's a big Shia presence in Persia +# limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_empire +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_kingdom +# } +# alternative_limit = { +# faith = { has_doctrine = muhammad_succession_shia_doctrine } +# highest_held_title_tier = tier_duchy +# } +# faith = { +# save_scope_as = shia_faith +# } +# } +# } +# +# show_as_tooltip = { avenge_the_battle_of_nahrawan_scripted_effect = yes } #Actually applied in fp3_decision.0011 - Prestige, religion bonuses +# +# #Events +# trigger_event = fp3_decision.0011 +# every_player = { +# limit = { +# this != scope:avenger +# is_within_diplo_range = { CHARACTER = scope:avenger } +# } +# trigger_event = fp3_decision.0012 +# } +# +# #Can only be done once +# add_to_global_variable_list = { +# name = unavailable_unique_decisions +# target = flag:avenge_the_battle_of_nahrawan_decision +# } +# } +# +# ai_will_do = { +# base = 100 +# } +#} ### Promote Persian Scriptures ### -fp3_promote_persian_scripture_decision = { - title = fp3_promote_persian_scripture_decision_name - picture = { - reference = "gfx/interface/illustrations/decisions/fp3/friendly.dds" - } - desc = fp3_promote_persian_scripture_decision_desc - decision_group_type = major - selection_tooltip = fp3_promote_persian_scripture_decision_tooltip - sort_order = -10 - ai_check_interval_by_tier = { - barony = 0 - county = 0 - duchy = 0 - kingdom = 120 - empire = 120 - hegemony = 120 - } - - is_shown = { - has_religion = religion:islam_religion - has_fp3_dlc_trigger = yes - is_landed = yes # Don't bother laamps with this - NOT = { - culture = { has_cultural_pillar = heritage_arabic } - } - capital_province ?= { geographical_region = world_persian_empire } - - NOT = { - is_target_in_global_variable_list = { - name = unavailable_unique_decisions - target = flag:promote_persian_scripture_decision - } - } - } - - is_valid = { - top_liege = this - highest_held_title_tier >= tier_kingdom - piety_level >= high_piety_level - OR = { - knows_language_of_culture = culture:persian - knows_language_of_culture = culture:khwarezmian - } - culture = { - cultural_acceptance = { target = culture:persian value >= 70 } - } - trigger_if = { - limit = { - AND = { - exists = faith.religious_head - root.faith.religious_head.culture = { has_cultural_pillar = heritage_arabic } - } - } - NOT = { - root.faith.religious_head = { has_strong_hook = root } - } - } - } - - is_valid_showing_failures_only = { - is_available_adult = yes - not = { exists = involved_activity } - has_contagious_deadly_disease_trigger = no - custom_description = { - text = "pledged_to_not_promote_persian_desc" - NOT = { has_variable = pledged_to_not_promote_persian } - } - } - - cost = { - gold = { - value = 0 - if = { - limit = { - has_treasury = no - } - add = 500 - } - } - treasury = { - value = 0 - if = { - limit = { - has_treasury = yes - } - add = 500 - } - } - piety = promote_persian_scripture_piety_cost - } - - effect = { - - save_scope_as = persian_fanboy - - #Can only be done once - add_to_global_variable_list = { - name = unavailable_unique_decisions - target = flag:promote_persian_scripture_decision - } - - # Save the piety value for refund purposes. - set_variable = { - name = promote_persian_scripture_piety_refund - value = promote_persian_scripture_piety_cost - } - - show_as_tooltip = { promote_persian_scripture_scripted_effect = yes } #Actually applied in fp3_decision.0013. - - if = { - limit = { - exists = root.faith.religious_head - root.faith.religious_head = { - is_ai = yes - NOR = { - has_trait = craven - has_trait = shy - has_relation_lover = root - has_relation_soulmate = root - is_vassal_of = root - } - } - } - trigger_event = fp3_decision.0013 - } - else = { trigger_event = fp3_decision.0014 } - } - - ai_will_do = { #not likely, unless the AI is pluralist or very ambitious - base = 0 - - modifier = { - add = 25 - has_trait = ambitious - } - modifier = { - add = 25 - has_trait = diligent - } - modifier = { - add = 25 - root.faith = { has_doctrine = doctrine_pluralism_pluralistic } - } - modifier = { - add = 30 - exists = root.faith.religious_head - this != root.faith.religious_head - root.faith.religious_head = { num_sinful_traits >= 1 } - } - modifier = { #AI doesn't do it if their Head of Faith is a player, since that'd require additional events - add = -100 - exists = root.faith.religious_head - root.faith.religious_head = { is_ai = no } - } - } -} +#fp3_promote_persian_scripture_decision = { +# title = fp3_promote_persian_scripture_decision_name +# picture = { +# reference = "gfx/interface/illustrations/decisions/fp3/friendly.dds" +# } +# desc = fp3_promote_persian_scripture_decision_desc +# decision_group_type = major +# selection_tooltip = fp3_promote_persian_scripture_decision_tooltip +# sort_order = -10 +# ai_check_interval_by_tier = { +# barony = 0 +# county = 0 +# duchy = 0 +# kingdom = 120 +# empire = 120 +# hegemony = 120 +# } +# +# is_shown = { +# has_religion = religion:islam_religion +# has_fp3_dlc_trigger = yes +# is_landed = yes # Don't bother laamps with this +# NOT = { +# culture = { has_cultural_pillar = heritage_arabic } +# } +# capital_province ?= { geographical_region = world_persian_empire } +# +# NOT = { +# is_target_in_global_variable_list = { +# name = unavailable_unique_decisions +# target = flag:promote_persian_scripture_decision +# } +# } +# } +# +# is_valid = { +# top_liege = this +# highest_held_title_tier >= tier_kingdom +# piety_level >= high_piety_level +# OR = { +# knows_language_of_culture = culture:persian +# knows_language_of_culture = culture:khwarezmian +# } +# culture = { +# cultural_acceptance = { target = culture:persian value >= 70 } +# } +# trigger_if = { +# limit = { +# AND = { +# exists = faith.religious_head +# root.faith.religious_head.culture = { has_cultural_pillar = heritage_arabic } +# } +# } +# NOT = { +# root.faith.religious_head = { has_strong_hook = root } +# } +# } +# } +# +# is_valid_showing_failures_only = { +# is_available_adult = yes +# not = { exists = involved_activity } +# has_contagious_deadly_disease_trigger = no +# custom_description = { +# text = "pledged_to_not_promote_persian_desc" +# NOT = { has_variable = pledged_to_not_promote_persian } +# } +# } +# +# cost = { +# gold = { +# value = 0 +# if = { +# limit = { +# has_treasury = no +# } +# add = 500 +# } +# } +# treasury = { +# value = 0 +# if = { +# limit = { +# has_treasury = yes +# } +# add = 500 +# } +# } +# piety = promote_persian_scripture_piety_cost +# } +# +# effect = { +# +# save_scope_as = persian_fanboy +# +# #Can only be done once +# add_to_global_variable_list = { +# name = unavailable_unique_decisions +# target = flag:promote_persian_scripture_decision +# } +# +# # Save the piety value for refund purposes. +# set_variable = { +# name = promote_persian_scripture_piety_refund +# value = promote_persian_scripture_piety_cost +# } +# +# show_as_tooltip = { promote_persian_scripture_scripted_effect = yes } #Actually applied in fp3_decision.0013. +# +# if = { +# limit = { +# exists = root.faith.religious_head +# root.faith.religious_head = { +# is_ai = yes +# NOR = { +# has_trait = craven +# has_trait = shy +# has_relation_lover = root +# has_relation_soulmate = root +# is_vassal_of = root +# } +# } +# } +# trigger_event = fp3_decision.0013 +# } +# else = { trigger_event = fp3_decision.0014 } +# } +# +# ai_will_do = { #not likely, unless the AI is pluralist or very ambitious +# base = 0 +# +# modifier = { +# add = 25 +# has_trait = ambitious +# } +# modifier = { +# add = 25 +# has_trait = diligent +# } +# modifier = { +# add = 25 +# root.faith = { has_doctrine = doctrine_pluralism_pluralistic } +# } +# modifier = { +# add = 30 +# exists = root.faith.religious_head +# this != root.faith.religious_head +# root.faith.religious_head = { num_sinful_traits >= 1 } +# } +# modifier = { #AI doesn't do it if their Head of Faith is a player, since that'd require additional events +# add = -100 +# exists = root.faith.religious_head +# root.faith.religious_head = { is_ai = no } +# } +# } +#} # #### Declare Stance in the Iranian Intermezzo ### #fp3_name_read_in_friday_prayer_decision = { diff --git a/common/scripted_guis/tgp_scripted_guis.txt b/common/scripted_guis/tgp_scripted_guis.txt new file mode 100644 index 000000000..ad7dd4cd2 --- /dev/null +++ b/common/scripted_guis/tgp_scripted_guis.txt @@ -0,0 +1,5 @@ +coronation_trigger_gui = { + is_valid = { + coronation_trigger = yes + } +} \ No newline at end of file diff --git a/common/scripted_triggers/pam_scripted_triggers.txt b/common/scripted_triggers/pam_scripted_triggers.txt index cc1f0e9d8..af9aeda3a 100644 --- a/common/scripted_triggers/pam_scripted_triggers.txt +++ b/common/scripted_triggers/pam_scripted_triggers.txt @@ -2,7 +2,7 @@ has_personal_tenet_flag = consolamentum_grief_immunity } - Character scope. Keep this cheap for relation/war-enemy iterators; full target validation is below. +# Character scope. Keep this cheap for relation/war-enemy iterators; full target validation is below. pam_adorcism_curse_target_is_living_adult_trigger = { is_available_quick = { adult = yes @@ -37,10 +37,10 @@ pam_adorcism_has_available_curse_target_trigger = { } } - The liturgical language triggers below only evaluate in a rite scope; call them through - main_rite from a faith and through rite from a character. - Pre-scripted rites skip the Head of Rite culture fallback. Slavic, Georgian, Antiochian, - heresies, and custom divergences keep that fallback. +# The liturgical language triggers below only evaluate in a rite scope; call them through +# main_rite from a faith and through rite from a character. +# Pre-scripted rites skip the Head of Rite culture fallback. Slavic, Georgian, Antiochian, +# heresies, and custom divergences keep that fallback. rite_has_pre_scripted_liturgical_language_trigger = { OR = { religion = religion:catholic_religion @@ -53,7 +53,7 @@ rite_has_pre_scripted_liturgical_language_trigger = { } } - These are founding-see rites in rite scope, not map-wide or ordinary swap traditions +# These are founding-see rites in rite scope, not map-wide or ordinary swap traditions pam_rite_is_regional_trigger = { OR = { this = rite:celtic_rite @@ -142,13 +142,13 @@ can_hold_ecumenical_council_trigger = { } } -has_current_phase_any_debate_trigger = { - OR = { - has_current_phase = ecumenical_council_phase_first_debate - has_current_phase = ecumenical_council_phase_second_debate - has_current_phase = ecumenical_council_phase_third_debate - } -} +#has_current_phase_any_debate_trigger = { +# OR = { +# has_current_phase = ecumenical_council_phase_first_debate +# has_current_phase = ecumenical_council_phase_second_debate +# has_current_phase = ecumenical_council_phase_third_debate +# } +#} pam_is_clerical_region_holder_trigger = { any_held_title = { @@ -179,50 +179,50 @@ pam_ecumenical_council_has_quorum_trigger = { } } -the_christian_church_radical_change_allowed_trigger = { - situation:the_christian_church ?= { - OR = { - has_situation_top_phase_parameter = era_type_instability - has_situation_top_phase_parameter = era_type_crisis - } - } -} +#the_christian_church_radical_change_allowed_trigger = { +# situation:the_christian_church ?= { +# OR = { +# has_situation_top_phase_parameter = era_type_instability +# has_situation_top_phase_parameter = era_type_crisis +# } +# } +#} -pam_mass_rite_conversion_conversion_phase_trigger = { - situation:the_christian_church ?= { - has_situation_top_phase_parameter = the_christian_church_mass_rite_conversion_decision - } -} +#pam_mass_rite_conversion_conversion_phase_trigger = { +# situation:the_christian_church ?= { +# has_situation_top_phase_parameter = the_christian_church_mass_rite_conversion_decision +# } +#} -pam_mass_rite_conversion_requirements_trigger = { - has_pam_dlc_trigger = yes - highest_held_title_tier >= tier_duchy -} +#pam_mass_rite_conversion_requirements_trigger = { +# has_pam_dlc_trigger = yes +# highest_held_title_tier >= tier_duchy +#} - Great Schism: progress can still change. Any scope -pam_great_schism_progress_can_change_trigger = { - NOT = { has_global_variable = pam_great_schism_decision_taken } - exists = situation:the_christian_church -} +# Great Schism: progress can still change. Any scope +#pam_great_schism_progress_can_change_trigger = { +# NOT = { has_global_variable = pam_great_schism_decision_taken } +# exists = situation:the_christian_church +#} -pam_can_pick_great_schism_stance_trigger = { - situation:the_christian_church ?= { - var:pam_great_schism_status ?= flag:ongoing - pam_great_schism_progress_can_change_trigger = yes - exists = var:schism_mainline_rite - exists = var:schism_competitor_rite - } - is_ruler = yes - faith = faith:christian_faith -} +#pam_can_pick_great_schism_stance_trigger = { +# situation:the_christian_church ?= { +# var:pam_great_schism_status ?= flag:ongoing +# pam_great_schism_progress_can_change_trigger = yes +# exists = var:schism_mainline_rite +# exists = var:schism_competitor_rite +# } +# is_ruler = yes +# faith = faith:christian_faith +#} - pam_save_schism_head_of_faith_effect saves the see first, then we run in character scope - Uses situation main-power faith so this works before 0062 saves christianity -pam_schism_can_seat_head_of_faith_trigger = { - this = scope:schism_peacemaker - exists = scope:new_head_of_faith - situation:the_christian_church.var:tcc_main_power_faith ?= { NOT = { has_doctrine = doctrine_temporal_head } } -} +# pam_save_schism_head_of_faith_effect saves the see first, then we run in character scope +# Uses situation main-power faith so this works before 0062 saves christianity +#pam_schism_can_seat_head_of_faith_trigger = { +# this = scope:schism_peacemaker +# exists = scope:new_head_of_faith +# situation:the_christian_church.var:tcc_main_power_faith ?= { NOT = { has_doctrine = doctrine_temporal_head } } +#} pam_is_ecumenical_patriarch_trigger = { faith = faith:orthodox_faith @@ -234,124 +234,124 @@ pam_is_ecumenical_patriarch_trigger = { } } - Great Schism: schism stance champions $RITE$ ($OTHER_RITE$ is the opposing side). Character scope -pam_schism_stance_supports_rite_trigger = { - OR = { - AND = { - var:pam_schism_stance ?= flag:mainline - faith:christian_faith.main_rite ?= rite:$RITE$ - } - AND = { - var:pam_schism_stance ?= flag:competitor - faith:christian_faith.main_rite ?= rite:$OTHER_RITE$ - } - } -} +# Great Schism: schism stance champions $RITE$ ($OTHER_RITE$ is the opposing side). Character scope +#pam_schism_stance_supports_rite_trigger = { +# OR = { +# AND = { +# var:pam_schism_stance ?= flag:mainline +# faith:christian_faith.main_rite ?= rite:$RITE$ +# } +# AND = { +# var:pam_schism_stance ?= flag:competitor +# faith:christian_faith.main_rite ?= rite:$OTHER_RITE$ +# } +# } +#} -pam_schism_is_chalcedonian_trigger = { - OR = { - faith = scope:schism_western_faith - faith = scope:schism_eastern_faith - faith = faith:christian_faith - } -} +#pam_schism_is_chalcedonian_trigger = { +# OR = { +# faith = scope:schism_western_faith +# faith = scope:schism_eastern_faith +# faith = faith:christian_faith +# } +#} - Great Schism: has a personal tenet dear to $RITE$. Character scope -pam_has_personal_tenet_of_rite_trigger = { - any_personal_tenet = { - rite:$RITE$ ?= { rite_has_tenet = prev } - } -} +# Great Schism: has a personal tenet dear to $RITE$. Character scope +#pam_has_personal_tenet_of_rite_trigger = { +# any_personal_tenet = { +# rite:$RITE$ ?= { rite_has_tenet = prev } +# } +#} - The delegate's rite is $RITE$, not the judging host's, on a character -pam_ecumenical_council_rite_delegate_trigger = { - this != root - rite = rite:$RITE$ -} +# The delegate's rite is $RITE$, not the judging host's, on a character +#pam_ecumenical_council_rite_delegate_trigger = { +# this != root +# rite = rite:$RITE$ +#} - Heading a rite does not make the holder follow it -pam_is_head_of_schism_pair_rite_trigger = { - OR = { - AND = { - rite = rite:roman_rite - rite:roman_rite.head_of_rite ?= this - } - AND = { - rite = rite:byzantine_rite - rite:byzantine_rite.head_of_rite ?= this - } - } -} +# Heading a rite does not make the holder follow it +#pam_is_head_of_schism_pair_rite_trigger = { +# OR = { +# AND = { +# rite = rite:roman_rite +# rite:roman_rite.head_of_rite ?= this +# } +# AND = { +# rite = rite:byzantine_rite +# rite:byzantine_rite.head_of_rite ?= this +# } +# } +#} - Great Schism: $FIRST$ and $SECOND$ follow opposite schism-pair rites. False if unset. Any scope -pam_schism_characters_in_opposite_pair_rites_trigger = { - situation:the_christian_church ?= { - exists = var:schism_mainline_rite - exists = var:schism_competitor_rite - OR = { - AND = { - $FIRST$.rite ?= var:schism_mainline_rite - $SECOND$.rite ?= var:schism_competitor_rite - } - AND = { - $FIRST$.rite ?= var:schism_competitor_rite - $SECOND$.rite ?= var:schism_mainline_rite - } - } - } -} +# Great Schism: $FIRST$ and $SECOND$ follow opposite schism-pair rites. False if unset. Any scope +#pam_schism_characters_in_opposite_pair_rites_trigger = { +# situation:the_christian_church ?= { +# exists = var:schism_mainline_rite +# exists = var:schism_competitor_rite +# OR = { +# AND = { +# $FIRST$.rite ?= var:schism_mainline_rite +# $SECOND$.rite ?= var:schism_competitor_rite +# } +# AND = { +# $FIRST$.rite ?= var:schism_competitor_rite +# $SECOND$.rite ?= var:schism_mainline_rite +# } +# } +# } +#} - Great Schism: $HEAD$ heads one schism-pair rite; $OTHER$ follows the opposing. False if unset. Any scope -pam_schism_head_of_rite_and_opposing_character_trigger = { - situation:the_christian_church ?= { - exists = var:schism_mainline_rite - exists = var:schism_competitor_rite - OR = { - AND = { - var:schism_mainline_rite.head_of_rite ?= $HEAD$ - $OTHER$.rite ?= var:schism_competitor_rite - } - AND = { - var:schism_competitor_rite.head_of_rite ?= $HEAD$ - $OTHER$.rite ?= var:schism_mainline_rite - } - } - } -} +# Great Schism: $HEAD$ heads one schism-pair rite; $OTHER$ follows the opposing. False if unset. Any scope +#pam_schism_head_of_rite_and_opposing_character_trigger = { +# situation:the_christian_church ?= { +# exists = var:schism_mainline_rite +# exists = var:schism_competitor_rite +# OR = { +# AND = { +# var:schism_mainline_rite.head_of_rite ?= $HEAD$ +# $OTHER$.rite ?= var:schism_competitor_rite +# } +# AND = { +# var:schism_competitor_rite.head_of_rite ?= $HEAD$ +# $OTHER$.rite ?= var:schism_mainline_rite +# } +# } +# } +#} - $RITE$ must be absolute (scope:/root./rite:), and this works in any scope - A bare rite link silently resolves to nothing inside the situation -pam_schism_rite_in_pair_trigger = { - situation:the_christian_church ?= { - exists = var:schism_mainline_rite - exists = var:schism_competitor_rite - OR = { - $RITE$ ?= var:schism_mainline_rite - $RITE$ ?= var:schism_competitor_rite - } - } -} +# $RITE$ must be absolute (scope:/root./rite:), and this works in any scope +# A bare rite link silently resolves to nothing inside the situation +#pam_schism_rite_in_pair_trigger = { +# situation:the_christian_church ?= { +# exists = var:schism_mainline_rite +# exists = var:schism_competitor_rite +# OR = { +# $RITE$ ?= var:schism_mainline_rite +# $RITE$ ?= var:schism_competitor_rite +# } +# } +#} - Great Schism: $COUNTY$'s rite is one of the schism-pair rites. False if unset. Any scope -pam_schism_county_rite_in_pair_trigger = { - situation:the_christian_church ?= { - exists = var:schism_mainline_rite - exists = var:schism_competitor_rite - OR = { - $COUNTY$.rite ?= var:schism_mainline_rite - $COUNTY$.rite ?= var:schism_competitor_rite - } - } -} +# Great Schism: $COUNTY$'s rite is one of the schism-pair rites. False if unset. Any scope +#pam_schism_county_rite_in_pair_trigger = { +# situation:the_christian_church ?= { +# exists = var:schism_mainline_rite +# exists = var:schism_competitor_rite +# OR = { +# $COUNTY$.rite ?= var:schism_mainline_rite +# $COUNTY$.rite ?= var:schism_competitor_rite +# } +# } +#} - Root is the converting ruler, this is the one who stayed on $RITE$ -pam_schism_rite_dissenter_valid_trigger = { - this != root - is_alive = yes - is_adult = yes - is_imprisoned = no - rite ?= $RITE$ -} +# Root is the converting ruler, this is the one who stayed on $RITE$ +#pam_schism_rite_dissenter_valid_trigger = { +# this != root +# is_alive = yes +# is_adult = yes +# is_imprisoned = no +# rite ?= $RITE$ +#} is_clerical_appointment_valid_trigger = { $TITLE$ = { save_temporary_scope_as = title_temp } @@ -359,7 +359,7 @@ is_clerical_appointment_valid_trigger = { $TOP_LIEGE$ = { save_temporary_scope_as = top_liege_temp } trigger_if = { limit = { exists = scope:title_temp } - custom_tooltip = { Has relevant law + custom_tooltip = { # Has relevant law text = has_appointment_succession_tt $TITLE$ = { OR = { @@ -368,7 +368,7 @@ is_clerical_appointment_valid_trigger = { } } } - custom_tooltip = { Titles below the holder's primary tier are inherited alongside it, so they cannot be contested on their own + custom_tooltip = { # Titles below the holder's primary tier are inherited alongside it, so they cannot be contested on their own text = follows_other_title_appointment_tt scope:title_temp.holder ?= { primary_title.tier = scope:title_temp.tier } } @@ -379,7 +379,7 @@ is_clerical_appointment_valid_trigger = { } } - Secular crowns only reach sees in their realm, while ecclesiastical and Head of Rite are unrestricted +# Secular crowns only reach sees in their realm, while ecclesiastical and Head of Rite are unrestricted pam_clerical_candidacy_reach_limited_trigger = { scope:actor = { NOR = { @@ -438,7 +438,7 @@ influence_head_of_faith_candidacy_target_trigger = { text = influence_head_of_faith_candidacy_not_created_tt exists = scope:target.holder } - has_order_of_succession resolves the holder's realm laws, so both checks stay behind the holder check + # has_order_of_succession resolves the holder's realm laws, so both checks stay behind the holder check trigger_if = { limit = { exists = scope:target.holder } custom_tooltip = { @@ -457,11 +457,11 @@ is_clerical_appointment_valid_base_trigger = { $TOP_LIEGE$ = { save_temporary_scope_as = top_liege_temp } scope:candidate_temp = { is_adult = yes - faith = scope:top_liege_temp.faith Must be of the same faith + faith = scope:top_liege_temp.faith # Must be of the same faith custom_tooltip = { text = can_be_appointed_interaction_tt OR = { - can_be_granted_theocratic_titles_by = { RULER = scope:top_liege_temp } Gender checks + can_be_granted_theocratic_titles_by = { RULER = scope:top_liege_temp } # Gender checks AND = { is_diarch_of_target = scope:top_liege_temp scope:top_liege_temp = { has_diarchy_active_parameter = diarchy_is_co_rulership } @@ -470,24 +470,24 @@ is_clerical_appointment_valid_base_trigger = { } custom_tooltip = { text = can_be_appointed_interaction_clergy_tt - OR = { Clergy or Lay Clergy + OR = { # Clergy or Lay Clergy is_clergy = yes - rite = { rite_has_parameter = lay_clergy } HoF cannot be temporal if you have Theocratic clergy, so no need to check for that - this = scope:top_liege_temp.player_heir Designated Theocratic Heir + rite = { rite_has_parameter = lay_clergy } # HoF cannot be temporal if you have Theocratic clergy, so no need to check for that + this = scope:top_liege_temp.player_heir # Designated Theocratic Heir AND = { is_landless_adventurer = yes this = scope:top_liege_temp } } } - custom_tooltip = { Only theocracies + custom_tooltip = { # Only theocracies text = only_theocratic_tt OR = { government_has_flag = government_is_theocracy is_landed = no } } - custom_tooltip = { Barred from holding titles + custom_tooltip = { # Barred from holding titles text = can_be_appointed_interaction_can_inherit_tt NOR = { has_trait = order_member @@ -498,7 +498,7 @@ is_clerical_appointment_valid_base_trigger = { } } - Expects interaction scopes actor/target/secondary_recipient +# Expects interaction scopes actor/target/secondary_recipient pam_clerical_self_candidacy_restriction_trigger = { trigger_if = { limit = { @@ -535,7 +535,7 @@ pam_clerical_self_candidacy_restriction_trigger = { pam_investiture_supports_spiritual_revocable_trigger = { - Both flag values are read so neither is flagged "set but never used". + # Both flag values are read so neither is flagged "set but never used". trigger_if = { limit = { has_variable = investiture_stance @@ -551,7 +551,7 @@ pam_investiture_supports_spiritual_revocable_trigger = { always = no } trigger_else = { - is_clergy too: landless chaplains have no government, so the flag would count them as secular + # is_clergy too: landless chaplains have no government, so the flag would count them as secular OR = { government_is_religious_trigger = yes is_clergy = yes @@ -585,20 +585,20 @@ pam_investiture_council_voter_has_locked_stance_trigger = { } } -pam_can_use_investiture_conflict_cb_trigger = { - has_pam_dlc_trigger = yes - faith = { religion = religion:christianity_religion } - situation:the_christian_church ?= { - has_situation_top_phase_parameter = the_christian_church_investiture_controversy - } - We block new conflicts while the council is pending, as a war would pull the host away and cancel it - custom_tooltip = { - text = pam_investiture_cb_council_pending_tt - NOT = { faith = { has_variable = investiture_council_pending } } - } -} +#pam_can_use_investiture_conflict_cb_trigger = { +# has_pam_dlc_trigger = yes +# faith = { religion = religion:christianity_religion } +# situation:the_christian_church ?= { +# has_situation_top_phase_parameter = the_christian_church_investiture_controversy +# } +# # We block new conflicts while the council is pending, as a war would pull the host away and cancel it +# custom_tooltip = { +# text = pam_investiture_cb_council_pending_tt +# NOT = { faith = { has_variable = investiture_council_pending } } +# } +#} - scope:attacker is the aggressor, and the defender is root +# scope:attacker is the aggressor, and the defender is root pam_valid_investiture_conflict_target_trigger = { this != scope:attacker faith = scope:attacker.faith @@ -611,18 +611,18 @@ pam_valid_investiture_conflict_target_trigger = { } } -pam_main_power_faith_conditional_appointment_trigger = { - situation:the_christian_church.var:tcc_main_power_faith ?= { - has_doctrine = doctrine_clerical_succession_conditional - } -} +#pam_main_power_faith_conditional_appointment_trigger = { +# situation:the_christian_church.var:tcc_main_power_faith ?= { +# has_doctrine = doctrine_clerical_succession_conditional +# } +#} -pam_investiture_crisis_has_contested_faith_trigger = { - situation:the_christian_church.var:tcc_main_power_faith ?= { - has_doctrine = doctrine_clerical_succession_conditional - exists = religious_head - } -} +#pam_investiture_crisis_has_contested_faith_trigger = { +# situation:the_christian_church.var:tcc_main_power_faith ?= { +# has_doctrine = doctrine_clerical_succession_conditional +# exists = religious_head +# } +#} pam_available_investiture_hof_ai_trigger = { is_ai = yes @@ -638,19 +638,19 @@ pam_valid_investiture_council_host_trigger = { is_ai = yes is_available_adult = yes is_landed = yes - PAM archbishops often fail the is_clergy org match + # PAM archbishops often fail the is_clergy org match government_has_flag = government_is_ecclesiastical can_hold_ecumenical_council_trigger = yes NOT = { faith.religious_head = this } - any_held_title avoids the landless context-switch primary_title would cause + # any_held_title avoids the landless context-switch primary_title would cause any_held_title = { tier >= tier_duchy has_clerical_region = yes } } -Sell Claim - True if TARGET, a county title, lies within a clerical region the scoped character holds. +###Sell Claim### +# True if TARGET, a county title, lies within a clerical region the scoped character holds. pam_sell_claim_target_in_own_clerical_region_trigger = { exists = $TARGET$.clerical_region_title any_held_title = { @@ -659,7 +659,7 @@ pam_sell_claim_target_in_own_clerical_region_trigger = { } } - Shared with has_valid_target_showing_failures_only: can_be_picked_title is not rechecked on send +# Shared with has_valid_target_showing_failures_only: can_be_picked_title is not rechecked on send pam_can_sell_claim_on_target_trigger = { scope:target = { is_landless_type_title = no @@ -690,7 +690,7 @@ pam_can_sell_claim_on_target_trigger = { } } } - Realm scan, so it sits behind the cheap ownership and claim gates + # Realm scan, so it sits behind the cheap ownership and claim gates custom_tooltip = { text = sell_claim_recipient_must_border_target_tt scope:target ?= { @@ -699,7 +699,7 @@ pam_can_sell_claim_on_target_trigger = { } } -Gift Claim +###Gift Claim### pam_gift_claim_recipient_in_own_clerical_region_trigger = { exists = $TARGET$.capital_county.clerical_region_title any_held_title = { @@ -793,7 +793,7 @@ can_influence_clerical_appointment_trigger = { } } } - Capital see filled by appointment still matters even if the realm priest is landless + # Capital see filled by appointment still matters even if the realm priest is landless capital_county.clerical_region_title ?= { OR = { has_title_law = clerical_appointment_law @@ -809,7 +809,7 @@ pam_cathedral_project_requirements_trigger = { has_spiritual_fulfillment_type = christian_fulfillment } - Landless clerical titles: title_capital_county is the holder's current location, not the fixed see +# Landless clerical titles: title_capital_county is the holder's current location, not the fixed see is_valid_cathedral_clerical_region_capital_trigger = { trigger_if = { limit = { exists = county.clerical_region_title } @@ -1055,11 +1055,11 @@ pam_rite_values_martial_clergy_trigger = { } } - We skip is_landed because ecclesiastical government is landless_playable +# We skip is_landed because ecclesiastical government is landless_playable pam_court_wants_monk_courtiers_trigger = { has_pam_dlc_trigger = yes is_ruler = yes - highest_held_title_tier >= tier_county A village priest is not a bishop with a familia + highest_held_title_tier >= tier_county # A village priest is not a bishop with a familia OR = { religion = religion:catholic_religion religion = religion:protestant_religion @@ -1074,7 +1074,7 @@ pam_court_wants_monk_courtiers_trigger = { } } - Province holds a temple leased to a monastic order +# Province holds a temple leased to a monastic order pam_province_has_monastic_lease_trigger = { has_holding_type = church_holding barony = { @@ -1083,7 +1083,7 @@ pam_province_has_monastic_lease_trigger = { } } - The courtier is the scope so kin stay eligible for appointment standing +# The courtier is the scope so kin stay eligible for appointment standing pam_clerical_court_ordain_candidate_trigger = { is_adult = yes is_available = yes @@ -1099,7 +1099,7 @@ pam_clerical_court_ordain_candidate_trigger = { } } - Court cleric with room left to grow under the develop-clerical-court caps. Evaluated on the courtier. +# Court cleric with room left to grow under the develop-clerical-court caps. Evaluated on the courtier. pam_clerical_court_pupil_trigger = { is_adult = yes is_available = yes @@ -1141,8 +1141,8 @@ faith_has_sacraments_trigger = { } } -SCRIPTED TRIGGER FOR GENERAL HOLY ORDER INTERACTIONS, TO FIND ORDERS WITH LEASED HOLDINGS NEARBY -Find leased title within a believe range that you would reasonable have access to or care about +#SCRIPTED TRIGGER FOR GENERAL HOLY ORDER INTERACTIONS, TO FIND ORDERS WITH LEASED HOLDINGS NEARBY +#Find leased title within a believe range that you would reasonable have access to or care about holy_order_range_trigger = { custom_tooltip = { text = monastic_holdings_too_distant_tt @@ -1186,46 +1186,46 @@ government_is_religious_trigger = { } } -pam_better_siphon_treasury_trigger = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_better_siphon_treasury - } -} +#pam_better_siphon_treasury_trigger = { +# top_participant_group:the_christian_church ?= { +# has_participant_group_parameter = the_christian_church_better_siphon_treasury +# } +#} - No Annoinments during the Investiture Crisis -pam_the_christian_church_no_coronation_trigger = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_no_coronation - } -} +# No Annoinments during the Investiture Crisis +#pam_the_christian_church_no_coronation_trigger = { +# top_participant_group:the_christian_church ?= { +# has_participant_group_parameter = the_christian_church_no_coronation +# } +#} - Secular rulers who follow an Antipope can be anointed by them while the mainline hierarchy refuses -pam_the_christian_church_antipope_coronations_trigger = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_antipope_coronations - } -} +# Secular rulers who follow an Antipope can be anointed by them while the mainline hierarchy refuses +#pam_the_christian_church_antipope_coronations_trigger = { +# top_participant_group:the_christian_church ?= { +# has_participant_group_parameter = the_christian_church_antipope_coronations +# } +#} - Anointment is sought from this authority, and $RULER$ is the ruler seeking it - We still let an antipope anoint their followers, otherwise Investiture Crisis blocks the mainline -pam_the_christian_church_no_anointment_trigger = { - save_temporary_scope_as = pam_anointment_authority_check - trigger_if = { - limit = { - pam_is_antipope_trigger = yes - $RULER$ = { - pam_the_christian_church_antipope_coronations_trigger = yes - religious_head_or_challenger ?= scope:pam_anointment_authority_check - } - } - always = no - } - trigger_else = { - pam_the_christian_church_no_coronation_trigger = yes - } -} +# Anointment is sought from this authority, and $RULER$ is the ruler seeking it +# We still let an antipope anoint their followers, otherwise Investiture Crisis blocks the mainline +#pam_the_christian_church_no_anointment_trigger = { +# save_temporary_scope_as = pam_anointment_authority_check +# trigger_if = { +# limit = { +# pam_is_antipope_trigger = yes +# $RULER$ = { +# pam_the_christian_church_antipope_coronations_trigger = yes +# religious_head_or_challenger ?= scope:pam_anointment_authority_check +# } +# } +# always = no +# } +# trigger_else = { +# pam_the_christian_church_no_coronation_trigger = yes +# } +#} - Any living ruler of kingdom tier or above whose capital lies in Europe and follows a non-Christian religion +# Any living ruler of kingdom tier or above whose capital lies in Europe and follows a non-Christian religion pam_non_christian_kingdom_holder_in_europe_trigger = { any_ruler = { is_alive = yes @@ -1239,7 +1239,7 @@ pam_non_christian_kingdom_holder_in_europe_trigger = { capital_province = { geographical_region = world_europe } - NOT = { has_variable = pam_non_christian_kingdom_holder_in_europe_trigger_var } To avoid the same ruler counting every year + NOT = { has_variable = pam_non_christian_kingdom_holder_in_europe_trigger_var } # To avoid the same ruler counting every year } } @@ -1281,13 +1281,13 @@ can_have_realm_priest_puppet_trigger = { NOT = { government_has_flag = government_is_nomadic } } - Ecclesiastical government is landless_playable, so do not filter these on is_landed +# Ecclesiastical government is landless_playable, so do not filter these on is_landed pam_landless_playable_cleric_trigger = { has_pam_dlc_trigger = yes government_has_flag = government_is_ecclesiastical } - Archbishop (clerical region title holder) or above them in the hierarchy: Head of Rite or Head of Faith +# Archbishop (clerical region title holder) or above them in the hierarchy: Head of Rite or Head of Faith pam_is_archbishop_or_higher_trigger = { OR = { any_held_title = { has_clerical_region = yes } @@ -1295,7 +1295,7 @@ pam_is_archbishop_or_higher_trigger = { } } - A cardinal, Head of Rite, or archbishop of $CHARACTER$'s faith +# A cardinal, Head of Rite, or archbishop of $CHARACTER$'s faith pam_is_senior_cleric_of_character_trigger = { has_pam_dlc_trigger = yes OR = { @@ -1312,7 +1312,7 @@ pam_is_senior_cleric_of_character_trigger = { } } - A character is a theological puppet if they have a puppeteer who keeps them as a (external) theological puppet. +# A character is a theological puppet if they have a puppeteer who keeps them as a (external) theological puppet. is_theological_agent_puppet_trigger = { trigger_if = { limit = { @@ -1330,7 +1330,7 @@ is_theological_agent_puppet_trigger = { } } - A character has a theological puppet if they keep either an internal or external theological puppet. +# A character has a theological puppet if they keep either an internal or external theological puppet. has_theological_agent_puppet_trigger = { custom_tooltip = { text = no_clerical_puppet_tt @@ -1346,8 +1346,8 @@ puppet_action_puppet_is_secular_ruler_trigger = { puppet:external_ruler_puppet ?= scope:puppet } - The acting character is the scope, and on the puppet action path that is the puppet - A puppet standing in for a missing Head of Faith defers to its puppeteer +# The acting character is the scope, and on the puppet action path that is the puppet +# A puppet standing in for a missing Head of Faith defers to its puppeteer can_manage_faith_holy_sites_trigger = { trigger_if = { limit = { exists = faith.religious_head } @@ -1371,12 +1371,12 @@ can_manage_faith_holy_sites_trigger = { } } - Substitute authority for a faith with no head of faith: a realm priest puppet plus piety standing. +# Substitute authority for a faith with no head of faith: a realm priest puppet plus piety standing. can_manage_faith_holy_sites_without_hof_trigger = { OR = { custom_tooltip = { text = manage_holy_sites_realm_priest_puppet_tt - puppet: errors on non-playable characters, so we only check playable ones and tooltips never run it + # puppet: errors on non-playable characters, so we only check playable ones and tooltips never run it trigger_if = { limit = { is_playable_character = yes } exists = puppet:theological_agent_puppet @@ -1427,7 +1427,7 @@ holy_site_free_action_show_usage_trigger = { } } - The attendee is the teacher, and root is the student receiving the activity event +# The attendee is the teacher, and root is the student receiving the activity event ecumenical_shareable_unknown_tenet_for_root_trigger = { save_temporary_scope_as = ecumenical_tenet_teacher any_character_tenet = { @@ -1511,7 +1511,7 @@ pam_not_antipope_when_recipient_is_hof_tt = { } } -Does the province have a domicile that whose owner is the same rite as the character in question and also has a cathedral school level 3 (has_domicile_parameter = domicile_building_is_university) +#Does the province have a domicile that whose owner is the same rite as the character in question and also has a cathedral school level 3 (has_domicile_parameter = domicile_building_is_university) has_domicile_building_cathedral_school = { $LOCATION$ = { any_province_domicile = { @@ -1524,7 +1524,7 @@ has_domicile_building_cathedral_school = { } } - Kingdom of Heaven — no other character of your faith has a higher Piety Level (ties at same level allowed) +# Kingdom of Heaven — no other character of your faith has a higher Piety Level (ties at same level allowed) pam_kingdom_of_heaven_has_highest_piety_level_in_faith_trigger = { NOT = { root.faith = { @@ -1536,7 +1536,7 @@ pam_kingdom_of_heaven_has_highest_piety_level_in_faith_trigger = { } } - Either there is no independent emperor-tier ruler of your faith, or you have a hook on each of them +# Either there is no independent emperor-tier ruler of your faith, or you have a hook on each of them pam_kingdom_of_heaven_hooks_on_all_faith_emperors_or_none_trigger = { NOT = { any_independent_ruler = { @@ -1552,12 +1552,12 @@ pam_kingdom_of_heaven_hooks_on_all_faith_emperors_or_none_trigger = { } } - At least half of the worldwide same faith counties are in your realm +# At least half of the worldwide same faith counties are in your realm pam_kingdom_of_heaven_half_faith_in_realm_trigger = { pam_koh_same_faith_realm_counties_value >= pam_koh_half_faith_counties_required_value } - For identifying religious player trigger (Theocratic ruler events) +# For identifying religious player trigger (Theocratic ruler events) pam_government_is_religious_playable_trigger = { OR = { government_has_flag = government_is_theocracy @@ -1595,7 +1595,7 @@ pam_recipient_is_clerical_title_authority_trigger = { } } - secondary_recipient if present (replace), else recipient (grant) +# secondary_recipient if present (replace), else recipient (grant) pam_grant_ecclesiastical_title_appointee_changes_rite_trigger = { trigger_if = { limit = { exists = scope:secondary_recipient } @@ -1606,7 +1606,7 @@ pam_grant_ecclesiastical_title_appointee_changes_rite_trigger = { } } - Non-military clergy ruler: generic theocracy, Christian ecclesiastical, or monastic holy order. +# Non-military clergy ruler: generic theocracy, Christian ecclesiastical, or monastic holy order. pam_is_clergy_ruler_trigger = { OR = { government_has_flag = government_is_theocracy @@ -1615,8 +1615,8 @@ pam_is_clergy_ruler_trigger = { } } - Dynastic approval is a separate authority and still applies - We require the DLC because government_is_theocracy already exists in the base game +# Dynastic approval is a separate authority and still applies +# We require the DLC because government_is_theocracy already exists in the base game pam_grants_own_divorce_trigger = { has_pam_dlc_trigger = yes pam_is_clergy_ruler_trigger = yes @@ -1631,7 +1631,7 @@ pam_clergy_continence_expected_trigger = { } } - Antipopes are filed as subordinates of the top superior +# Antipopes are filed as subordinates of the top superior pam_court_scene_resident_subordinate_trigger = { exists = location location = scope:ruler.capital_province @@ -1644,7 +1644,7 @@ pam_court_scene_resident_subordinate_trigger = { pam_clergy_interactions_faith_trigger = { faith = { NOT = { has_doctrine_parameter = unreformed } } OR = { - Has a theocratic head of faith + #Has a theocratic head of faith faith = { has_doctrine_parameter = spiritual_head_of_faith } rite = { rite_has_parameter = theocracy_temple_lease } } @@ -1655,7 +1655,7 @@ claim_valid_faith_subordinate_trigger = { is_at_war_with = scope:puppet_or_actor has_trait = excommunicated } - Also used to populate the recipient list, where no recipient exists yet + # Also used to populate the recipient list, where no recipient exists yet trigger_if = { limit = { exists = scope:recipient } NOR = { @@ -1672,16 +1672,16 @@ claim_valid_faith_subordinate_trigger = { } highest_held_title_tier >= tier_duchy OR = { - Is head of faith + #Is head of faith scope:puppet_or_actor.religious_head_or_challenger ?= scope:recipient clergy_claim_title_responsibility_trigger = yes - you gotta be able to use your puppet + #you gotta be able to use your puppet scope:puppeteer ?= scope:puppet_or_actor } } clergy_claim_title_responsibility_trigger = { OR = { - Clerical region overlaps + #Clerical region overlaps AND = { any_held_title = { has_clerical_region = yes @@ -1692,16 +1692,16 @@ clergy_claim_title_responsibility_trigger = { } } } - Landed title overlaps + #Landed title overlaps AND = { is_landed = yes any_held_title = { OR = { - they have a title beneath recipient's titles + #they have a title beneath recipient's titles any_this_title_or_de_jure_above = { holder ?= scope:recipient } - they have a title that presides over recipient's titles + #they have a title that presides over recipient's titles any_in_de_jure_hierarchy = { holder ?= scope:recipient } @@ -1726,7 +1726,7 @@ clergy_claims_hof_trigger = { } } -When AI should be bothering player clergy with requests +#When AI should be bothering player clergy with requests pam_should_bother_clergy_interaction_trigger = { $PRIEST$ = { trigger_if = { @@ -1754,7 +1754,7 @@ pam_should_bother_clergy_interaction_trigger = { } } - Show the Offer Pilgrimage send option at all - hidden for rites that cannot pilgrimage +# Show the Offer Pilgrimage send option at all - hidden for rites that cannot pilgrimage pam_offer_pilgrimage_option_shown_trigger = { NOT = { $ACTOR$.rite = { @@ -1783,7 +1783,7 @@ pam_offer_pilgrimage_option_valid_trigger = { } } - Clerical interactions are blocked while a promised pilgrimage is unfulfilled +# Clerical interactions are blocked while a promised pilgrimage is unfulfilled pam_not_promised_pilgrimage_trigger = { $ACTOR$ = { custom_tooltip = { @@ -1817,21 +1817,21 @@ pam_ai_deposable_cleric_trigger = { } } - We set this just under the default heresy threshold so rites convert before heresy fires - Phase first: outside Reform the global lookup ends this before the per-see checks -pam_ai_reform_rite_replacement_trigger = { - situation:the_christian_church ?= { situation_current_phase = reform_phase } - scope:actor.faith = { fervor < 50 } - scope:target.holder ?= { - rite != scope:actor.rite - is_ai = yes - rite = { - "divergence(faith.main_rite)" >= 45 - } - } - scope:recipient = { rite = scope:actor.rite } - years_from_game_start >= 25 -} +# We set this just under the default heresy threshold so rites convert before heresy fires +# Phase first: outside Reform the global lookup ends this before the per-see checks +#pam_ai_reform_rite_replacement_trigger = { +# situation:the_christian_church ?= { situation_current_phase = reform_phase } +# scope:actor.faith = { fervor < 50 } +# scope:target.holder ?= { +# rite != scope:actor.rite +# is_ai = yes +# rite = { +# "divergence(faith.main_rite)" >= 45 +# } +# } +# scope:recipient = { rite = scope:actor.rite } +# years_from_game_start >= 25 +#} pam_beseech_claims_access_trigger = { has_pam_dlc_trigger = yes @@ -1857,7 +1857,7 @@ pam_actor_has_simony_trigger = { } } - Head of Rite dies while still subject to short_reign on their primary title. +# Head of Rite dies while still subject to short_reign on their primary title. pam_head_of_rite_had_short_reign_trigger = { has_pam_dlc_trigger = yes OR = { @@ -1872,7 +1872,7 @@ pam_head_of_rite_had_short_reign_trigger = { } } - Recipient is the scope, and we check the pointers before scanning counties +# Recipient is the scope, and we check the pointers before scanning counties pam_rite_sway_connected_recipient_trigger = { OR = { is_courtier_of = $ACTOR$ @@ -1885,7 +1885,7 @@ pam_rite_sway_connected_recipient_trigger = { } } - We keep this in sync with sway_ruler_to_my_rite_interaction is_shown and is_valid +# We keep this in sync with sway_ruler_to_my_rite_interaction is_shown and is_valid pam_sway_to_rite_diocese_candidate_trigger = { this != $ARCHBISHOP$ is_ruler = yes @@ -1900,7 +1900,7 @@ pam_sway_to_rite_diocese_candidate_trigger = { capital_county.clerical_region_title.holder ?= $ARCHBISHOP$ } - These are prelates of other dioceses still on another rite, for the peer petition important actions +# These are prelates of other dioceses still on another rite, for the peer petition important actions pam_sway_to_rite_adjacent_prelate_candidate_trigger = { this != $ARCHBISHOP$ is_ruler = yes @@ -1915,7 +1915,7 @@ pam_sway_to_rite_adjacent_prelate_candidate_trigger = { any_held_title = { has_clerical_region = yes } } - A Head of Faith on the mainline rite may call other Heads of Rite back to it, which Sway to Rite otherwise forbids +# A Head of Faith on the mainline rite may call other Heads of Rite back to it, which Sway to Rite otherwise forbids pam_sway_to_rite_head_of_faith_reclaims_trigger = { $ACTOR$ = { faith.religious_head ?= this @@ -1923,7 +1923,7 @@ pam_sway_to_rite_head_of_faith_reclaims_trigger = { } } - Sway to Rite reach lane: petitioning a fellow prelate. +# Sway to Rite reach lane: petitioning a fellow prelate. pam_rite_sway_peer_prelate_lane_trigger = { $RECIPIENT$ = { any_held_title = { has_clerical_region = yes } @@ -1934,13 +1934,13 @@ pam_rite_sway_peer_prelate_lane_trigger = { } } - Sway to Rite reach lane: petitioning the liege chain. +# Sway to Rite reach lane: petitioning the liege chain. pam_rite_sway_liege_lane_trigger = { $RECIPIENT$ = { is_liege_or_above_of = $ACTOR$ } $ACTOR$ = { piety_level >= very_high_piety_level } } - $ACTOR$ and $RECIPIENT$ dioceses border or are nearby, and the scan is bounded by the actor's diocese +# $ACTOR$ and $RECIPIENT$ dioceses border or are nearby, and the scan is bounded by the actor's diocese pam_rite_sway_adjacent_diocese_trigger = { OR = { $ACTOR$.capital_county.clerical_region_title ?= { @@ -1951,7 +1951,7 @@ pam_rite_sway_adjacent_diocese_trigger = { } } AND = { - No diocese seat on the far end means there is no adjacent diocese to measure + # No diocese seat on the far end means there is no adjacent diocese to measure exists = $RECIPIENT$.capital_county.clerical_region_title.title_capital_county $ACTOR$.capital_county.clerical_region_title.title_capital_county ?= { squared_distance = { @@ -1963,7 +1963,7 @@ pam_rite_sway_adjacent_diocese_trigger = { } } - We put quick checks first and leave the bordering realm scan last, behind a capital distance check +# We put quick checks first and leave the bordering realm scan last, behind a capital distance check pam_rite_sway_clergy_reach_trigger = { OR = { custom_tooltip = { @@ -1997,7 +1997,7 @@ pam_rite_sway_clergy_reach_trigger = { } custom_tooltip = { text = sway_ruler_to_my_rite_interaction_border_reach_tt - A landless recipient has no capital county for the distance pre-gate to measure + # A landless recipient has no capital county for the distance pre-gate to measure exists = $RECIPIENT$.capital_county $ACTOR$.capital_county ?= { squared_distance = { @@ -2012,20 +2012,20 @@ pam_rite_sway_clergy_reach_trigger = { } } - Sway to Rite: landed house or bloc kin, as with Demand Conversion. Lives on the vassal variant. +# Sway to Rite: landed house or bloc kin, as with Demand Conversion. Lives on the vassal variant. pam_rite_sway_house_lane_trigger = { $RECIPIENT$ = { is_ruler = yes } $ACTOR$ = { is_house_head = yes } OR = { $RECIPIENT$.house ?= $ACTOR$.house - $RECIPIENT$.house.house_confederation ?= { House Bloc + $RECIPIENT$.house.house_confederation ?= { # House Bloc $ACTOR$.house.house_confederation ?= this has_cohesion_level_parameter = bloc_members_join_leaders_faith } } } - Iterates the faith's few holy sites instead of scanning the recipient's whole sub-realm +# Iterates the faith's few holy sites instead of scanning the recipient's whole sub-realm pam_sway_recipient_holds_holy_site_trigger = { scope:puppet_or_actor.faith ?= { any_holy_site = { @@ -2040,7 +2040,7 @@ pam_sway_recipient_holds_holy_site_trigger = { } } - We keep this in sync with how the three Sway to Rite variants split is_shown +# We keep this in sync with how the three Sway to Rite variants split is_shown pam_sway_to_rite_variant_can_send_trigger = { trigger_if = { limit = { $TARGET$ = { is_courtier_of = $ARCHBISHOP$ } } @@ -2081,7 +2081,7 @@ pam_sway_to_rite_variant_can_send_trigger = { } } - As above, but also demands the given ai_accept threshold from the matching variant. +# As above, but also demands the given ai_accept threshold from the matching variant. pam_sway_to_rite_variant_acceptance_trigger = { trigger_if = { limit = { $TARGET$ = { is_courtier_of = $ARCHBISHOP$ } } @@ -2125,7 +2125,7 @@ pam_sway_to_rite_variant_acceptance_trigger = { } } - Runs in the ruler's scope +# Runs in the ruler's scope pam_rite_locally_present_trigger = { any_sub_realm_county = { OR = { @@ -2277,7 +2277,7 @@ pam_the_christian_church_civil_war_in_christian_kingdom_trigger = { pam_the_christian_church_ruler_died_in_battle_against_non_christian_catalyst_trigger = { has_pam_dlc_trigger = yes is_ruler = yes - death_reason errors on living characters; in on_death the dier is still is_alive = yes, so use has_variable = battle_death_enemy there. + # death_reason errors on living characters; in on_death the dier is still is_alive = yes, so use has_variable = battle_death_enemy there. trigger_if = { limit = { is_alive = no } death_reason = death_battle @@ -2324,39 +2324,39 @@ pam_ecclesiastic_transfer_land_access_trigger = { government_has_flag = government_is_ecclesiastical } } -The recipient of the "Give me land" interaction will back down without any convincing required -The crit, the instant success +#The recipient of the "Give me land" interaction will back down without any convincing required +#The crit, the instant success pam_instant_negotiate_land_success_trigger = { scope:recipient = { is_ai = yes } OR = { - They don't have the legitimacy or piety + #They don't have the legitimacy or piety scope:recipient = { piety_level <= 0 legitimacy_level <= 0 } - You have the pope in your pocket + #You have the pope in your pocket trigger_if = { limit = { exists = scope:secondary_recipient } pam_negotiate_land_instant_pope_hook_trigger = yes } - You intimidate them militarily or through dread + #You intimidate them militarily or through dread OR = { - Mostly milstrength + #Mostly milstrength AND = { - Milstrength 4x as high + #Milstrength 4x as high half_current_military_strength >= scope:recipient.twice_current_military_strength has_dread_level_towards = { target = scope:recipient level >= 1 } } - Milstrength and intimidation + #Milstrength and intimidation AND = { - Milstrength twice as high + #Milstrength twice as high current_military_strength >= scope:recipient.twice_current_military_strength has_dread_level_towards = { target = scope:recipient @@ -2370,7 +2370,7 @@ pam_instant_negotiate_land_success_trigger = { pam_negotiate_land_instant_pope_hook_trigger = { has_strong_hook = scope:secondary_recipient highest_held_title_tier >= scope:recipient.highest_held_title_tier - Won't give away primary title or its aboves + #Won't give away primary title or its aboves scope:target = { NOR = { this = scope:recipient.primary_title @@ -2390,7 +2390,7 @@ pam_negotiate_land_instant_pope_hook_trigger = { } } -You DEFINITELY can force the recipient to give in, if you sacrifice +#You DEFINITELY can force the recipient to give in, if you sacrifice pam_forced_negotiate_land_success_trigger = { OR = { pam_negotiate_land_forced_hook_trigger = yes @@ -2401,7 +2401,7 @@ pam_forced_negotiate_land_success_trigger = { } } -There is a CHANCE you can convince the recipient to give +#There is a CHANCE you can convince the recipient to give pam_possible_negotiate_land_success_trigger = { OR = { pam_negotiate_land_possible_hook_trigger = yes @@ -2415,7 +2415,7 @@ pam_possible_negotiate_land_success_trigger = { pam_intimidate_clerical_transfer_recipient_trigger = { scope:recipient = { is_ai = yes - Needs non-combative personality + #Needs non-combative personality NOR = { has_trait = greatest_of_khans has_trait = conqueror @@ -2425,7 +2425,7 @@ pam_intimidate_clerical_transfer_recipient_trigger = { pam_negotiate_land_forced_hook_trigger = { has_usable_hook = scope:recipient has_strong_hook = scope:recipient - Isn't root's capital county/doesn't contain recipient's capital county + #Isn't root's capital county/doesn't contain recipient's capital county trigger_if = { limit = { exists = scope:target @@ -2493,7 +2493,7 @@ pam_negotiate_land_forced_gold_trigger = { OR = { debt_level >= 4 treasury_debt_level >= 4 - Losing a war and needs the money + #Losing a war and needs the money AND = { is_at_war = yes any_character_war = { @@ -2519,7 +2519,7 @@ pam_negotiate_land_forced_gold_trigger = { } } pam_negotiate_land_possible_hook_trigger = { - Hook + #Hook has_usable_hook = scope:recipient scope:recipient = { is_ai = yes @@ -2527,24 +2527,24 @@ pam_negotiate_land_possible_hook_trigger = { } pam_negotiate_land_possible_relation_trigger = { OR = { - Strong relations you can destroy + #Strong relations you can destroy has_relation_friend = scope:recipient has_relation_soulmate = scope:recipient has_relation_disciple = scope:recipient } } pam_negotiate_land_possible_piety_level_trigger = { - Superior devotion + #Superior devotion piety_level > scope:recipient.piety_level } pam_negotiate_land_possible_legitimacy_level_trigger = { has_legitimacy = yes scope:recipient = { has_legitimacy = yes } - Superior legitimacy + #Superior legitimacy legitimacy_level > scope:recipient.legitimacy_level } pam_negotiate_land_possible_gold_trigger = { - Gold to pay for land + #Gold to pay for land treasury_or_gold >= scope:recipient.pam_transfer_land_gold_value } @@ -2564,28 +2564,28 @@ pam_clergy_land_interaction_likely_acceptance_no_methods_trigger = { scope:recipient = { ai_greed <= medium_negative_ai_value } } } - You intimidate them militarily or through dread + #You intimidate them militarily or through dread OR = { - Mostly milstrength + #Mostly milstrength AND = { - Milstrength 2x as high + #Milstrength 2x as high current_military_strength >= scope:recipient.twice_current_military_strength has_dread_level_towards = { target = scope:recipient level >= 1 } } - Milstrength and intimidation + #Milstrength and intimidation AND = { - Milstrength higher + #Milstrength higher current_military_strength > scope:recipient.twice_current_military_strength has_dread_level_towards = { target = scope:recipient level >= 2 } } - Milstrength - Milstrength 4x as high + #Milstrength + #Milstrength 4x as high half_current_military_strength >= scope:recipient.twice_current_military_strength } } @@ -2644,7 +2644,7 @@ pam_tenet_can_be_prohibited_no_actor_trigger = { } } - Tenet scope. Practices a Christian church reads as corruption rather than doctrine. +# Tenet scope. Practices a Christian church reads as corruption rather than doctrine. pam_tenet_is_christian_vice_trigger = { OR = { this = tenet:tenet_simony @@ -2657,7 +2657,7 @@ pam_tenet_is_christian_vice_trigger = { } } - Tenet scope. Christologies settled against by Nicaea, Chalcedon and Antioch. +# Tenet scope. Christologies settled against by Nicaea, Chalcedon and Antioch. pam_tenet_is_christological_heresy_trigger = { OR = { this = tenet:tenet_monophysitism @@ -2666,8 +2666,8 @@ pam_tenet_is_christological_heresy_trigger = { } } - Decision-side counterpart of pam_ec_tenet_is_christian_abomination_trigger - We leave Ritual Cannibalism off because the Eucharist already invites the charge +# Decision-side counterpart of pam_ec_tenet_is_christian_abomination_trigger +# We leave Ritual Cannibalism off because the Eucharist already invites the charge pam_tenet_is_christian_abomination_trigger = { OR = { this = tenet:tenet_human_sacrifice @@ -2677,7 +2677,7 @@ pam_tenet_is_christian_abomination_trigger = { } } - We pool these in tenet scope, since prohibit and core checks already close the wrong paths per faith +# We pool these in tenet scope, since prohibit and core checks already close the wrong paths per faith pam_tenet_is_christian_dogma_trigger = { OR = { this = tenet:tenet_apostolic_succession @@ -2697,8 +2697,8 @@ pam_tenet_is_christian_dogma_trigger = { } } - $CHARACTER$ is the Head of Faith deciding, and the tenet is the scope - We only apply this to the AI, so players keep the full list +# $CHARACTER$ is the Head of Faith deciding, and the tenet is the scope +# We only apply this to the AI, so players keep the full list pam_tenet_ai_may_permit_trigger = { trigger_if = { limit = { @@ -2735,7 +2735,7 @@ pam_tenet_ai_may_prohibit_trigger = { } } - Phase first: this runs per candidate tenet, so outside Reform the global lookup ends it at once +# Phase first: this runs per candidate tenet, so outside Reform the global lookup ends it at once pam_tenet_ai_should_purge_trigger = { situation:the_christian_church ?= { situation_current_phase = reform_phase } OR = { @@ -2808,7 +2808,7 @@ pam_faith_is_at_core_tenet_cap_trigger = { } } - $CHARACTER$'s faith supplies the popularity, from tenet scope +# $CHARACTER$'s faith supplies the popularity, from tenet scope pam_tenet_is_overwhelmingly_popular_trigger = { save_temporary_scope_as = pam_popularity_tenet $CHARACTER$.faith = { @@ -2817,7 +2817,7 @@ pam_tenet_is_overwhelmingly_popular_trigger = { } } - At or above the Popular display tier +# At or above the Popular display tier pam_tenet_is_at_least_popular_trigger = { save_temporary_scope_as = pam_popularity_tenet $CHARACTER$.faith = { @@ -2826,7 +2826,7 @@ pam_tenet_is_at_least_popular_trigger = { } } - As above, but for the Very Popular display tier. +# As above, but for the Very Popular display tier. pam_tenet_is_at_least_very_popular_trigger = { save_temporary_scope_as = pam_popularity_tenet $CHARACTER$.faith = { @@ -2835,7 +2835,7 @@ pam_tenet_is_at_least_very_popular_trigger = { } } - Below the Neutral display tier: the faithful have turned against it, not merely indifferent +# Below the Neutral display tier: the faithful have turned against it, not merely indifferent pam_tenet_is_unpopular_trigger = { save_temporary_scope_as = pam_popularity_tenet $CHARACTER$.faith = { @@ -3000,7 +3000,7 @@ pam_ai_pentarchy_christian_actor_trigger = { culture = culture:greek culture = { has_same_culture_language = culture:greek } rite ?= { pam_greek_as_liturgical_language_trigger = yes } - Alexandria and Antioch are Oriental Orthodox sees, so those churches count the five as their own. + # Alexandria and Antioch are Oriental Orthodox sees, so those churches count the five as their own. pam_ai_oriental_christian_actor_trigger = yes } } @@ -3025,7 +3025,7 @@ pam_ai_mountain_capital_actor_trigger = { } } - title_preferred_capital_county is the de jure capital even if k_papal_state is uncreated +# title_preferred_capital_county is the de jure capital even if k_papal_state is uncreated pam_catholic_hof_weak_papal_state_control_trigger = { has_pam_dlc_trigger = yes title:k_papal_state = { @@ -3044,22 +3044,22 @@ pam_catholic_hof_weak_papal_state_control_trigger = { } } - Holder of the Byzantine Empire (or Eastern Roman hegemony) with a non-Christian religion -pam_byzantine_emperor_non_christian_trigger = { - OR = { - title:e_byzantium.holder ?= { - is_alive = yes - religion != religion:christianity_religion - } - title:h_eastern_roman_empire.holder ?= { - is_alive = yes - religion != religion:christianity_religion - } - } -} +# Holder of the Byzantine Empire (or Eastern Roman hegemony) with a non-Christian religion +#pam_byzantine_emperor_non_christian_trigger = { +# OR = { +# title:e_byzantium.holder ?= { +# is_alive = yes +# religion != religion:christianity_religion +# } +# title:h_eastern_roman_empire.holder ?= { +# is_alive = yes +# religion != religion:christianity_religion +# } +# } +#} - Used by demand_child_as_monk_interaction. - True if scope:recipient genuinely cares about losing scope:secondary_recipient, either their own direct child, or any child betrothed to one of their close family members. +# Used by demand_child_as_monk_interaction. +# True if scope:recipient genuinely cares about losing scope:secondary_recipient, either their own direct child, or any child betrothed to one of their close family members. pam_demand_child_recipient_cares_trigger = { OR = { scope:secondary_recipient = { is_child_of = scope:recipient } @@ -3099,8 +3099,8 @@ pam_ai_can_consider_forbidden_personal_tenet_trigger = { has_trait = humble has_trait = content } - Clergy: a prohibited personal tenet is a criminal secret, so the elected pontiff never considers one - This goes last because it iterates held titles, unlike the simple checks above + # Clergy: a prohibited personal tenet is a criminal secret, so the elected pontiff never considers one + # This goes last because it iterates held titles, unlike the simple checks above pam_holds_college_elected_church_seat_trigger = no } @@ -3135,7 +3135,7 @@ pam_is_western_christian_trigger = { } } - Character scope. The College is a faith-locked doctrine (Catholicism). +# Character scope. The College is a faith-locked doctrine (Catholicism). pam_can_hold_cardinalate_trigger = { faith ?= { has_doctrine_parameter = has_clerical_electors } trigger_if = { @@ -3144,7 +3144,7 @@ pam_can_hold_cardinalate_trigger = { } } - Character scope. Before the Great Schism, AI only chooses Western candidates. +# Character scope. Before the Great Schism, AI only chooses Western candidates. pam_ai_cardinal_candidate_is_immersive_trigger = { OR = { has_global_variable = pam_great_schism_decision_taken @@ -3154,7 +3154,7 @@ pam_ai_cardinal_candidate_is_immersive_trigger = { } } - Character scope. The seat carries no government of its own, so a lay ruler handed one stays lay. +# Character scope. The seat carries no government of its own, so a lay ruler handed one stays lay. pam_can_receive_cardinalate_trigger = { OR = { government_has_flag = government_is_theocracy @@ -3164,7 +3164,7 @@ pam_can_receive_cardinalate_trigger = { pam_is_antipope_trigger = no } - Held title scope. Any faith's cardinalate - faith.any_clerical_elector_title only lists its own. +# Held title scope. Any faith's cardinalate - faith.any_clerical_elector_title only lists its own. pam_title_is_clerical_elector_trigger = { holder.clerical_elector_title ?= this } @@ -3177,9 +3177,9 @@ pam_church_background_location_is_mediterranean_or_urban_trigger = { } } - Grand cathedral is the highest church background +# Grand cathedral is the highest church background pam_church_event_background_is_grand_western_trigger = { - Gothic movement starts in 12th century + #Gothic movement starts in 12th century current_year >= 1130 trigger_if = { limit = { @@ -3226,51 +3226,51 @@ pam_church_event_background_is_grand_western_trigger = { } } } -pam_church_event_background_is_grand_western_pre_gothic_trigger = { - #Gothic movement starts in 12th century - current_year < 1130 - trigger_if = { - limit = { - scope:activity.activity_location ?= { - faith.religion = religion:christianity_religion - } - } - scope:activity.activity_location.rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - } - trigger_else_if = { - limit = { - exists = scope:activity.activity_host - } - scope:activity.activity_host.rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - } - trigger_else = { - location.rite ?= { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } - } - OR = { - AND = { - this = faith.religious_head - highest_held_title_tier >= tier_kingdom - capital_county.faith ?= faith - } - domicile ?= { has_domicile_building_or_higher = ecclesiastical_domicile_main_03 } - capital_county ?= { - any_county_province = { - has_building_with_flag = { flag = grand_cathedral_flag } - } - } - holy_order ?= { - num_leased_titles >= 12 - } - } -} +#pam_church_event_background_is_grand_western_pre_gothic_trigger = { +# #Gothic movement starts in 12th century +# current_year < 1130 +# trigger_if = { +# limit = { +# scope:activity.activity_location ?= { +# faith.religion = religion:christianity_religion +# } +# } +# scope:activity.activity_location.rite = { +# rite_has_doctrine = special_doctrine_is_western_christian_faith +# } +# } +# trigger_else_if = { +# limit = { +# exists = scope:activity.activity_host +# } +# scope:activity.activity_host.rite = { +# rite_has_doctrine = special_doctrine_is_western_christian_faith +# } +# } +# trigger_else = { +# location.rite ?= { +# rite_has_doctrine = special_doctrine_is_western_christian_faith +# } +# } +# OR = { +# AND = { +# this = faith.religious_head +# highest_held_title_tier >= tier_kingdom +# capital_county.faith ?= faith +# } +# domicile ?= { has_domicile_building_or_higher = ecclesiastical_domicile_main_03 } +# capital_county ?= { +# any_county_province = { +# has_building_with_flag = { flag = grand_cathedral_flag } +# } +# } +# holy_order ?= { +# num_leased_titles >= 12 +# } +# } +#} -For using the Hagia Sophia background +#For using the Hagia Sophia background pam_church_event_background_is_grand_eastern_trigger = { trigger_if = { limit = { @@ -3319,7 +3319,7 @@ pam_church_event_background_is_grand_eastern_trigger = { } - This grandeur check does not care about religion, so the call site checks religion +# This grandeur check does not care about religion, so the call site checks religion pam_church_event_background_is_developed_trigger = { OR = { domicile ?= { has_domicile_building_or_higher = ecclesiastical_domicile_main_02 } @@ -3331,7 +3331,7 @@ pam_church_event_background_is_developed_trigger = { OR = { has_building_or_higher = temple_02 has_building_with_flag = holy_building - A wooden church looks wrong here + #A wooden church looks wrong here geographical_region = world_middle_east geographical_region = world_africa geographical_region = world_steppe_tarim @@ -3353,7 +3353,7 @@ pam_church_event_background_is_developed_trigger = { } } - Khachkar is removed when a county leaves the commissioning dynasty (like runestones). +# Khachkar is removed when a county leaves the commissioning dynasty (like runestones). pam_remove_khachkar_new_holder_trigger = { $TITLE$ = { exists = var:pam_khachkar_ancestor @@ -3367,7 +3367,7 @@ pam_remove_khachkar_new_holder_trigger = { } } - Cheap pre-filter for HoF split secular ruler lists (since split_clerical_region_size might not be performant) +# Cheap pre-filter for HoF split secular ruler lists (since split_clerical_region_size might not be performant) pam_potential_secular_clerical_split_ruler_trigger = { $RULER$ = { is_alive = yes @@ -3385,11 +3385,11 @@ pam_potential_secular_clerical_split_ruler_trigger = { capital_county = { exists = clerical_region_title clerical_region_title.holder = scope:recipient - We always keep the region capital, because splitting it off would leave the new region with no capital + # We always keep the region capital, because splitting it off would leave the new region with no capital NOT = { this = clerical_region_title.title_preferred_capital_county } } } - any_sub_realm_county, not any_realm_county: for a vassal the latter is the liege's whole realm + # any_sub_realm_county, not any_realm_county: for a vassal the latter is the liege's whole realm trigger_if = { limit = { scope:recipient = scope:actor } $RULER$ = { @@ -3402,7 +3402,7 @@ pam_potential_secular_clerical_split_ruler_trigger = { } } - Full validation including code-side split size calc — use sparingly +# Full validation including code-side split size calc — use sparingly pam_valid_secular_clerical_split_ruler_trigger = { pam_potential_secular_clerical_split_ruler_trigger = { RULER = $RULER$ } $RULER$ = { @@ -3410,8 +3410,8 @@ pam_valid_secular_clerical_split_ruler_trigger = { } } - This has to be the region at their capital, which is what the clerical_region pickers list - Hides the interaction when a landed archbishop's capital sits in someone else's region +# This has to be the region at their capital, which is what the clerical_region pickers list +# Hides the interaction when a landed archbishop's capital sits in someone else's region pam_acting_clerical_region_trigger = { $ARCHBISHOP$ = { save_temporary_scope_as = acting_archbishop_temp @@ -3426,12 +3426,12 @@ pam_acting_clerical_region_trigger = { } } - Cheap pre-filter for HoF merge clerical region title list +# Cheap pre-filter for HoF merge clerical region title list pam_potential_merge_clerical_region_title_trigger = { $TITLE$ = { has_clerical_region = yes is_head_of_faith = no - Absorbed regions stay as empty picker shells until reload + # Absorbed regions stay as empty picker shells until reload clerical_region_size > 0 custom_tooltip = { text = pam_potential_merge_clerical_region_title_same_title_trigger @@ -3471,7 +3471,7 @@ pam_potential_merge_clerical_region_title_trigger = { } } - True when the scoped clerical region title covers at most three distinct de jure duchies (TIT-76192) +# True when the scoped clerical region title covers at most three distinct de jure duchies (TIT-76192) pam_clerical_region_at_most_three_duchies_trigger = { NAND = { any_county_in_clerical_region = { @@ -3518,7 +3518,7 @@ pam_has_adjacent_mergeable_clerical_region_trigger = { } } - Same-faith land in another de jure kingdom +# Same-faith land in another de jure kingdom pam_expand_target_is_same_faith_outside_home_kingdom_trigger = { exists = $TITLE$.kingdom exists = $ARCHBISHOP$.capital_county.kingdom @@ -3534,8 +3534,8 @@ pam_expand_target_is_same_faith_outside_home_kingdom_trigger = { } } - Picked title only chooses the see, then create_clerical_region fills from that county's de jure kingdom - The lowest tier decides who may petition, not how large the region ends up +# Picked title only chooses the see, then create_clerical_region fills from that county's de jure kingdom +# The lowest tier decides who may petition, not how large the region ends up pam_valid_new_clerical_region_anchor_trigger = { trigger_if = { limit = { $PETITIONER$ ?= { has_government = ecclesiastical_government } } @@ -3551,7 +3551,7 @@ pam_valid_new_clerical_region_anchor_trigger = { title_capital_county = { NOT = { exists = clerical_region_title } exists = holder - faith = $PETITIONER$.faith the region takes its faith from this county, and a mismatch destroys the new title + faith = $PETITIONER$.faith # the region takes its faith from this county, and a mismatch destroys the new title OR = { holder = $PETITIONER$ holder = { @@ -3563,7 +3563,7 @@ pam_valid_new_clerical_region_anchor_trigger = { } } - At least one eligible title exists +# At least one eligible title exists pam_valid_expand_ecclesiastical_title_target_trigger = { $ARCHBISHOP$ = { save_temporary_scope_as = archbishop_temp } $TITLE$ = { @@ -3593,7 +3593,7 @@ pam_valid_expand_ecclesiastical_title_target_trigger = { has_clerical_region = yes is_head_of_faith = no holder ?= scope:archbishop_temp - is_adjacent_to_clerical_region = $TITLE$ very unperformant + is_adjacent_to_clerical_region = $TITLE$ # very unperformant } } } @@ -3607,10 +3607,10 @@ pam_valid_expand_ecclesiastical_title_target_trigger = { } } - At least one selectable expand target exists +# At least one selectable expand target exists pam_has_eligible_expand_ecclesiastical_title_target_trigger = { save_temporary_scope_as = archbishop_temp - capital_county.clerical_region_title = { must work like this due to clerical_region_adjacent_duchies behaviour + capital_county.clerical_region_title = { # must work like this due to clerical_region_adjacent_duchies behaviour has_clerical_region = yes is_head_of_faith = no holder ?= scope:archbishop_temp @@ -3629,7 +3629,7 @@ pam_has_eligible_expand_ecclesiastical_title_target_trigger = { pam_can_expand_clerical_region_after_war_trigger = { exists = scope:target - You hold a clerical region that neighbors or is within target + #You hold a clerical region that neighbors or is within target save_temporary_scope_as = archbishop_temp any_held_title = { has_clerical_region = yes @@ -3645,11 +3645,11 @@ pam_can_expand_clerical_region_after_war_trigger = { this = scope:target NOT = { exists = clerical_region_title } } - The rest of the duchy needs to be ready + #The rest of the duchy needs to be ready scope:target = { duchy = { - All counties must have no clerical region - All counties must be within recipient's realm OR held by a same-faith ruler + #All counties must have no clerical region + #All counties must be within recipient's realm OR held by a same-faith ruler any_de_jure_county = { count >= all NOT = { exists = clerical_region_title } @@ -3676,8 +3676,8 @@ pam_can_expand_clerical_region_after_war_trigger = { NOT = { exists = scope:clerical_region_title } } scope:target = { - All counties must have no clerical region - All counties must be within recipient's realm OR held by a same-faith ruler + #All counties must have no clerical region + #All counties must be within recipient's realm OR held by a same-faith ruler any_de_jure_county = { count >= all NOT = { exists = clerical_region_title } @@ -3699,8 +3699,8 @@ pam_can_expand_clerical_region_after_war_trigger = { } scope:target = { any_direct_de_jure_vassal_title = { - All counties must have no clerical region - All counties must be within recipient's realm OR held by a same-faith ruler + #All counties must have no clerical region + #All counties must be within recipient's realm OR held by a same-faith ruler any_de_jure_county = { count >= all NOT = { @@ -3724,7 +3724,7 @@ pam_can_expand_clerical_region_after_war_trigger = { } } - Evaluated in county scope for the Convert Faith cardinal order. +# Evaluated in county scope for the Convert Faith cardinal order. pam_cardinal_order_convert_faith_in_region_county_trigger = { faith != $CARDINAL$.faith exists = holder @@ -3788,7 +3788,7 @@ pam_ai_can_proclaim_armed_pilgrimages_core_trigger = { pam_ai_can_proclaim_struggle_submission_core_trigger = { faith.religion = { this = religion:islam_religion - exists = var:variable_ghw_unlocked You've entered the Age of Crusades + exists = var:variable_ghw_unlocked # You've entered the Age of Crusades } faith = { main_rite = { @@ -3878,7 +3878,7 @@ amicable_infertile_divorce_trigger = { } } - Mendicant Preachers personal tenet: guests a preaching host can win over at an activity +# Mendicant Preachers personal tenet: guests a preaching host can win over at an activity pam_mendicant_preachers_apa_convert_trigger = { this != $PREACHER$ highest_held_title_tier < tier_duchy @@ -3891,8 +3891,8 @@ pam_mendicant_preachers_apa_convert_trigger = { } } - PAM Reincarnation personal tenet: a parent or grandparent that root could claim as a past life - Checked in the forebear's scope, with root as the character doing the remembering +# PAM Reincarnation personal tenet: a parent or grandparent that root could claim as a past life +# Checked in the forebear's scope, with root as the character doing the remembering pam_recallable_forebear_trigger = { save_temporary_scope_as = candidate_forebear is_alive = no @@ -3931,7 +3931,7 @@ divorce_can_cause_house_feud_trigger = { scope:secondary_recipient = { house ?= { any_house_relation = { - Not already feuding or quite fond of one another + #Not already feuding or quite fond of one another OR = { has_house_relation_level = quarrel has_house_relation_level = rivalry @@ -3962,7 +3962,7 @@ divorce_can_cause_holy_order_lease_trigger = { diplomacy >= decent_skill_rating } OR = { - Monastic lease + #Monastic lease scope:divorcer = { any_held_title = { title_tier = county @@ -3981,7 +3981,7 @@ divorce_can_cause_holy_order_lease_trigger = { } } } - Military lease + #Military lease scope:divorcer = { any_held_title = { title_tier = county @@ -4055,17 +4055,17 @@ divorce_can_put_spouse_in_monastery_trigger = { } } - Would a priest consider marriage in Saeculum Obscurum? +# Would a priest consider marriage in Saeculum Obscurum? saeculum_obscurum_clergy_would_marry_trigger = { - Older priests just don't bother + # Older priests just don't bother age < 50 - Must be somewhat inclined + # Must be somewhat inclined NOR = { has_trait = chaste has_trait = celibate } OR = { - Strict personality/actions + # Strict personality/actions has_trait = lustful has_trait = seducer has_trait = rakish @@ -4081,18 +4081,18 @@ saeculum_obscurum_clergy_would_marry_trigger = { this = tenet:tenet_be_fruitful_and_multiply } } - General vibes + # General vibes saeculum_obscurum_clergy_marry_ai_value_trigger = yes } } saeculum_obscurum_would_marry_clergy_trigger = { - General vibes + # General vibes saeculum_obscurum_clergy_marry_ai_value_trigger = yes } saeculum_obscurum_clergy_marry_ai_value_trigger = { - Higher tiers need less honor and zeal, and more boldness + # Higher tiers need less honor and zeal, and more boldness trigger_if = { limit = { highest_held_title_tier > tier_duchy } ai_honor < low_negative_ai_value @@ -4154,7 +4154,7 @@ can_request_priest_from_recipient_trigger = { superior.superior ?= $RECIPIENT$ } } - A realm under an antipope asks them instead + # A realm under an antipope asks them instead religious_head_or_challenger ?= $RECIPIENT$ trigger_if = { limit = { NOT = { exists = faith.religious_head } } @@ -4163,7 +4163,7 @@ can_request_priest_from_recipient_trigger = { } } - Gates the tenet popularity system, for PAM it's only for Christian faiths. Runs in a faith scope. +# Gates the tenet popularity system, for PAM it's only for Christian faiths. Runs in a faith scope. has_tenet_popularity_trigger = { OR = { religion = religion:catholic_religion @@ -4318,7 +4318,7 @@ pam_clergy_title_interaction_player_recipient_auto_accept_trigger = { clerical_hesitation_from_potential_defender_value <= -2 } situation:the_christian_church ?= { - any_participant_group = { Both characters are involved in the situation + any_participant_group = { # Both characters are involved in the situation any_situation_group_participant = { this = scope:puppet_or_actor } @@ -4445,7 +4445,7 @@ pam_clergy_title_interaction_player_recipient_auto_accept_trigger = { scope:secondary_recipient = { is_allied_to = scope:recipient } - Must be neighboring or overlapping + #Must be neighboring or overlapping scope:target ?= { NOR = { any_de_jure_county = { @@ -4469,7 +4469,7 @@ pam_clergy_title_interaction_player_recipient_auto_accept_trigger = { } } } - PAM Peace of God: is prosecuting an offensive war against a ruler of their own faith. +# PAM Peace of God: is prosecuting an offensive war against a ruler of their own faith. pam_peace_of_god_coreligionist_aggressor_trigger = { save_temporary_scope_as = pam_aggressor any_character_war = { @@ -4495,8 +4495,8 @@ pam_valid_excommunication_target_trigger = { } } } - always valid if Hof - This trigger is only relevant if excommunicator is not + #always valid if Hof + #This trigger is only relevant if excommunicator is not trigger_if = { limit = { scope:target_char = { need_hof_for_clergy_interaction_trigger = yes } @@ -4516,19 +4516,19 @@ pam_valid_excommunication_target_trigger = { } } trigger_else = { - If there is no HoF, a clergy HoR can take it + # If there is no HoF, a clergy HoR can take it trigger_if = { limit = { NOT = { exists = scope:target_char.faith.religious_head } scope:target_char.rite.head_of_rite ?= $EXCOMMUNICATOR$ } } - Wanderers and courtiers + #Wanderers and courtiers trigger_else_if = { limit = { is_ruler = no } - Courtiers + #Courtiers trigger_if = { limit = { exists = liege @@ -4559,7 +4559,7 @@ pam_valid_excommunication_target_trigger = { } } } - Wanderers + #Wanderers trigger_else = { custom_tooltip = { text = bishop_excommunication_target_wanderer_tt @@ -4587,7 +4587,7 @@ pam_valid_excommunication_target_trigger = { } } } - Theocrats/ecclesiasticals + #Theocrats/ecclesiasticals trigger_else_if = { limit = { government_has_flag = government_is_theocracy @@ -4620,7 +4620,7 @@ pam_valid_excommunication_target_trigger = { } } - Secular rulers + #Secular rulers trigger_else = { custom_tooltip = { text = bishop_excommunication_target_secular_tt @@ -4961,11 +4961,11 @@ incite_claim_war_title_can_be_picked_trigger = { } } incite_holy_war_ai_invalidation_trigger = { - One condition must be true, and none of the NOR true + #One condition must be true, and none of the NOR true OR = { $SECONDARY$ = { ai_zeal >= 80 } $SECONDARY$ = { ai_boldness >= 100 } - Being forced to (despite having precariously comparable mil strength) + #Being forced to (despite having precariously comparable mil strength) scope:use_hook ?= yes trigger_if = { limit = { @@ -4980,7 +4980,7 @@ incite_holy_war_ai_invalidation_trigger = { scope:join_war ?= yes scope:puppet_or_actor.current_military_strength >= $RECIPIENT$.half_current_military_strength } - Can probably win + #Can probably win trigger_if = { limit = { exists = $SECONDARY$ @@ -5153,7 +5153,7 @@ pam_request_white_peace_war_with_enemy_trigger = { } pam_request_victory_war_with_enemy_trigger = { has_valid_casus_belli = yes - A war the design will not let you negotiate to a white peace is not one the clergy may rule won either + #A war the design will not let you negotiate to a white peace is not one the clergy may rule won either is_white_peace_possible = yes NOR = { using_cb = undirected_great_holy_war @@ -5177,10 +5177,10 @@ pam_request_victory_war_with_enemy_trigger = { } } -A war that can already be won outright, so there is nothing for the clergy to do +#A war that can already be won outright, so there is nothing for the clergy to do pam_request_victory_war_already_won_trigger = { has_valid_casus_belli = yes - Kept in step with pam_request_victory_war_with_enemy_trigger so an ineligible war cannot block an eligible one + #Kept in step with pam_request_victory_war_with_enemy_trigger so an ineligible war cannot block an eligible one is_white_peace_possible = yes NOR = { using_cb = undirected_great_holy_war @@ -5489,8 +5489,8 @@ pam_evangelize_selected_tenet_prohibited_trigger = { } } - scope:pam_evangelize_tenet_check is the tenet being weighed on a character - Saved scope not $TENET$: a macro inside a quoted script value drops the opening parenthesis +# scope:pam_evangelize_tenet_check is the tenet being weighed on a character +# Saved scope not $TENET$: a macro inside a quoted script value drops the opening parenthesis pam_evangelize_tenet_below_very_popular_trigger = { "faith.tenet_popularity(scope:pam_evangelize_tenet_check)" < tenet_popularity_very_popular_threshold } @@ -5545,8 +5545,8 @@ pam_pope_is_head_of_faith_or_rite_trigger = { } } - Cardinal scope needs $POPE$ here - Both dynasty sides need exists or two lowborn prelates match each other +# Cardinal scope needs $POPE$ here +# Both dynasty sides need exists or two lowborn prelates match each other pam_cardinal_is_nepotistic_appointment_trigger = { OR = { AND = { @@ -5559,8 +5559,8 @@ pam_cardinal_is_nepotistic_appointment_trigger = { } } - $TITLE$ is the seat that heads this character's Church, and this runs on a character - Rome is named directly: headless Chalcedonianism has no religious_head_title to compare +# $TITLE$ is the seat that heads this character's Church, and this runs on a character +# Rome is named directly: headless Chalcedonianism has no religious_head_title to compare pam_title_is_church_seat_trigger = { OR = { $TITLE$ = title:k_papal_state @@ -5583,7 +5583,7 @@ pam_holds_christian_patriarch_title_trigger = { } } - While Chalcedonianism is headless the Pope heads it as head of rite +# While Chalcedonianism is headless the Pope heads it as head of rite pam_holds_church_seat_trigger = { OR = { any_held_title = { is_head_of_faith = yes } @@ -5594,7 +5594,7 @@ pam_holds_church_seat_trigger = { pam_college_election_title_has_electors_trigger = { trigger_if = { limit = { exists = faith.religious_head_title } - any_elector rather than a bare exists: is_candidate_from_set errors on a title with no election law. + # any_elector rather than a bare exists: is_candidate_from_set errors on a title with no election law. faith.religious_head_title = { any_elector = {} } } trigger_else = { @@ -5612,7 +5612,7 @@ pam_college_election_title_is_theocratic_elective_trigger = { } } - Character scope. Do they sit on the Church seat the College of Cardinals elects? +# Character scope. Do they sit on the Church seat the College of Cardinals elects? pam_holds_college_elected_church_seat_trigger = { pam_holds_church_seat_trigger = yes pam_college_election_title_has_electors_trigger = yes @@ -5636,12 +5636,12 @@ pam_is_college_election_candidate_trigger = { } } } - trigger_else = { Error log suppressing + trigger_else = { # Error log suppressing always = no } } - We check the clerical title, because the government flag and is_clergy miss many PAM prelates +# We check the clerical title, because the government flag and is_clergy miss many PAM prelates pam_is_investiture_clergy_trigger = { OR = { any_held_title = { has_clerical_region = yes } @@ -5650,7 +5650,7 @@ pam_is_investiture_clergy_trigger = { } } - Only landed county tier and above, because temple baronies match has_clerical_region and flood the guests +# Only landed county tier and above, because temple baronies match has_clerical_region and flood the guests pam_is_investiture_landed_prelate_trigger = { is_landed = yes highest_held_title_tier >= tier_county @@ -5666,7 +5666,7 @@ pam_valid_ecumenical_council_voter_trigger = { pam_is_investiture_clergy_trigger = yes rite.head_of_rite ?= this has_variable = investiture_stance - puppet:X errors on non-playable characters, and only landed county tier rulers own that puppet + # puppet:X errors on non-playable characters, and only landed county tier rulers own that puppet AND = { is_landed = yes highest_held_title_tier >= tier_county @@ -5735,7 +5735,7 @@ pam_ec_doctrine_is_change_trigger = { } } - The AI Conservative named to oppose the host in this debate; stands down while a player argues the Conservative side +# The AI Conservative named to oppose the host in this debate; stands down while a player argues the Conservative side pam_ec_is_active_counterplayer_trigger = { is_ai = yes is_in_guest_subset = { name = conservative } @@ -5751,7 +5751,7 @@ pam_ec_is_active_counterplayer_trigger = { } } - AI proposers who may skip the nearest-step rule at an Ecumenical Council +# AI proposers who may skip the nearest-step rule at an Ecumenical Council pam_ec_doctrine_extremist_proposer_trigger = { OR = { has_trait = herald @@ -5763,7 +5763,7 @@ pam_ec_doctrine_extremist_proposer_trigger = { } } - The proposed scope:ec_step_to is the closest step from the held scope:ec_step_from that the rite can choose +# The proposed scope:ec_step_to is the closest step from the held scope:ec_step_from that the rite can choose pam_ec_doctrine_is_nearest_step_trigger = { NOT = { root = { @@ -5865,7 +5865,7 @@ pam_custom_kingdom_can_claim_duchy_exclave_trigger = { kingdom.title_capital_county ?= this } } - Is not only duchy in kingdom + #Is not only duchy in kingdom kingdom = { any_direct_de_jure_vassal_title = { tier = tier_duchy @@ -5881,7 +5881,7 @@ pam_custom_kingdom_can_claim_duchy_exclave_trigger = { } } } - Is not controlled by de jure liege + #Is not controlled by de jure liege trigger_if = { limit = { exists = kingdom.holder @@ -5896,7 +5896,7 @@ pam_custom_kingdom_can_claim_duchy_exclave_trigger = { } } } - Not bordering any other county of de jure kingdom (not held by new king) + #Not bordering any other county of de jure kingdom (not held by new king) NOT = { any_de_jure_county = { save_temporary_scope_as = county_temp @@ -5949,7 +5949,7 @@ pam_custom_empire_can_claim_kingdom_exclave_trigger = { empire.title_capital_county ?= this } } - Is not only kingdom in empire + #Is not only kingdom in empire empire = { any_direct_de_jure_vassal_title = { tier = tier_kingdom @@ -5965,7 +5965,7 @@ pam_custom_empire_can_claim_kingdom_exclave_trigger = { } } } - Is not controlled by de jure liege + #Is not controlled by de jure liege trigger_if = { limit = { exists = empire.holder @@ -5980,7 +5980,7 @@ pam_custom_empire_can_claim_kingdom_exclave_trigger = { } } } - Not bordering any other county of de jure empire (not held by new empire) + #Not bordering any other county of de jure empire (not held by new empire) NOT = { any_de_jure_county = { save_temporary_scope_as = county_temp @@ -6023,7 +6023,7 @@ ai_religious_request_blocker_trigger = { is_ai = yes scope:recipient = { is_ai = no } } - Each religious request has its own cooldown against a player Head of Faith + # Each religious request has its own cooldown against a player Head of Faith NOT = { scope:recipient = { has_character_flag = $INTERACTION$_received_cooldown } } } } @@ -6066,7 +6066,7 @@ target_valid_ecclesiastical_de_jure_shifting_trigger = { } } } - AI should only do direct borders, not over water - ew gross + #AI should only do direct borders, not over water - ew gross trigger_if = { limit = { scope:puppet_or_actor = { @@ -6117,7 +6117,7 @@ clergy_interaction_generic_piety_level_or_puppet_req_trigger = { } } -Title scope. An uncreated title the petitioner already has a foothold in; scope:puppet_or_actor is the petitioning ruler. +#Title scope. An uncreated title the petitioner already has a foothold in; scope:puppet_or_actor is the petitioning ruler. target_valid_request_unformed_title_trigger = { is_landless_type_title = no is_head_of_faith = no @@ -6474,7 +6474,7 @@ pam_reaffirm_doctrine_consanguinity_accept_trigger = { } skill_support_trigger = { - AI precautions + #AI precautions trigger_if = { limit = { is_ai = yes @@ -6497,7 +6497,7 @@ skill_support_trigger = { } } piety_support_trigger = { - AI precautions + #AI precautions trigger_if = { limit = { is_ai = yes @@ -6556,7 +6556,7 @@ piety_support_trigger = { } } dread_support_trigger = { - AI precautions + #AI precautions trigger_if = { limit = { is_ai = yes @@ -6583,7 +6583,7 @@ dread_support_secular_trigger = { } } friendly_support_base_trigger = { - AI precautions + #AI precautions trigger_if = { limit = { is_ai = yes @@ -6634,7 +6634,7 @@ friendly_support_secular_trigger = { } } lunacy_support_trigger = { - AI precautions + #AI precautions trigger_if = { limit = { is_ai = yes @@ -6696,8 +6696,8 @@ lunacy_support_trigger = { } } - 5+ counties so small dukes do not found theocracies - When no theocratic vassal exists we skip the percent scan so this stays fast +# 5+ counties so small dukes do not found theocracies +# When no theocratic vassal exists we skip the percent scan so this stays fast realm_theocratic_county_share_ai_below_cap_trigger = { any_sub_realm_county = { count >= 5 @@ -6721,7 +6721,7 @@ realm_theocratic_county_share_player_below_cap_trigger = { } } - The granting ruler is root, and scope:title is the highest-tier title being granted +# The granting ruler is root, and scope:title is the highest-tier title being granted pam_nomad_grant_settled_government_trigger = { OR = { government_has_flag = government_is_nomadic @@ -6741,7 +6741,7 @@ pam_nomad_grant_settled_government_trigger = { } } - Follows settle_people_decision ai_potential so an AI nomad always or never grants settled holdings +# Follows settle_people_decision ai_potential so an AI nomad always or never grants settled holdings pam_nomad_inclined_to_settle_trigger = { NOR = { has_trait = greatest_of_khans @@ -6760,18 +6760,18 @@ pam_nomad_inclined_to_settle_trigger = { } } - Artifact scope +# Artifact scope pam_holy_weapon_trigger = { is_equipped = yes artifact_slot_type = primary_armament is_holy_relic_for = artifact_owner.faith } - - Harmonious Society - the Five Bonds - - A bond only counts while it is actually kept, so each one asks for a living partner who thinks - well of the scoped character. 50 opinion is the threshold throughout. +############################################### +# Harmonious Society - the Five Bonds +############################################### +# A bond only counts while it is actually kept, so each one asks for a living partner who thinks +# well of the scoped character. 50 opinion is the threshold throughout. pam_five_bonds_ruler_subject_trigger = { OR = { @@ -6841,7 +6841,7 @@ pam_five_bonds_friend_trigger = { } } - Same rules as release_from_prison_interaction and only valid inside that interaction +# Same rules as release_from_prison_interaction and only valid inside that interaction tenet_benevolent_governance_unconditional_release_trigger = { scope:demand_conversion = no scope:renounce_claims = no @@ -6864,11 +6864,11 @@ theocratic_lay_clergy_trigger = { rite = { rite_has_doctrine = doctrine_theocracy_lay_clergy } } OR = { - Cardinals + # Cardinals exists = clerical_elector_title - Archdioceses + # Archdioceses primary_title ?= { has_clerical_region = yes } - Other landless explicit clergy + # Other landless explicit clergy AND = { is_landed = no is_clergy = yes @@ -6879,13 +6879,13 @@ theocratic_lay_clergy_trigger = { pam_is_clerical_comprehensive_trigger = { OR = { - Cardinals + # Cardinals exists = clerical_elector_title - Archdioceses + # Archdioceses primary_title ?= { has_clerical_region = yes } - Landed and landless ecclesiastical rulers + # Landed and landless ecclesiastical rulers government_has_flag = government_is_ecclesiastical - Other landless explicit clergy + # Other landless explicit clergy AND = { is_landed = no is_clergy = yes @@ -6893,7 +6893,7 @@ pam_is_clerical_comprehensive_trigger = { } } - Current scope is a faith and root is the character choosing the personal tenet +# Current scope is a faith and root is the character choosing the personal tenet pam_personal_syncretism_faith_matches_trigger = { OR = { AND = { @@ -6935,12 +6935,12 @@ pam_personal_syncretism_faith_matches_trigger = { } } - Exile pool eligibility probe for the personal syncretism decision tooltip. +# Exile pool eligibility probe for the personal syncretism decision tooltip. pam_personal_syncretism_exile_rite_probe_trigger = { pam_personal_syncretism_exile_rite_trigger = yes } - Valid exile pool entry for the personal syncretism decision. +# Valid exile pool entry for the personal syncretism decision. pam_personal_syncretism_exile_rite_trigger = { exists = var:converted_development var:converted_development >= 1 @@ -6992,7 +6992,7 @@ pam_personal_syncretism_invite_exiles_available_trigger = { } pam_personal_syncretism_county_bonus_trigger = { - The yearly pulse evaluates this on a held county; root is its ruler. + # The yearly pulse evaluates this on a held county; root is its ruler. root = { has_personal_tenet_flag = tenet_syncretism_county_bonus } @@ -7001,11 +7001,11 @@ pam_personal_syncretism_county_bonus_trigger = { } } +############################################### +# Holy Myron - Holy Myron - - Until pam_holy_myron.0002 destroys it, an emptied vessel stays as an artifact - trigger_if keeps the variable fetch from evaluating on ordinary artifacts +# Until pam_holy_myron.0002 destroys it, an emptied vessel stays as an artifact +# trigger_if keeps the variable fetch from evaluating on ordinary artifacts pam_is_holy_myron_artifact_trigger = { trigger_if = { limit = { has_variable = pam_holy_myron_charges } @@ -7016,7 +7016,7 @@ pam_is_holy_myron_artifact_trigger = { } } - Character scope: owns an ampulla with oil left to spend. +# Character scope: owns an ampulla with oil left to spend. pam_has_usable_holy_myron_trigger = { any_character_artifact = { pam_is_holy_myron_artifact_trigger = yes @@ -7043,8 +7043,8 @@ eligible_for_pam_legacy_trigger = { } } - - Religious Study scheme +############################################### +# Religious Study scheme pam_study_scripture_pursuit_of_knowledge_trigger = { OR = { @@ -7067,7 +7067,7 @@ pam_study_scripture_confession_tenet_trigger = { } } - An eloquent cleric root could learn homiletics from +# An eloquent cleric root could learn homiletics from pam_study_scripture_preacher_trigger = { diplomacy >= 8 is_physically_able_ai_adult = yes @@ -7100,7 +7100,7 @@ pam_study_scripture_mysticism_trigger = { } } - A vow of chastity, or a marriage the Church has just dissolved, keeps a character off the marriage market. +# A vow of chastity, or a marriage the Church has just dissolved, keeps a character off the marriage market. pam_under_clerical_marriage_restraint_trigger = { OR = { has_character_modifier = clerical_chastity_vow_modifier @@ -7108,7 +7108,7 @@ pam_under_clerical_marriage_restraint_trigger = { } } - Only the AI is held to this: a player may still discard the vow's intent and arrange the match anyway. +# Only the AI is held to this: a player may still discard the vow's intent and arrange the match anyway. pam_ai_marriage_respects_clerical_restraint_trigger = { trigger_if = { limit = { @@ -7121,7 +7121,7 @@ pam_ai_marriage_respects_clerical_restraint_trigger = { } } - $SLOT$ is the papabile shortlist seat being claimed +# $SLOT$ is the papabile shortlist seat being claimed pam_papabile_slot_open_to_trigger = { exists = clerical_elector_title NOT = { has_variable = pam_refuses_papacy } @@ -7151,13 +7151,13 @@ pam_papabile_barred_by_clerical_gender_trigger = { } } - Divergent rites only: an Ecumenical Council can give the main rite Lay Clergy, and its College must still have candidates +# Divergent rites only: an Ecumenical Council can give the main rite Lay Clergy, and its College must still have candidates pam_papabile_barred_by_lay_clergy_trigger = { rite ?= { rite_has_doctrine = doctrine_theocracy_lay_clergy } rite != faith.main_rite } - Only the patron's own personal tenets may be imposed, and not one the order already advocates. +# Only the patron's own personal tenets may be imposed, and not one the order already advocates. pam_reform_order_tenet_option_shown_trigger = { scope:actor = { has_personal_tenet = $TENET$ @@ -7212,7 +7212,7 @@ monastic_movement_non_order_size_reqs_trigger = { } } - Core tenet or personal pick; shared by scheme success/prediction +# Core tenet or personal pick; shared by scheme success/prediction pam_study_rite_tenet_bonus_trigger = { OR = { rite ?= { rite_has_parameter = $PARAM$ } diff --git a/events/dlc/tgp/tgp_japan_decision_events.txt b/events/dlc/tgp/tgp_japan_decision_events.txt new file mode 100644 index 000000000..d60296d86 --- /dev/null +++ b/events/dlc/tgp/tgp_japan_decision_events.txt @@ -0,0 +1,3282 @@ + +#namespace = tgp_japan_decision# tgp_japan_establish_house_fief_decision +# +#scripted_effect tgp_establish_house_fief_save_scopes_effect = { +# top_liege ?= { save_scope_as = regent } +# +# save_scope_as = new_head +# house = { +# save_scope_as = old_house +# house_head = { save_scope_as = old_head } +# } +# random_held_title = { +# limit = { is_noble_family_title = yes } +# save_scope_as = old_nf_title +# } +#} +#tgp_japan_decision.9001 = { # CHOOSE HOUSE NAME EVENT - WITH WIDGET +# type = character_event +# +# title = { +# first_valid = { +# triggered_desc = { +# trigger = { has_character_flag = establish_house_fief } +# desc = tgp_japan_decision.9001.t.fief +# } +# desc = tgp_japan_decision.9001.t.cadet +# } +# } +# desc = { +# first_valid = { +# triggered_desc = { +# trigger = { +# this != scope:old_head +# has_character_flag = establish_house_fief +# } +# desc = tgp_japan_decision.9001.desc.fief_split_house +# } +# desc = tgp_japan_decision.9001.desc.cadet +# } +# first_valid = { +# triggered_desc = { +# trigger = { +# has_character_flag = establish_house_fief +# var:petition_liege_house_fief_allowed_flag ?= top_liege +# top_liege = { government_has_mechanic = administrative } +# } +# desc = tgp_japan_decision.9001.desc.permission +# } +# triggered_desc = { +# trigger = { +# has_character_flag = establish_house_fief +# top_liege = { government_has_mechanic = administrative } +# } +# desc = tgp_japan_decision.9001.desc.crime +# } +# triggered_desc = { +# trigger = { has_character_flag = establish_house_fief } +# desc = tgp_japan_decision.9001.desc.feudal +# } +# } +# desc = tgp_japan_decision.9001.desc.fief_name +# } +# theme = realm +# left_portrait = { +# character = root +# +# animation = thinking +# } +# lower_left_portrait = { +# character = scope:old_head +# trigger = { +# NOR = { +# scope:regent ?= this +# root = this +# } +# } +# } +# lower_right_portrait = scope:regent +# #NAMING WIDGET +# widget = { +# +# gui = "event_window_widget_enter_text" +# container = "dynamic_birth_name" +# controller = { +# type = text +# data = { +# key = new_japanese_house_name +# default = { +# localization_key = dynn_Abe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Abe } } +# } +# default = { +# localization_key = dynn_Adachi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Adachi } } +# } +# default = { +# localization_key = dynn_Aida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Aida } } +# } +# default = { +# localization_key = dynn_Aihara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Aihara } } +# } +# default = { +# localization_key = dynn_AikO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_AikO_ } } +# } +# default = { +# localization_key = dynn_Akamatsu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akamatsu } } +# } +# default = { +# localization_key = dynn_Akasu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akasu } } +# } +# default = { +# localization_key = dynn_Akata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akata } } +# } +# default = { +# localization_key = dynn_Akahori +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akahori } } +# } +# default = { +# localization_key = dynn_Akatsuka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akatsuka } } +# } +# default = { +# localization_key = dynn_Akazawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akazawa } } +# } +# default = { +# localization_key = dynn_Akiyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akiyama } } +# } +# default = { +# localization_key = dynn_Akizuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Akizuki } } +# } +# default = { +# localization_key = dynn_Amago +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Amago } } +# } +# default = { +# localization_key = dynn_Amano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Amano } } +# } +# default = { +# localization_key = dynn_Amenomori +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Amenomori } } +# } +# default = { +# localization_key = dynn_Anami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Anami } } +# } +# default = { +# localization_key = dynn_Ano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ano } } +# } +# default = { +# localization_key = dynn_Anzai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Anzai } } +# } +# default = { +# localization_key = dynn_Aoyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Aoyama } } +# } +# default = { +# localization_key = dynn_Asaba +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asaba } } +# } +# default = { +# localization_key = dynn_Asaka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asaka } } +# } +# default = { +# localization_key = dynn_Asakura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asakura } } +# } +# default = { +# localization_key = dynn_Asami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asami } } +# } +# default = { +# localization_key = dynn_Asano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asano } } +# } +# default = { +# localization_key = dynn_Asari +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asari } } +# } +# default = { +# localization_key = dynn_Ashida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ashida } } +# } +# default = { +# localization_key = dynn_Ashikaga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ashikaga } } +# } +# default = { +# localization_key = dynn_Ashina_JP +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ashina_JP } } +# } +# default = { +# localization_key = dynn_Aso +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Aso } } +# } +# default = { +# localization_key = dynn_Asuke +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Asuke } } +# } +# default = { +# localization_key = dynn_Atobe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Atobe } } +# } +# default = { +# localization_key = dynn_Awata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Awata } } +# } +# default = { +# localization_key = dynn_Bessho +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Bessho } } +# } +# default = { +# localization_key = dynn_Chiba +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Chiba } } +# } +# default = { +# localization_key = dynn_Chichibu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Chichibu } } +# } +# default = { +# localization_key = dynn_ChO_sokabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ChO_sokabe } } +# } +# default = { +# localization_key = dynn_Date +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Date } } +# } +# default = { +# localization_key = dynn_Deura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Deura } } +# } +# default = { +# localization_key = dynn_Doi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Doi } } +# } +# default = { +# localization_key = dynn_Ebina +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ebina } } +# } +# default = { +# localization_key = dynn_Ema +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ema } } +# } +# default = { +# localization_key = dynn_Fukushima +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Fukushima } } +# } +# default = { +# localization_key = dynn_Furuichi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Furuichi } } +# } +# default = { +# localization_key = dynn_Hachisuka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hachisuka } } +# } +# default = { +# localization_key = dynn_Haga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Haga } } +# } +# default = { +# localization_key = dynn_HanyU__2 +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_HanyU__2 } } +# } +# default = { +# localization_key = dynn_Hara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hara } } +# } +# default = { +# localization_key = dynn_Harada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Harada } } +# } +# default = { +# localization_key = dynn_Haraishi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Haraishi } } +# } +# default = { +# localization_key = dynn_Hasuike +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hasuike } } +# } +# default = { +# localization_key = dynn_Hatano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hatano } } +# } +# default = { +# localization_key = dynn_Hatakeyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hatakeyama } } +# } +# default = { +# localization_key = dynn_Hatta +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hatta } } +# } +# default = { +# localization_key = dynn_Hattori +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hattori } } +# } +# default = { +# localization_key = dynn_Hayami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hayami } } +# } +# default = { +# localization_key = dynn_Hayashi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hayashi } } +# } +# default = { +# localization_key = dynn_Henmi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Henmi } } +# } +# default = { +# localization_key = dynn_Higuchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Higuchi } } +# } +# default = { +# localization_key = dynn_Hiki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hiki } } +# } +# default = { +# localization_key = dynn_Hikida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hikida } } +# } +# default = { +# localization_key = dynn_Hiraga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hiraga } } +# } +# default = { +# localization_key = dynn_Hirukawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hirukawa } } +# } +# default = { +# localization_key = dynn_Hizume +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hizume } } +# } +# default = { +# localization_key = dynn_HO_jO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_HO_jO_ } } +# } +# default = { +# localization_key = dynn_Honda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Honda } } +# } +# default = { +# localization_key = dynn_HonjO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_HonjO_ } } +# } +# default = { +# localization_key = dynn_Hoshina +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hoshina } } +# } +# default = { +# localization_key = dynn_Hosokawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hosokawa } } +# } +# default = { +# localization_key = dynn_Hotta +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hotta } } +# } +# default = { +# localization_key = dynn_Hozumi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Hozumi } } +# } +# default = { +# localization_key = dynn_Iba_JP +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Iba_JP } } +# } +# default = { +# localization_key = dynn_Ichiji +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ichiji } } +# } +# default = { +# localization_key = dynn_Iga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Iga } } +# } +# default = { +# localization_key = dynn_Ii +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ii } } +# } +# default = { +# localization_key = dynn_Iida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Iida } } +# } +# default = { +# localization_key = dynn_Iinuma +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Iinuma } } +# } +# default = { +# localization_key = dynn_Ikeda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ikeda } } +# } +# default = { +# localization_key = dynn_Ikoma +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ikoma } } +# } +# default = { +# localization_key = dynn_Imai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Imai } } +# } +# default = { +# localization_key = dynn_Imagawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Imagawa } } +# } +# default = { +# localization_key = dynn_Ina +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ina } } +# } +# default = { +# localization_key = dynn_Inage +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Inage } } +# } +# default = { +# localization_key = dynn_Inazawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Inazawa } } +# } +# default = { +# localization_key = dynn_Inomata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Inomata } } +# } +# default = { +# localization_key = dynn_Inoue +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Inoue } } +# } +# default = { +# localization_key = dynn_IntO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_IntO_ } } +# } +# default = { +# localization_key = dynn_Irie +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Irie } } +# } +# default = { +# localization_key = dynn_Irobe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Irobe } } +# } +# default = { +# localization_key = dynn_Isa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Isa } } +# } +# default = { +# localization_key = dynn_Ishikawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ishikawa } } +# } +# default = { +# localization_key = dynn_Ishitani +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ishitani } } +# } +# default = { +# localization_key = dynn_Isshiki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Isshiki } } +# } +# default = { +# localization_key = dynn_Itakura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Itakura } } +# } +# default = { +# localization_key = dynn_ItO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ItO_ } } +# } +# default = { +# localization_key = dynn_ItO__2 +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ItO__2 } } +# } +# default = { +# localization_key = dynn_Itoga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Itoga } } +# } +# default = { +# localization_key = dynn_Izumi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Izumi } } +# } +# default = { +# localization_key = dynn_Iwamatsu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Iwamatsu } } +# } +# default = { +# localization_key = dynn_Jinbo +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Jinbo } } +# } +# default = { +# localization_key = dynn_Kagami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kagami } } +# } +# default = { +# localization_key = dynn_Kagawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kagawa } } +# } +# default = { +# localization_key = dynn_Kaji +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kaji } } +# } +# default = { +# localization_key = dynn_Kajiwara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kajiwara } } +# } +# default = { +# localization_key = dynn_Kamachi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kamachi } } +# } +# default = { +# localization_key = dynn_Kambara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kambara } } +# } +# default = { +# localization_key = dynn_Kanazu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kanazu } } +# } +# default = { +# localization_key = dynn_Kanbe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kanbe } } +# } +# default = { +# localization_key = dynn_Kaneda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kaneda } } +# } +# default = { +# localization_key = dynn_Kaneko +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kaneko } } +# } +# default = { +# localization_key = dynn_Kano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kano } } +# } +# default = { +# localization_key = dynn_Kasai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kasai } } +# } +# default = { +# localization_key = dynn_Kasuga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kasuga } } +# } +# default = { +# localization_key = dynn_Kasukabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kasukabe } } +# } +# default = { +# localization_key = dynn_Katagiri +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Katagiri } } +# } +# default = { +# localization_key = dynn_Kataoka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kataoka } } +# } +# default = { +# localization_key = dynn_Katsuta +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Katsuta } } +# } +# default = { +# localization_key = dynn_Kawagoe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kawagoe } } +# } +# default = { +# localization_key = dynn_Kawasaki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kawasaki } } +# } +# default = { +# localization_key = dynn_Kawazu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kawazu } } +# } +# default = { +# localization_key = dynn_Kida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kida } } +# } +# default = { +# localization_key = dynn_Kikkawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kikkawa } } +# } +# default = { +# localization_key = dynn_Kikuchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kikuchi } } +# } +# default = { +# localization_key = dynn_Kimotsuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kimotsuki } } +# } +# default = { +# localization_key = dynn_Kira +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kira } } +# } +# default = { +# localization_key = dynn_Kiso +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kiso } } +# } +# default = { +# localization_key = dynn_Kitahara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kitahara } } +# } +# default = { +# localization_key = dynn_KO_no +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KO_no } } +# } +# default = { +# localization_key = dynn_KO_sokabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KO_sokabe } } +# } +# default = { +# localization_key = dynn_Kobayakawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kobayakawa } } +# } +# default = { +# localization_key = dynn_Kodama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kodama } } +# } +# default = { +# localization_key = dynn_Kokubu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kokubu } } +# } +# default = { +# localization_key = dynn_Kosaka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kosaka } } +# } +# default = { +# localization_key = dynn_Kuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kuki } } +# } +# default = { +# localization_key = dynn_Kumabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kumabe } } +# } +# default = { +# localization_key = dynn_Kumagai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kumagai } } +# } +# default = { +# localization_key = dynn_Kumasaka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kumasaka } } +# } +# default = { +# localization_key = dynn_Kurita +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kurita } } +# } +# default = { +# localization_key = dynn_Kutsuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kutsuki } } +# } +# default = { +# localization_key = dynn_Maki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Maki } } +# } +# default = { +# localization_key = dynn_Makino +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Makino } } +# } +# default = { +# localization_key = dynn_Masuda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Masuda } } +# } +# default = { +# localization_key = dynn_Matano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Matano } } +# } +# default = { +# localization_key = dynn_Matsudaira +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Matsudaira } } +# } +# default = { +# localization_key = dynn_Matsura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Matsura } } +# } +# default = { +# localization_key = dynn_Migata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Migata } } +# } +# default = { +# localization_key = dynn_Mikata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mikata } } +# } +# default = { +# localization_key = dynn_Mimura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mimura } } +# } +# default = { +# localization_key = dynn_Minase +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Minase } } +# } +# default = { +# localization_key = dynn_Misawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Misawa } } +# } +# default = { +# localization_key = dynn_Mitai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mitai } } +# } +# default = { +# localization_key = dynn_Mitoya +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mitoya } } +# } +# default = { +# localization_key = dynn_Miura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Miura } } +# } +# default = { +# localization_key = dynn_Miyoshi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Miyoshi } } +# } +# default = { +# localization_key = dynn_Mizokui +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mizokui } } +# } +# default = { +# localization_key = dynn_Mochizuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mochizuki } } +# } +# default = { +# localization_key = dynn_Mogami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mogami } } +# } +# default = { +# localization_key = dynn_Mokusai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mokusai } } +# } +# default = { +# localization_key = dynn_Momonoi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Momonoi } } +# } +# default = { +# localization_key = dynn_Mori_JP # Not prounounced "Mōri" yet +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Mori_JP } } +# } +# default = { +# localization_key = dynn_Murakami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Murakami } } +# } +# default = { +# localization_key = dynn_Murayama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Murayama } } +# } +# default = { +# localization_key = dynn_Nagae +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nagae } } +# } +# default = { +# localization_key = dynn_Nagao +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nagao } } +# } +# default = { +# localization_key = dynn_Nagasa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nagasa } } +# } +# default = { +# localization_key = dynn_NakajO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_NakajO_ } } +# } +# default = { +# localization_key = dynn_Nakamura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nakamura } } +# } +# default = { +# localization_key = dynn_Nakano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nakano } } +# } +# default = { +# localization_key = dynn_Namba +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Namba } } +# } +# default = { +# localization_key = dynn_Namekata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Namekata } } +# } +# default = { +# localization_key = dynn_Nanbu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nanbu } } +# } +# default = { +# localization_key = dynn_NanjO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_NanjO_ } } +# } +# default = { +# localization_key = dynn_Narita +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Narita } } +# } +# default = { +# localization_key = dynn_Nasu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nasu } } +# } +# default = { +# localization_key = dynn_Natsume +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Natsume } } +# } +# default = { +# localization_key = dynn_Nemoto +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nemoto } } +# } +# default = { +# localization_key = dynn_Nezu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nezu } } +# } +# default = { +# localization_key = dynn_Nikaido +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nikaido } } +# } +# default = { +# localization_key = dynn_Niki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Niki } } +# } +# default = { +# localization_key = dynn_Nissai +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nissai } } +# } +# default = { +# localization_key = dynn_Nogi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nogi } } +# } +# default = { +# localization_key = dynn_Nomoto +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nomoto } } +# } +# default = { +# localization_key = dynn_Nose +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nose } } +# } +# default = { +# localization_key = dynn_Noyo +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Noyo } } +# } +# default = { +# localization_key = dynn_Nishina +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nishina } } +# } +# default = { +# localization_key = dynn_Nitta +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nitta } } +# } +# default = { +# localization_key = dynn_Niwa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Niwa } } +# } +# default = { +# localization_key = dynn_O_ba +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_ba } } +# } +# default = { +# localization_key = dynn_O_hara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_hara } } +# } +# default = { +# localization_key = dynn_O_i +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_i } } +# } +# default = { +# localization_key = dynn_O_kawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_kawa } } +# } +# default = { +# localization_key = dynn_O_mi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_mi } } +# } +# default = { +# localization_key = dynn_O_miya +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_miya } } +# } +# default = { +# localization_key = dynn_O_no +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_no } } +# } +# default = { +# localization_key = dynn_O_suga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_suga } } +# } +# default = { +# localization_key = dynn_O_ta +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_ta } } +# } +# default = { +# localization_key = dynn_O_tawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_tawa } } +# } +# default = { +# localization_key = dynn_O_tomo +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_tomo } } +# } +# default = { +# localization_key = dynn_O_uchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_uchi } } +# } +# default = { +# localization_key = dynn_O_zone +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_zone } } +# } +# default = { +# localization_key = dynn_Obata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Obata } } +# } +# default = { +# localization_key = dynn_Obu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Obu } } +# } +# default = { +# localization_key = dynn_Oda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Oda } } +# } +# default = { +# localization_key = dynn_Odagiri +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Odagiri } } +# } +# default = { +# localization_key = dynn_Ogasawara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ogasawara } } +# } +# default = { +# localization_key = dynn_Ogata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ogata } } +# } +# default = { +# localization_key = dynn_Ogawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ogawa } } +# } +# default = { +# localization_key = dynn_Okabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Okabe } } +# } +# default = { +# localization_key = dynn_Okada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Okada } } +# } +# default = { +# localization_key = dynn_Okazaki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Okazaki } } +# } +# default = { +# localization_key = dynn_Onodera +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Onodera } } +# } +# default = { +# localization_key = dynn_Onozaki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Onozaki } } +# } +# default = { +# localization_key = dynn_Osada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Osada } } +# } +# default = { +# localization_key = dynn_Oyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Oyama } } +# } +# default = { +# localization_key = dynn_Oyamada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Oyamada } } +# } +# default = { +# localization_key = dynn_Sado +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sado } } +# } +# default = { +# localization_key = dynn_Sagae +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sagae } } +# } +# default = { +# localization_key = dynn_Sagara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sagara } } +# } +# default = { +# localization_key = dynn_Saji +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Saji } } +# } +# default = { +# localization_key = dynn_Sakuma +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sakuma } } +# } +# default = { +# localization_key = dynn_Sanada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sanada } } +# } +# default = { +# localization_key = dynn_Sano +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sano } } +# } +# default = { +# localization_key = dynn_Sasaki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sasaki } } +# } +# default = { +# localization_key = dynn_Satake +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Satake } } +# } +# default = { +# localization_key = dynn_Satomi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Satomi } } +# } +# default = { +# localization_key = dynn_Sawara +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sawara } } +# } +# default = { +# localization_key = dynn_Seki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Seki } } +# } +# default = { +# localization_key = dynn_Seno_o +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Seno_o } } +# } +# default = { +# localization_key = dynn_Shiba +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shiba } } +# } +# default = { +# localization_key = dynn_Shibuya +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shibuya } } +# } +# default = { +# localization_key = dynn_Shida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shida } } +# } +# default = { +# localization_key = dynn_Shiga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shiga } } +# } +# default = { +# localization_key = dynn_Shima +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shima } } +# } +# default = { +# localization_key = dynn_Shimazu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shimazu } } +# } +# default = { +# localization_key = dynn_ShimokO_be +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ShimokO_be } } +# } +# default = { +# localization_key = dynn_Shinagawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shinagawa } } +# } +# default = { +# localization_key = dynn_ShingU_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ShingU_ } } +# } +# default = { +# localization_key = dynn_Shinmen +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shinmen } } +# } +# default = { +# localization_key = dynn_Shioda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shioda } } +# } +# default = { +# localization_key = dynn_Shionoya +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shionoya } } +# } +# default = { +# localization_key = dynn_Shiratori +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Shiratori } } +# } +# default = { +# localization_key = dynn_SO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SO_ } } +# } +# default = { +# localization_key = dynn_Soga_2 +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Soga } } +# } +# default = { +# localization_key = dynn_Sogabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sogabe } } +# } +# default = { +# localization_key = dynn_SogO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SogO_ } } +# } +# default = { +# localization_key = dynn_SO_ma +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SO_ma } } +# } +# default = { +# localization_key = dynn_SO_sa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SO_sa } } +# } +# default = { +# localization_key = dynn_Sugime +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sugime } } +# } +# default = { +# localization_key = dynn_Sugimoto +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Sugimoto } } +# } +# default = { +# localization_key = dynn_Suzuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Suzuki } } +# } +# default = { +# localization_key = dynn_Tada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tada } } +# } +# default = { +# localization_key = dynn_Taguchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Taguchi } } +# } +# default = { +# localization_key = dynn_Takaoka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Takaoka } } +# } +# default = { +# localization_key = dynn_Takayasu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Takayasu } } +# } +# default = { +# localization_key = dynn_Takeda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Takeda } } +# } +# default = { +# localization_key = dynn_Takeishi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Takeishi } } +# } +# default = { +# localization_key = dynn_Takezaki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Takezaki } } +# } +# default = { +# localization_key = dynn_Tamura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tamura } } +# } +# default = { +# localization_key = dynn_Tanaka +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tanaka } } +# } +# default = { +# localization_key = dynn_Tashiro +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tashiro } } +# } +# default = { +# localization_key = dynn_TO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_TO_ } } +# } +# default = { +# localization_key = dynn_TO_gO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_TO_gO_ } } +# } +# default = { +# localization_key = dynn_Togashi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Togashi } } +# } +# default = { +# localization_key = dynn_Toida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Toida } } +# } +# default = { +# localization_key = dynn_Toki_JP +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Toki_JP } } +# } +# default = { +# localization_key = dynn_Tokiwa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tokiwa } } +# } +# default = { +# localization_key = dynn_Tokuda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tokuda } } +# } +# default = { +# localization_key = dynn_Tokugawa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tokugawa } } +# } +# default = { +# localization_key = dynn_Tomono +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tomono } } +# } +# default = { +# localization_key = dynn_Tomura +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tomura } } +# } +# default = { +# localization_key = dynn_Toshima +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Toshima } } +# } +# default = { +# localization_key = dynn_Tsuchiya +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tsuchiya } } +# } +# default = { +# localization_key = dynn_Tsutsumi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tsutsumi } } +# } +# default = { +# localization_key = dynn_Toyoda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Toyoda } } +# } +# default = { +# localization_key = dynn_Toyoyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Toyoyama } } +# } +# default = { +# localization_key = dynn_Ueda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ueda } } +# } +# default = { +# localization_key = dynn_Uesugi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Uesugi } } +# } +# default = { +# localization_key = dynn_Ui +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ui } } +# } +# default = { +# localization_key = dynn_Uji_ie +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Uji_ie } } +# } +# default = { +# localization_key = dynn_Unno +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Unno } } +# } +# default = { +# localization_key = dynn_Urakami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Urakami } } +# } +# default = { +# localization_key = dynn_Usami +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Usami } } +# } +# default = { +# localization_key = dynn_Ushimaru +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ushimaru } } +# } +# default = { +# localization_key = dynn_Ushioda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Ushioda } } +# } +# default = { +# localization_key = dynn_Usuki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Usuki } } +# } +# default = { +# localization_key = dynn_Wada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Wada } } +# } +# default = { +# localization_key = dynn_Wasada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Wasada } } +# } +# default = { +# localization_key = dynn_Washizu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Washizu } } +# } +# default = { +# localization_key = dynn_Watanabe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Watanabe } } +# } +# default = { +# localization_key = dynn_Watari +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Watari } } +# } +# default = { +# localization_key = dynn_Yamada +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamada } } +# } +# default = { +# localization_key = dynn_Yamaga +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamaga } } +# } +# default = { +# localization_key = dynn_Yamagata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamagata } } +# } +# default = { +# localization_key = dynn_Yamaguchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamaguchi } } +# } +# default = { +# localization_key = dynn_Yamamoto +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamamoto } } +# } +# default = { +# localization_key = dynn_Yamana +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamana } } +# } +# default = { +# localization_key = dynn_Yamauchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yamauchi } } +# } +# default = { +# localization_key = dynn_Yashiro +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yashiro } } +# } +# default = { +# localization_key = dynn_Yasu +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yasu } } +# } +# default = { +# localization_key = dynn_Yasuda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yasuda } } +# } +# default = { +# localization_key = dynn_Yasutomi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yasutomi } } +# } +# default = { +# localization_key = dynn_Yoda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yoda } } +# } +# default = { +# localization_key = dynn_Yokoyama +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yokoyama } } +# } +# default = { +# localization_key = dynn_Yomoda +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yomoda } } +# } +# default = { +# localization_key = dynn_Yoshida +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yoshida } } +# } +# default = { +# localization_key = dynn_YU_ki +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_YU_ki } } +# } +# default = { +# localization_key = dynn_Yuasa +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yuasa } } +# } +# default = { +# localization_key = dynn_Yuri +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Yuri } } +# } +# ### KYOTO +# default = { +# localization_key = dynn_Awata +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Awata } } +# } +# default = { +# localization_key = dynn_Awataguchi +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Awataguchi } } +# } +# default = { +# localization_key = dynn_GojO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_GojO_ } } +# } +# default = { +# localization_key = dynn_IchijO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_IchijO_ } } +# } +# default = { +# localization_key = dynn_Kitabatake +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Kitabatake } } +# } +# default = { +# localization_key = dynn_Konoe +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Konoe } } +# } +# default = { +# localization_key = dynn_KyO_goku +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KyO_goku } } +# } +# default = { +# localization_key = dynn_Nakamikado +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Nakamikado } } +# } +# default = { +# localization_key = dynn_NijO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_NijO_ } } +# } +# default = { +# localization_key = dynn_O_inomikado +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_O_inomikado } } +# } +# default = { +# localization_key = dynn_Rokkaku +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Rokkaku } } +# } +# default = { +# localization_key = dynn_RokujO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_RokujO_ } } +# } +# default = { +# localization_key = dynn_SanjO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SanjO_ } } +# } +# default = { +# localization_key = dynn_ShijO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_ShijO_ } } +# } +# default = { +# localization_key = dynn_Tsuchimikado +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_Tsuchimikado } } +# } +# ### FUJIWARA +# default = { +# localization_key = dynn_AndO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_AndO_ } } +# } +# default = { +# localization_key = dynn_EndO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_EndO_ } } +# } +# default = { +# localization_key = dynn_GotO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_GotO_ } } +# } +# default = { +# localization_key = dynn_KatO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KatO_ } } +# } +# default = { +# localization_key = dynn_KondO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KondO_ } } +# } +# default = { +# localization_key = dynn_KudO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_KudO_ } } +# } +# default = { +# localization_key = dynn_MutO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_MutO_ } } +# } +# default = { +# localization_key = dynn_SaitO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SaitO_ } } +# } +# default = { +# localization_key = dynn_SatO_ +# trigger = { is_target_in_variable_list = { name = japanese_house_names target = flag:dynn_SatO_ } } +# } +# ### OTHER +# default = { +# localization_key = japanese_house_domicile_barony +# trigger = { +# exists = scope:domicile_barony +# trigger_if = { +# limit = { has_variable_list = japanese_house_names } +# variable_list_size = { +# name = japanese_house_names +# value < 2 +# } +# } +# } +# } +# default = { +# localization_key = japanese_house_random_barony +# trigger = { +# exists = scope:random_barony +# NOT = { has_character_flag = found_cadet_branch } +# trigger_if = { +# limit = { has_variable_list = japanese_house_names } +# variable_list_size = { +# name = japanese_house_names +# value < 2 +# } +# } +# } +# } +# default = { +# localization_key = japanese_house_first_name +# trigger = { +# exists = scope:old_head +# has_character_flag = found_cadet_branch +# trigger_if = { +# limit = { has_variable_list = japanese_house_names } +# variable_list_size = { +# name = japanese_house_names +# value < 2 +# } +# } +# } +# } +# default = { +# localization_key = japanese_house_primary_county +# trigger = { +# exists = scope:primary_county +# trigger_if = { +# limit = { has_variable_list = japanese_house_names } +# variable_list_size = { +# name = japanese_house_names +# value < 3 +# } +# } +# } +# } +# default = { +# localization_key = japanese_house_domicile_county +# trigger = { +# exists = scope:domicile_county +# trigger_if = { +# limit = { has_variable_list = japanese_house_names } +# variable_list_size = { +# name = japanese_house_names +# value < 3 +# } +# } +# } +# } +# } +# } +# setup_scope = { +# root = { save_scope_as = text_target } +# } +# } +# +# immediate = { +# top_liege = { save_scope_as = regent } +# setup_japan_house_name_scopes_effect = yes +# hidden_effect = { +# if = { +# limit = { +# NOT = { has_character_flag = found_cadet_branch } +# } +# if = { +# limit = { domicile.domicile_location.county ?= title:c_yamashiro } +# while = { +# count = 3 +# assign_japanese_house_name_options_kyoto_effect = yes +# } +# } +# else = { +# while = { +# count = 3 +# assign_japanese_house_name_options_effect = yes +# } +# } +# } +# else = { +# if = { +# limit = { domicile.domicile_location.county ?= title:c_yamashiro } +# while = { +# count = 1 +# assign_japanese_house_name_options_kyoto_effect = yes +# } +# } +# else = { +# while = { +# count = 1 +# assign_japanese_house_name_options_effect = yes +# } +# } +# } +# } +# if = { +# limit = { is_ai = yes } +# random_list = { +# 10 = { +# trigger = { has_variable_list = japanese_house_names } +# random_in_list = { +# variable = japanese_house_names +# save_scope_as = house_name +# root = { +# set_variable = { +# name = new_japanese_house_name +# value = scope:house_name +# } +# } +# } +# } +# 1 = { +# trigger = { exists = scope:domicile_barony } +# set_variable = { +# name = new_japanese_house_name +# value = flag:japanese_house_domicile_barony +# } +# } +# 1 = { +# trigger = { exists = scope:domicile_county } +# set_variable = { +# name = new_japanese_house_name +# value = flag:japanese_house_domicile_county +# } +# } +# 1 = { +# trigger = { exists = scope:random_barony } +# set_variable = { +# name = new_japanese_house_name +# value = flag:japanese_house_random_barony +# } +# } +# 1 = { +# trigger = { +# exists = scope:old_head +# has_character_flag = found_cadet_branch +# government_has_mechanic = administrative +# } +# set_variable = { +# name = new_japanese_house_name +# value = flag:japanese_house_first_name +# } +# } +# } +# } +# switch = { +# trigger = has_character_flag +# establish_house_fief = { +# tgp_establish_house_fief_save_scopes_effect = yes +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_adopting_feudal_government" +# } +# fallback = { +# play_music_cue = "mx_cue_low_key_positive" +# } +# } +# } +# +# option = { +# name = { +# trigger = { has_character_flag = establish_house_fief } +# text = tgp_japan_decision.9001.a.fief +# } +# name = { +# trigger = { has_character_flag = found_cadet_branch } +# text = tgp_japan_decision.9001.a.cadet +# } +# } +# +# after = { +# clear_variable_list = japanese_house_names +# if = { +# limit = { +# NOT = { has_variable = new_japanese_house_name } +# } +# if = { +# limit = { is_ai = no } +# set_variable = { +# name = new_japanese_house_name +# value = flag:custom +# } +# } +# } +# switch = { +# trigger = has_character_flag +# found_cadet_branch = { +# found_cadet_house_decision_effect = { +# CHARACTER = root +# PRESTIGE = minor_prestige_gain +# } +# #scope:new_title ?= { set_title_name_dynamic = japanese_noble_family_name } +# } +# establish_house_fief = { +# japan_establish_house_fief_effect = yes +# } +# fallback = { +# found_cadet_house_decision_effect = { +# CHARACTER = root +# PRESTIGE = major_prestige_gain +# } +# #scope:new_title ?= { set_title_name_dynamic = japanese_noble_family_name } +# } +# } +# switch = { +# trigger = has_character_flag +# found_cadet_branch = { remove_character_flag = found_cadet_branch } +# establish_house_fief = { remove_character_flag = establish_house_fief } +# } +# if = { # Help AI with Manors to propogate Soryo +# limit = { +# is_ai = yes +# exists = scope:new_title +# exists = domicile +# scope:old_head.domicile ?= { +# has_ongoing_domicile_construction = no +# } +# } +# scope:old_head.domicile = { +# if = { +# limit = { +# has_domicile_building = japanese_manor_main_02 +# root.culture ?= { has_innovation = innovation_manorialism } +# } +# add_domicile_building = japanese_manor_main_03 +# } +# else_if = { +# limit = { +# has_domicile_building = japanese_manor_main_03 +# root.culture ?= { has_innovation = innovation_development_03 } +# } +# add_domicile_building = japanese_manor_main_04 +# } +# else_if = { +# limit = { +# has_domicile_building = japanese_manor_main_04 +# root.culture ?= { has_innovation = innovation_cranes } +# } +# add_domicile_building = japanese_manor_main_05 +# } +# else_if = { +# limit = { +# has_domicile_building = japanese_manor_main_05 +# root.culture ?= { has_innovation = innovation_cranes } +# } +# add_domicile_building = japanese_manor_main_06 +# } +# } +# } +# if = { # JOIN BLOC +# limit = { exists = scope:old_house.house_confederation } +# house = { +# tgp_join_house_bloc_effect = { +# INVITER = scope:old_house +# OPINION = flag:no +# } +# set_cadet_aspiration_cooldown_effect = yes +# } +# } +# } +#} +# +#tgp_japan_decision.9002 = { # SAME CLAN EVENT - NO WIDGET +# type = character_event +# title = { +# first_valid = { +# triggered_desc = { +# trigger = { is_landed = no } +# desc = tgp_japan_decision.9002.t.landless +# } +# desc = tgp_japan_decision.9002.t +# } +# } +# desc = { +# desc = tgp_japan_decision.9002.desc +# first_valid = { +# triggered_desc = { +# trigger = { is_landed = no } +# desc = tgp_japan_decision.9002.desc.landless +# } +# desc = tgp_japan_decision.9002.desc.landed +# } +# first_valid = { +# triggered_desc = { +# trigger = { +# var:petition_liege_house_fief_allowed_flag ?= top_liege +# top_liege = { government_has_mechanic = administrative } +# } +# desc = tgp_japan_decision.9001.desc.permission +# } +# triggered_desc = { +# trigger = { +# top_liege = { government_has_mechanic = administrative } +# } +# desc = tgp_japan_decision.9001.desc.crime +# } +# desc = tgp_japan_decision.9001.desc.feudal +# } +# } +# theme = realm +# left_portrait = { +# character = root +# animation = thinking +# } +# lower_right_portrait = scope:regent +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_adopting_feudal_government" +# tgp_establish_house_fief_save_scopes_effect = yes +# japan_establish_house_fief_effect = yes +# } +# +# option = { +# name = tgp_japan_decision.9002.a +# } +#} +# +#tgp_japan_decision.9005 = { # NOTIFICATION FOR OLD HOUSE HEADS +# type = character_event +# title = { +# triggered_desc = { +# trigger = { +# scope:new_head = { is_landed = no } +# } +# desc = tgp_japan_decision.9005.t.landless +# } +# desc = tgp_japan_decision.9005.t +# } +# desc = tgp_japan_decision.9005.desc +# theme = realm +# +# left_portrait = { +# character = scope:new_head +# animation = war_over_tie +# } +# +# trigger = { +# is_ai = no +# NOT = { scope:new_head ?= this } +# } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_adopting_feudal_government" +# show_as_tooltip = { +# scope:new_head = { +# set_house = scope:new_head.house +# #get_title = scope:new_nf_title +# change_government = japan_feudal_government +# if = { +# limit = { +# NOT = { var:petition_liege_house_fief_allowed_flag ?= scope:regent } +# } +# reverse_add_opinion = { +# modifier = admin_soryo_conquest_crime +# target = scope:regent +# } +# } +# } +# } +# } +# +# option = { +# name = tgp_japan_decision.9005.a +# } +#} +# +## tgp_japan_become_shogun_decision +# +#tgp_japan_decision.9101 = { +# type = character_event +# window = fullscreen_event +# queue_icon = "gfx/interface/icons/splash_icons/splash_japan_feudal.dds" +# title = tgp_japan_decision.9101.t +# desc = tgp_japan_decision.9101.desc +# theme = crown +# override_background = { reference = tgp_fullscreen_japanese_shogunate } +# left_portrait = { +# character = root +# triggered_animation = { +# trigger = { has_trait = devoted } +# animation = war_over_win +# } +# animation = japanese_war_fan +# } +# right_portrait = { +# character = scope:ceremonial_liege +# animation = holding_hu +# } +# +# immediate = { +# save_scope_as = shogun +# tgp_save_realm_ceremonial_liege_effect = yes +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# if = { +# limit = { +# any_vassal = { +# is_landed = yes +# has_government = japan_administrative_government +# highest_held_title_tier >= tier_county +# } +# } +# custom_tooltip = tgp_japan_become_shogun_decision_vassal_revocation_effect +# } +# # Inform Vassals +# every_vassal_or_below = { +# limit = { +# is_ruler = yes +# } +# trigger_event = tgp_japan_decision.9102 +# } +# # Rewards +# japanese_become_shogun_reward_effect = yes +# } +# +# option = { +# name = tgp_japan_decision.9101.a +# } +#} +# +#tgp_japan_decision.9102 = { +# type = character_event +# title = tgp_japan_decision.9102.t +# desc = { +# desc = tgp_japan_decision.9102.desc +# first_valid = { +# triggered_desc = { +# trigger = { exists = scope:title_change } +# desc = tgp_japan_decision.9102.admin +# } +# triggered_desc = { +# trigger = { is_landed = yes } +# desc = tgp_japan_decision.9102.feudal +# } +# desc = tgp_japan_decision.9102.fallback +# } +# } +# theme = realm +# +# left_portrait = { +# character = root +# animation = war_over_win +# } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# } +# +# option = { +# name = { +# text = { +# first_valid = { +# triggered_desc = { +# trigger = { exists = scope:title_change } +# desc = tgp_japan_decision.9102.a.admin +# } +# desc = tgp_japan_decision.9101.a +# } +# } +# } +# if = { +# limit = { +# government_has_flag = government_is_japan_administrative +# } +# change_government = japan_feudal_government +# } +# } +#} +# +## tgp_japan_imperial_branch_decision +# +#tgp_japan_decision.9201 = { +# type = character_event +# title = tgp_japan_decision.9201.t +# desc = { +# desc = tgp_japan_decision.9201.desc +# first_valid = { +# triggered_desc = { +# trigger = { +# exists = scope:minamoto_house +# exists = scope:taira_house +# } +# desc = tgp_japan_decision.9201.both +# } +# triggered_desc = { +# trigger = { exists = scope:minamoto_house } +# desc = tgp_japan_decision.9201.minamoto +# } +# triggered_desc = { +# trigger = { exists = scope:taira_house } +# desc = tgp_japan_decision.9201.taira +# } +# } +# } +# theme = family +# left_portrait = { +# character = root +# animation = throne_room_bow_1 +# } +# right_portrait = { +# character = scope:ceremonial_liege +# animation = holding_hu +# } +# lower_left_portrait = scope:minamoto_head +# lower_center_portrait = { +# character = scope:nearest_emperor +# trigger = { +# NOT = { this = scope:ceremonial_liege } +# } +# } +# lower_right_portrait = scope:taira_head +# override_background = { reference = throne_room_scope } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_restoring_japanese_emperor" +# tgp_save_realm_ceremonial_liege_effect = yes +# scope:ceremonial_liege = { save_scope_as = background_throne_room_scope } +# top_liege = { save_scope_as = liege } +# house = { +# save_scope_as = old_house +# house_head = { save_scope_as = old_house_head } +# } +# set_variable = { +# name = block_dynamic_dynasty_naming +# days = 1 +# } +# } +# +# option = { # Join Existing Minamoto +# name = tgp_japan_decision.9201.a +# trigger = { exists = scope:minamoto_house } +# highlight_portrait = scope:minamoto_house.house_head +# japan_set_house_effect = { NEW_HOUSE = scope:minamoto_house } +# reverse_add_opinion = { +# target = scope:minamoto_head +# modifier = respect_opinion +# opinion = 25 +# } +# ai_chance = { +# base = 5 +# modifier = { +# scope:minamoto_house.house_head = { is_close_family_of = root } +# add = 25 +# } +# } +# } +# +# option = { # Join Existing Taira +# name = tgp_japan_decision.9201.b +# trigger = { exists = scope:taira_house } +# highlight_portrait = scope:taira_house.house_head +# japan_set_house_effect = { NEW_HOUSE = scope:taira_house } +# reverse_add_opinion = { +# target = scope:taira_head +# modifier = respect_opinion +# opinion = 25 +# } +# ai_chance = { +# base = 5 +# modifier = { +# scope:taira_house.house_head = { is_close_family_of = root } +# add = 25 +# } +# } +# } +# +# option = { # Found New Minamoto +# name = tgp_japan_decision.9201.c +# trigger = { +# NOT = { exists = scope:minamoto_house } +# } +# # Prestige cost for not joining existing +# if = { +# limit = { exists = scope:taira_house } +# add_prestige = medium_prestige_loss +# } +# custom_tooltip = { +# text = tgp_japan_decision.9201.c.tt +# create_dynasty = { +# name = dynn_Minamoto +# coat_of_arms = japanese_minamoto_seiwa +# spread_to_descendants = yes +# save_scope_as = new_dynasty +# } +# scope:new_dynasty ?= { +# set_coa = dynasty:japanese_minamoto_seiwa +# set_variable = { name = minamoto_flag } +# hidden_effect = { add_dynasty_prestige_level = 4 } +# } +# house = { +# save_scope_as = new_house +# set_coa = dynasty:japanese_minamoto_seiwa +# set_house_name = new_honsei_house_name +# } +# } +# if = { +# limit = { government_allows = noble_families } +# create_noble_family_effect = { GOVERNMENT_GIVER = this } +# } +# ai_chance = { +# base = 25 +# modifier = { # Avoid AI creating both +# exists = scope:taira_house +# add = -20 +# } +# } +# } +# +# option = { # Found New Taira +# name = tgp_japan_decision.9201.d +# trigger = { +# NOT = { exists = scope:taira_house } +# } +# # Prestige cost for not joining existing +# if = { +# limit = { exists = scope:minamoto_house } +# add_prestige = medium_prestige_loss +# } +# custom_tooltip = { +# text = tgp_japan_decision.9201.d.tt +# create_dynasty = { +# name = dynn_Taira +# coat_of_arms = japanese_taira_kanmu +# spread_to_descendants = yes +# save_scope_as = new_dynasty +# } +# scope:new_dynasty ?= { +# set_coa = dynasty:japanese_taira_kanmu +# set_variable = { name = taira_flag } +# hidden_effect = { add_dynasty_prestige_level = 4 } +# } +# house = { +# save_scope_as = new_house +# set_coa = dynasty:japanese_taira_kanmu +# set_house_name = new_honsei_house_name +# } +# } +# if = { +# limit = { government_allows = noble_families } +# create_noble_family_effect = { GOVERNMENT_GIVER = this } +# } +# ai_chance = { +# base = 25 +# modifier = { # Avoid AI creating both +# exists = scope:minamoto_house +# add = -20 +# } +# } +# } +# +# after = { +# if = { # JOIN BLOC +# limit = { exists = scope:old_house.house_confederation } +# house = { +# tgp_join_house_bloc_effect = { +# INVITER = scope:old_house +# OPINION = flag:no +# } +# } +# } +# # Move to 'Kingdom' if necessary +# if = { +# limit = { +# is_ruler = no +# top_liege != scope:regent +# } +# scope:regent = { add_courtier = root } +# } +# # Message +# if = { +# limit = { exists = scope:new_house } +# hidden_effect = { +# every_player = { +# limit = { top_liege = title:e_japan.holder } +# send_interface_message = { +# type = event_generic_neutral +# title = tgp_japan_decision.9201.message_title +# left_icon = root +# right_icon = scope:nearest_emperor +# show_as_tooltip = { +# root = { set_house = scope:new_house } +# } +# } +# } +# } +# } +# # ERROR SUPPRESSION +# if = { +# limit = { +# has_variable = fujiwara_flag +# has_variable = minamoto_flag +# has_variable = taira_flag +# } +# } +# } +#} +# +## tgp_japan_emperor_restoration_decision +# +#tgp_japan_decision.9301 = { +# type = character_event +# title = tgp_japan_decision.9301.t +# desc = tgp_japan_decision.9301.desc +# theme = crown +# +# left_portrait = { +# character = root +# animation = holding_hu +# } +# right_portrait = { +# character = scope:attacker +# animation = war_over_win +# trigger = { +# NOT = { this = root } +# } +# } +# lower_center_portrait = scope:defender +# +# override_effect_2d = { reference = legend_glow } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_restoring_japanese_emperor" +# save_scope_as = tenno +# save_scope_as = bg_override_char +# japan_clear_flavour_flags_effect = yes +# set_global_variable = { +# name = tenno_restored +# value = yes +# } +# add_character_flag = ceremonial_liege_flag +# # Inform Vassals +# every_player = { +# limit = { is_vassal_or_below_of = root } +# trigger_event = tgp_japan_decision.9302 +# } +# restore_ceremonial_liege_faction_reward_effect = yes +# } +# +# option = { +# name = tgp_japan_decision.9301.a +# } +#} +# +#tgp_japan_decision.9302 = { +# type = character_event +# title = tgp_japan_decision.9302.t +# desc = tgp_japan_decision.9302.desc +# theme = crown +# +# override_effect_2d = { reference = legend_glow } +# +# left_portrait = { +# character = scope:tenno +# animation = holding_hu +# } +# right_portrait = { +# character = scope:attacker +# animation = war_over_win +# trigger = { +# NOT = { this = scope:tenno } +# } +# } +# lower_center_portrait = scope:defender +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_restoring_japanese_emperor" +# show_as_tooltip = { +# scope:tenno = { restore_ceremonial_liege_faction_reward_effect = yes } +# } +# } +# +# option = { +# name = tgp_japan_decision.9302.a +# } +#} +# +##Become a Poet - Ceremony - House Aspiration +#tgp_japan_decision.9401 = { +# type = character_event +# title = tgp_japan_decision.9401.t +# desc = tgp_japan_decision.9401.desc +# theme = education +# left_portrait = { +# character = root +# animation = writing +# } +# +# #Study to become a poet +# option = { +# name = tgp_japan_decision.9401.a +# +# duel = { +# skill = learning +# value = high_skill_rating +# 50 = { #Success +# compare_modifier = { +# value = scope:duel_value +# multiplier = 3.5 +# min = -49 +# } +# modifier = { +# has_trait = shrewd +# add = 10 +# } +# modifier = { +# has_trait = erudite +# add = 10 +# } +# send_interface_toast = { +# title = tgp_japan_decision.9401.a.toast.success +# left_icon = root +# add_trait = lifestyle_poet +# add_stress = minor_stress_gain +# } +# } +# +# 50 = { #Failure +# compare_modifier = { +# value = scope:duel_value +# multiplier = -3.5 +# min = -49 +# } +# send_interface_toast = { +# title = tgp_japan_decision.9401.a.toast.failure +# left_icon = root +# add_stress = medium_stress_gain +# } +# } +# } +# +# ai_chance = { +# base = 100 +# ai_value_modifier = { +# ai_rationality = 1 +# ai_energy = 1 +# ai_sociability = 1 +# } +# } +# } +# +# #Opt out +# option = { +# name = tgp_japan_decision.9401.b +# +# ai_chance = { +# base = 100 +# ai_value_modifier = { +# ai_rationality = -1 +# ai_energy = -1 +# ai_sociability = -1 +# } +# } +# } +#} +# +## tgp_japan_become_a_monk_decision - Becoming a Buddhist monk near the end of your life (or when you become seriously ill) +#tgp_japan_decision.9500 = { +# type = character_event +# title = tgp_japan_decision.9500.t +# desc = tgp_japan_decision.9500.desc +# theme = faith +# left_portrait = { +# character = root +# animation = personality_zealous +# } +# +# option = { +# name = tgp_japan_decision.9500.a +# add_trait = devoted +# tgp_renounce_estate_effect = yes +# } +#} +# +## tgp_japan_establish_soryo_administration_decision +# +#tgp_japan_decision.9601 = { +# type = character_event +# hidden = yes +# +# immediate = { +# save_scope_as = daijo_daijin +# # Inform Vassals +# every_vassal = { +# limit = { +# highest_held_title_tier >= tier_county +# is_landed = yes +# # Exclude members of bloc, allies, prisoners +# NOR = { +# house.house_confederation ?= scope:daijo_daijin.house.house_confederation +# is_allied_to = scope:daijo_daijin +# is_imprisoned_by = scope:daijo_daijin +# } +# } +# trigger_event = tgp_japan_decision.9602 +# } +# # After AI decisions +# trigger_event = { +# id = tgp_japan_decision.9604 +# delayed = yes +# } +# } +#} +# +#tgp_japan_decision.9602 = { # Vassal AI event +# type = character_event +# hidden = yes +# +# trigger = { is_ai = yes } +# +# on_trigger_fail = { # Create player list to handle separately +# save_temporary_scope_as = war_joiner_temp +# scope:daijo_daijin = { +# add_to_variable_list = { +# name = war_players +# target = scope:war_joiner_temp +# months = 1 +# } +# } +# } +# +# immediate = { +# random_list = { +# 20 = { # Join war +# trigger = { +# # Only bloc leaders join +# trigger_if = { +# limit = { exists = house.house_confederation.leading_house } +# is_house_head = yes +# house.house_confederation.leading_house ?= house +# } +# trigger_else = { always = yes } +# } +# modifier = { +# add = 15 +# is_house_head = yes +# house.house_confederation.leading_house ?= house +# } +# modifier = { +# add = 15 +# house = { has_house_aspiration_parameter = unlocks_japanese_manor_archive } +# } +# modifier = { +# add = 15 +# house = { has_house_aspiration_parameter = ceremony_cheaper_feasts } +# } +# modifier = { +# add = 30 +# has_relation_rival = scope:daijo_daijin +# } +# modifier = { +# add = 30 +# house = { +# any_house_relation = { +# has_house_relation_level = feud +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# modifier = { +# add = 20 +# house = { +# any_house_relation = { +# has_house_relation_level = rivalry +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# modifier = { +# add = 10 +# house = { +# any_house_relation = { +# has_house_relation_level = quarrel +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# modifier = { +# add = 15 +# government_has_mechanic = administrative +# } +# save_temporary_scope_as = war_joiner_temp +# scope:daijo_daijin = { +# add_to_variable_list = { +# name = war_joiners +# target = scope:war_joiner_temp +# months = 1 +# } +# } +# if = { +# limit = { +# is_house_head = yes +# house.house_confederation.leading_house ?= house +# } +# top_liege = { +# every_vassal = { +# limit = { +# highest_held_title_tier > tier_barony +# house.house_confederation ?= root.house.house_confederation +# } +# save_temporary_scope_as = war_joiner_temp +# scope:daijo_daijin = { +# add_to_variable_list = { +# name = war_joiners +# target = scope:war_joiner_temp +# months = 1 +# } +# } +# } +# } +# } +# } +# 10 = { # Don't join war +# opinion_modifier = { +# opinion_target = scope:daijo_daijin +# multiplier = -0.1 +# } +# ai_value_modifier = { +# ai_boldness = -0.1 +# } +# modifier = { +# add = 30 +# house = { +# any_house_relation = { +# has_house_relation_level = amity +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# modifier = { +# add = 20 +# house = { +# any_house_relation = { +# has_house_relation_level = friendly +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# modifier = { +# add = 10 +# house = { +# any_house_relation = { +# has_house_relation_level = cordial +# any_relation_house = { this = scope:daijo_daijin.house } +# } +# } +# } +# } +# } +# } +#} +# +#tgp_japan_decision.9603 = { # Vassal player event +# type = character_event +# title = tgp_japan_decision.9603.t +# desc = { +# desc = tgp_japan_decision.9603.desc +# triggered_desc = { +# trigger = { exists = scope:leader } +# desc = tgp_japan_decision.9603.leader +# } +# } +# theme = war +# +# left_portrait = { +# character = scope:daijo_daijin +# animation = japanese_war_fan +# } +# lower_left_portrait = scope:leader +# lower_center_portrait = scope:portrait_1 +# lower_right_portrait = scope:portrait_2 +# +# trigger = { +# is_ai = no +# } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# show_as_tooltip = { +# scope:daijo_daijin = { +# custom_description_no_bullet = { text = if_you_win_effect } +# show_as_tooltip = { japanese_establish_soryo_administration_reward_effect = yes } +# } +# } +# } +# +# option = { +# name = { +# text = tgp_japan_decision.9603.a.bloc +# trigger = { house.house_confederation.leading_house ?= house } +# } +# name = { +# text = tgp_japan_decision.9603.a +# trigger = { +# NOT = { house.house_confederation.leading_house ?= house } +# } +# } +# hidden_effect = { +# if = { +# limit = { is_defender_in_war = scope:war } +# scope:war = { remove_participant = root } +# } +# } +# scope:war = { add_attacker = root } +# if = { +# limit = { +# is_house_head = yes +# house.house_confederation.leading_house = root.house +# } +# custom_tooltip = tgp_japan_decision.9603.a.tt +# hidden_effect = { +# top_liege = { +# every_vassal = { +# limit = { +# NOT = { this = root } +# highest_held_title_tier > tier_barony +# house.house_confederation ?= root.house.house_confederation +# } +# save_temporary_scope_as = war_joiner_temp +# if = { +# limit = { +# exists = scope:war +# is_defender_in_war = scope:war +# } +# scope:war = { remove_participant = scope:war_joiner_temp } +# } +# scope:war ?= { add_attacker = scope:war_joiner_temp } +# } +# } +# } +# } +# } +# +# option = { +# name = tgp_japan_decision.9603.b +# } +#} +# +#tgp_japan_decision.9604 = { # War setup +# type = character_event +# hidden = yes +# +# immediate = { +# if = { +# limit = { any_in_list = { variable = war_joiners } } +# # Find bloc leaders +# every_in_list = { +# variable = war_joiners +# limit = { +# is_house_head = yes +# house.house_confederation.leading_house ?= house # Prefer Bloc Leaders +# } +# add_to_list = bloc_leaders +# } +# # Find bloc leader as war leader, and power portraits +# ordered_in_list = { +# list = bloc_leaders +# order_by = { +# value = 0 +# } +# max = 3 +# if = { +# limit = { exists = scope:portrait_1 } +# save_scope_as = portrait_2 +# } +# else_if = { +# limit = { exists = scope:leader } +# save_scope_as = portrait_1 +# } +# else = { save_scope_as = leader } +# } +# # Find non bloc leader if necessary, or power portraits +# ordered_in_list = { +# variable = war_joiners +# order_by = { +# value = 0 +# add = military_power +# } +# max = 3 +# if = { +# limit = { exists = scope:portrait_1 } +# save_scope_as = portrait_2 +# } +# else_if = { +# limit = { exists = scope:leader } +# save_scope_as = portrait_1 +# } +# else_if = { +# limit = { +# NOT = { exists = scope:leader } +# } +# save_scope_as = leader +# } +# } +# # Start war +# scope:leader ?= { +# start_war = { +# cb = japan_establish_soryo_administration_cb +# target = scope:daijo_daijin +# } +# random_character_war = { +# limit = { +# primary_attacker = scope:leader +# primary_defender = scope:daijo_daijin +# using_cb = japan_establish_soryo_administration_cb +# } +# save_scope_as = war +# } +# } +# # Counter for other joiners +# set_variable = { +# name = other_joiners_count +# value = 0 +# } +# # Add other participants +# every_in_list = { +# variable = war_joiners +# limit = { NOT = { this = scope:leader } } +# save_temporary_scope_as = war_joiner_temp +# if = { +# limit = { +# exists = scope:war +# is_defender_in_war = scope:war +# } +# scope:war = { remove_participant = scope:war_joiner_temp } +# } +# scope:war ?= { add_attacker = scope:war_joiner_temp } +# if = { +# limit = { +# is_house_head = yes +# house.house_confederation.leading_house ?= house +# } +# add_to_list = bloc_leaders +# } +# else_if = { +# limit = { NOT = { exists = house.house_confederation } } +# add_to_list = other_joiners +# root = { +# change_variable = { +# name = other_joiners_count +# add = 1 +# } +# } +# } +# } +# } +# trigger_event = { +# id = tgp_japan_decision.9605 +# delayed = yes +# } +# } +#} +# +#tgp_japan_decision.9605 = { # War start event +# type = character_event +# title = { +# desc = { +# first_valid = { +# triggered_desc = { +# trigger = { exists = scope:war } +# desc = tgp_japan_decision.9605.t +# } +# desc = tgp_japan_decision.9606.t +# } +# } +# } +# desc = { +# first_valid = { +# triggered_desc = { +# trigger = { exists = scope:war } +# desc = tgp_japan_decision.9605.desc +# } +# desc = tgp_japan_decision.9605.peace +# } +# } +# theme = war +# +# left_portrait = { +# character = scope:daijo_daijin +# animation = japanese_war_fan +# } +# lower_left_portrait = scope:leader +# lower_center_portrait = scope:portrait_1 +# lower_right_portrait = scope:portrait_2 +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# add_character_flag = wear_armor +# if = { +# limit = { exists = scope:leader } +# # Start war +# if = { +# limit = { any_in_list = { list = bloc_leaders } } +# every_in_list = { +# list = bloc_leaders +# custom_tooltip = tgp_establish_soryo_administration_bloc_leaders_tt +# } +# } +# # Tooltip +# if = { +# limit = { any_in_list = { list = other_joiners } } +# custom_tooltip = tgp_establish_soryo_administration_other_joiners_tt +# } +# } +# else = { japanese_establish_soryo_administration_reward_effect = yes } +# } +# +# option = { +# name = tgp_japan_decision.9605.a +# trigger = { exists = scope:war } +# show_as_tooltip = { +# custom_description_no_bullet = { text = if_you_win_effect } +# show_as_tooltip = { japanese_establish_soryo_administration_reward_effect = yes } +# } +# } +# +# option = { +# name = tgp_japan_decision.9605.b +# trigger = { +# NOT = { exists = scope:war } +# } +# japanese_establish_soryo_administration_reward_effect = yes +# every_player = { +# limit = { +# top_liege = scope:daijo_daijin +# NOT = { this = scope:daijo_daijin } +# } +# trigger_event = tgp_japan_decision.9607 +# } +# } +# +# after = { +# remove_character_flag = wear_armor +# if = { +# limit = { exists = scope:leader } +# every_in_list = { +# variable = war_players +# trigger_event = tgp_japan_decision.9603 +# } +# } +# remove_variable = other_joiners_count +# } +#} +# +#tgp_japan_decision.9606 = { # War won event +# type = character_event +# title = tgp_japan_decision.9606.t +# desc = tgp_japan_decision.9606.desc +# theme = war +# +# left_portrait = { +# character = scope:daijo_daijin +# animation = japanese_war_fan +# } +# right_portrait = { +# character = scope:leader +# triggered_animation = { +# trigger = { is_imprisoned = yes } +# animation = prisonhouse +# } +# animation = war_over_loss +# override_imprisonment_visuals = yes +# } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# japanese_establish_soryo_administration_reward_effect = yes +# } +# +# option = { +# name = tgp_japan_decision.9606.a +# } +# +# after = { +# every_player = { +# limit = { +# top_liege = scope:daijo_daijin +# NOT = { this = scope:daijo_daijin } +# } +# trigger_event = tgp_japan_decision.9607 +# } +# } +#} +# +#tgp_japan_decision.9607 = { # War won vassal event +# type = character_event +# title = tgp_japan_decision.9606.t +# desc = tgp_japan_decision.9607.desc +# theme = war +# +# left_portrait = { +# character = scope:daijo_daijin +# animation = war_over_win +# } +# right_portrait = { +# character = scope:leader +# triggered_animation = { +# trigger = { is_imprisoned = yes } +# animation = prisonhouse +# } +# animation = war_over_loss +# override_imprisonment_visuals = yes +# } +# +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# show_as_tooltip = { japanese_establish_soryo_administration_reward_effect = yes } +# } +# +# option = { +# name = tgp_japan_decision.9607.a +# } +#} +# +## tgp_japan_restore_japanese_monarchy_decision +# +#tgp_japan_decision.9901 = { +# type = character_event +# title = tgp_japan_decision.9901.t +# desc = tgp_japan_decision.9901.desc +# theme = realm +# left_portrait = { +# character = scope:kampaku +# triggered_animation = { +# trigger = { this = scope:scion } +# animation = war_over_tie +# } +# animation = throne_room_bow_1 +# } +# right_portrait = { +# character = scope:scion +# animation = war_over_tie +# trigger = { this != scope:kampaku } +# } +# override_background = { reference = throne_room_scope } +# +# immediate = { +# play_music_cue = "mx_cue_sacredrite" +# show_as_tooltip = { tgp_restore_japanese_monarchy_decision_effect = yes } +# tgp_restore_japanese_monarchy_yamato_restoration_effect = yes +# every_player = { +# limit = { is_vassal_or_below_of = root } +# trigger_event = tgp_japan_decision.9902 +# } +# } +# +# option = { # Rule as Regent +# name = { +# trigger = { this = scope:scion } +# text = tgp_japan_decision.9901.a +# } +# name = { +# trigger = { this != scope:scion } +# text = tgp_japan_decision.9901.a.scion +# } +# } +#} +# +#tgp_japan_decision.9902 = { +# type = character_event +# title = tgp_japan_decision.9901.t +# desc = tgp_japan_decision.9902.desc +# theme = family +# left_portrait = { +# character = scope:kampaku +# triggered_animation = { +# trigger = { this = scope:scion } +# animation = war_over_tie +# } +# animation = throne_room_bow_1 +# } +# right_portrait = { +# character = scope:scion +# animation = war_over_tie +# trigger = { this != scope:kampaku } +# } +# override_background = { reference = throne_room_scope } +# +# immediate = { +# play_music_cue = "mx_cue_sacredrite" +# show_as_tooltip = { +# scope:kampaku = { +# tgp_restore_japanese_monarchy_decision_effect = yes +# tgp_restore_japanese_monarchy_yamato_restoration_effect = yes +# } +# } +# } +# +# option = { # Long live the Emperor +# name = tgp_japan_decision.9902.a +# } +#} +# +## tgp_japan_restore_japanese_government_decision +# +#tgp_japan_decision.9911 = { +# type = character_event +# title = tgp_japan_decision.9911.t +# desc = { +# desc = tgp_japan_decision.9911.desc +# triggered_desc = { +# trigger = { exists = scope:rebel } +# desc = tgp_japan_decision.9911.rebel +# } +# } +# theme = crown +# left_portrait = { +# character = scope:kampaku +# animation = chaplain +# } +# right_portrait = { +# character = scope:ceremonial_liege +# animation = holding_hu +# } +# lower_right_portrait = scope:rebel +# override_background = { reference = throne_room_scope } +# +# immediate = { +# tgp_save_realm_ceremonial_liege_effect = yes +# tgp_restore_japanese_government_decision_effect = yes +# } +# +# option = { # Yay +# name = tgp_japan_decision.9911.a +# } +#} +# +#tgp_japan_decision.9912 = { +# type = character_event +# title = tgp_japan_decision.9911.t +# desc = { +# desc = tgp_japan_decision.9912.desc +# triggered_desc = { +# trigger = { exists = scope:rebel } +# desc = tgp_japan_decision.9912.rebel +# } +# } +# theme = realm +# left_portrait = { +# character = scope:kampaku +# animation = war_over_tie +# } +# override_background = { reference = throne_room_scope } +# +# trigger = { +# NOT = { is_at_war_with = scope:kampaku } +# } +# +# immediate = { +# show_as_tooltip = { +# scope:kampaku = { tgp_restore_japanese_government_decision_effect = yes } +# } +# } +# +# option = { # Yay +# name = tgp_japan_decision.9911.a +# if = { +# limit = { +# NOT = { has_government = japan_administrative_government } +# } +# change_government = japan_administrative_government +# } +# } +# +# option = { # Boo +# name = tgp_japan_decision.9912.b +# trigger = { +# is_ai = no +# NOR = { +# is_at_war_with = scope:kampaku +# has_government = japan_administrative_government +# } +# } +# every_in_list = { +# list = war_to_join +# limit = { +# NOT = { is_defender = root } +# } +# hidden_effect = { set_called_to = root } +# add_attacker = root +# } +# reverse_add_opinion = { +# target = scope:kampaku +# modifier = rebellious_vassal_opinion +# } +# } +#} +# +##Player called to war by rebellious vassal. (vs imprisonment) +#tgp_japan_decision.9913 = { +# type = letter_event +# opening = { +# desc = call_ally.0100.opening +# } +# desc = tgp_japan_decision.9913.desc +# +# sender = { +# character = scope:recipient +# animation = anger +# } +# +# option = { +# name = tgp_japan_decision.9913.a +# scope:recipient = { +# every_character_war = { +# limit = { +# using_cb = japan_refused_ritsuryo_cb +# casus_belli = { +# primary_attacker = scope:recipient +# primary_defender = scope:actor +# } +# } +# hidden_effect = { set_called_to = root } +# add_attacker = root +# } +# scope:recipient = { +# add_opinion = { +# target = root +# modifier = helped_me_against_tyrant_opinion +# } +# } +# } +# } +# option = { +# name = tgp_japan_decision.9913.b +# scope:recipient = { +# add_opinion = { +# target = root +# modifier = sided_with_tyrant_opinion +# } +# } +# } +#} +#scripted_trigger dominion_fight = { +# exists = scope:main_defender +# NOT = { +# any_in_list = { +# list = potential_vassals +# } +# } +#} +#scripted_trigger dominion_fight_partial = { +# exists = scope:main_defender +# any_in_list = { +# list = potential_vassals +# } +#} +##Assert Regional Dominion +##Laurence Kennedy +#tgp_japan_decision.9960 = { +# type = character_event +# window = big_event_window +# title = tgp_japan_decision.9960.t +# desc = { +# desc = tgp_japan_decision.9960.intro +# first_valid = { +# #de jure vassals agree to let you be duke +# triggered_desc = { +# trigger = { +# NOT = { exists = scope:main_defender } +# } +# desc = tgp_japan_decision.9960.agree +# } +# #some de jure vassals agree to let you be duke, some will fight you +# triggered_desc = { +# trigger = { dominion_fight_partial = yes } +# desc = tgp_japan_decision.9960.partial_war +# } +# #all jure vassals will fight you +# desc = tgp_japan_decision.9960.full_war +# } +# } +# theme = battle +# override_icon = { +# trigger = { dominion_fight = no } +# reference = "gfx/interface/icons/event_types/type_authority.dds" +# } +# override_icon = { +# trigger = { dominion_fight = yes } +# reference ="gfx/interface/icons/event_types/type_war.dds" +# } +# override_header_background = { +# trigger = { dominion_fight = yes } +# reference = "gfx/interface/window_event/event_header_red.dds" +# } +# override_sound = { +# trigger = { dominion_fight = no } +# reference = "event:/SFX/Events/Themes/sfx_event_theme_type_diplomacy" +# } +# left_portrait = { +# character = scope:super_soryo +# triggered_animation = { +# trigger = { +# is_adult = yes +# dominion_fight = yes +# can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +# } +# #it's war! +# animation = gedan_no_kamae +# } +# #it's not war! +# animation = personality_content +# } +# right_portrait = { #main defender +# character = scope:main_defender +# camera = camera_event_right_crowner_crowning +# } +# override_background = { +# trigger = { dominion_fight = yes } +# #it's war! +# reference = army_camp +# } +# override_background = { reference = bp1_crossroads_inn } +# override_effect_2d = { +# trigger = { dominion_fight = no } +# reference = legend_glow +# } +# immediate = { +# if = { +# limit = { +# is_adult = yes +# can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +# } +# add_character_flag = { +# flag = wear_armor +# days = 1 +# } +# } +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# +# tgp_japan_assert_regional_dominion_government_decision_effect = yes +# } +# #fight +# option = { +# trigger = { dominion_fight = yes } +# name = tgp_japan_decision.9960.a +# } +# #no fight +# option = { +# trigger = { dominion_fight = no } +# name = tgp_japan_decision.9960.b +# } +# after = { +# remove_character_flag = wear_armor +# } +#} +##winner follow up +#tgp_japan_decision.9961 = { +# type = character_event +# window = big_event_window +# title = tgp_japan_decision.9961.t +# desc = tgp_japan_decision.9961.desc +# theme = battle +# override_icon = { +# trigger = { dominion_fight = yes } +# reference ="gfx/interface/icons/event_types/type_hunt.dds" +# } +# override_header_background = { reference = "gfx/interface/window_event/header_neutral.dds" } +# left_portrait = { +# character = scope:winner +# triggered_animation = { +# trigger = { +# is_adult = yes +# can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +# } +# animation = japanese_war_fan +# } +# animation = personality_content +# } +# override_background = { reference = battlefield } +# override_effect_2d = { reference = legend_glow } +# immediate = { +# play_sound_effect = "event:/DLC/EP4/SFX/Stingers/Japan/tgp_mx_sting_become_japanese_shogun" +# if = { +# limit = { +# is_adult = yes +# can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +# } +# add_character_flag = { +# flag = wear_armor +# days = 1 +# } +# } +# scope:title_scope = { tgp_japan_assert_regional_dominance_war_outcome_effect = yes } +# } +# #you won, enjoy +# option = { +# name = tgp_japan_decision.9961.a +# } +# after = { +# remove_character_flag = wear_armor +# } +#} +##loser follow up +#tgp_japan_decision.9962 = { +# type = character_event +# window = big_event_window +# title = tgp_japan_decision.9962.t +# desc = tgp_japan_decision.9962.desc +# theme = battle +# override_icon = { +# trigger = { dominion_fight = yes } +# reference ="gfx/interface/icons/event_types/type_hunt.dds" +# } +# override_header_background = { reference = "gfx/interface/window_event/header_neutral.dds" } +# left_portrait = { +# character = scope:loser +# animation = shame +# } +# #main defender +# right_portrait = { +# character = scope:winner +# animation = war_over_win +# } +# override_background = { +# reference = battlefield +# } +# override_effect_2d = { +# reference = rain +# } +# immediate = { +# play_music_cue = "mx_cue_general_crusade_event_3" +# } +# #you lost, enjoy +# option = { +# name = tgp_japan_decision.9962.a +# } +#} +##letter event +#tgp_japan_decision.9963 = { +# type = letter_event +# opening = tgp_japan_decision.9963.opening +# desc = tgp_japan_decision.9963.desc +# sender = scope:super_soryo +# #decline war +# option = { +# name = tgp_japan_decision.9963.a +# play_music_cue = mx_cue_combat_stinger +# custom_tooltip = tgp_japan_decision.9963.a.tt +# } +# #join war +# option = { +# name = tgp_japan_decision.9963.b +# scope:super_soryo_war = { +# add_defender = root +# hidden_effect = { +# set_called_to = root +# } +# } +# } +#} diff --git a/events/dlc/tgp/tgp_silk_road_events.txt b/events/dlc/tgp/tgp_silk_road_events.txt new file mode 100644 index 000000000..dc49e40a9 --- /dev/null +++ b/events/dlc/tgp/tgp_silk_road_events.txt @@ -0,0 +1,289 @@ +namespace = tgp_silk_road_events + +# visit_silk_road_market_decision + +#tgp_silk_road_events.0010 = { +# type = character_event +# title = { +# first_valid = { +# triggered_desc = { +# trigger = { +# OR = { +# scope:market_temp = title:c_jingzhao # Chang'an +# scope:market_temp = title:c_shazhou # Dunhuang +# } +# } +# desc = tgp_silk_road_events.0010.t.market +# } +# triggered_desc = { +# trigger = { scope:market_temp = title:c_lhasa } # Lhasa +# desc = tgp_silk_road_events.0010.t.khrom +# } +# triggered_desc = { +# trigger = { scope:market_temp = title:c_dvin } # Dvin +# desc = tgp_silk_road_events.0010.t.shuka +# } +# desc = tgp_silk_road_events.0010.t +# } +# } +# desc = tgp_silk_road_events.0010.desc +# theme = silk_road +# override_background = { reference = market } +# +# left_portrait = { +# character = root +# animation = steward +# } +# +# immediate = { +# culture = { save_scope_as = culture_temp } +# save_scope_as = new_trinket # Purely for error suppression +# } +# +# option = { +# name = tgp_silk_road_events.0010.a +# duel = { +# skills = { learning stewardship } +# value = average_skill_rating +# 50 = { +# compare_modifier = { +# value = scope:duel_value +# multiplier = 3.5 +# min = -49 +# } +# culture = { +# add_to_variable_list = { +# name = silk_road_unlocked_innovations +# target = scope:innovation_temp +# } +# } +# every_player = { +# limit = { culture = root.culture } +# send_interface_toast = { +# type = msg_silk_road_innovation_spread +# title = msg_silk_road_innovation_spread_title +# desc = msg_silk_road_innovation_visit_desc +# left_icon = root +# right_icon = scope:market_temp +# custom_tooltip = msg_silk_road_innovation_spread_tt +# } +# } +# } +# # +# 50 = { +# compare_modifier = { +# value = scope:duel_value +# multiplier = -3.5 +# min = -49 +# } +# desc = SILK_ROAD_MARKET_EMPTY_HANDED +# send_interface_toast = { +# title = tgp_silk_road_events.0010.a_nada +# type = event_toast_effect_bad +# left_icon = root +# } +# } +# } +# +# ai_chance = { +# base = 50 +# +# ai_value_modifier = { +# ai_rationality = 1 +# } +# } +# } +# +# +# option = { +# name = tgp_silk_road_events.0010.b +# +# random_list = { +# desc = tgp_silk_road_events.0010.b_tt +# # get a famed-quality or masterwork-quality item +# 10 = { +# desc = tgp_silk_road_events.0010.b_trinket +# +# hidden_effect = { +# root = { +# add_character_flag = { flag = used_in_feast_default.1016 } # uncommon, famed, masterwork items +# generate_trinket_effect = { +# TRINKET_RECEIVER = root +# TRINKET_GIVER = root +# GRAB_ALL_TRINKETS = yes +# HISTORY_TYPE = given_unknown +# } +# remove_character_flag = used_in_feast_default.1016 +# } +# } +# send_interface_toast = { +# title = tgp_silk_road_events.0010.b_trinket +# type = event_toast_effect_good +# left_icon = root +# right_icon = scope:new_trinket +# scope:new_trinket = { +# set_owner = root +# } +# } +# custom_tooltip = purchase_artifact_famed_tt +# } +# # make a profit +# 25 = { +# desc = tgp_silk_road_events.0010.b_big_gold +# send_interface_toast = { +# title = tgp_silk_road_events.0010.b_big_gold +# type = event_toast_effect_good +# left_icon = root +# add_short_term_gold = massive_gold_value +# } +# } +# # break even +# 40 = { +# desc = tgp_silk_road_events.0010.b_small_gold +# send_interface_toast = { +# title = tgp_silk_road_events.0010.b_small_gold +# type = event_toast_effect_good +# left_icon = root +# add_short_term_gold = major_gold_value # should be the same as the cost of the decision to visit a market +# } +# } +# # get nothing, and if you're greedy, get stressed because you got nothing +# 25 = { +# desc = tgp_silk_road_events.0010.a_nada +# send_interface_toast = { +# title = tgp_silk_road_events.0010.a_nada +# type = event_toast_effect_bad +# left_icon = root +# } +# stress_and_fulfillment_impact = { +# greedy = minor_stress_impact_gain +# } +# } +# } +# +# ai_chance = { +# base = 10 +# +# ai_value_modifier = { +# ai_boldness = 1 +# ai_greed = 1 +# } +# } +# } +#} +# +## yearly event for spreading innovations from markets to holder's culture +# +#scripted_effect silk_road_market_spread_innovation_effect = { +# # Find relevant innovation +# scope:market_temp ?= { +# random_county_situation_sub_region = { +# limit = { +# situation_sub_region_has_county = scope:market_temp +# OR = { +# sub_region_current_phase = phase_exceptional_bounty +# sub_region_current_phase = phase_steady_trading +# sub_region_current_phase = phase_hardship +# } +# } +# save_temporary_scope_as = sub_region_temp +# var:innovation ?= { save_temporary_scope_as = innovation_temp } +# } +# } +# # Unlock for culture if relevant +# if = { +# limit = { +# NOR = { +# scope:culture_temp = { +# any_in_list = { +# variable = silk_road_unlocked_innovations +# this = scope:innovation_temp +# } +# } +# scope:innovation_temp = { is_known_by_culture = scope:culture_temp } +# } +# } +# every_player = { +# limit = { culture = scope:culture_temp } +# send_interface_message = { +# type = msg_silk_road_innovation_spread +# title = msg_silk_road_innovation_spread_title +# desc = msg_silk_road_innovation_spread_desc +# left_icon = scope:market_temp.holder +# right_icon = scope:market_temp +# custom_tooltip = msg_silk_road_innovation_spread_tt +# } +# } +# scope:culture_temp = { +# add_to_variable_list = { +# name = silk_road_unlocked_innovations +# target = scope:innovation_temp +# } +# } +# } +##} +# +#tgp_silk_road_events.0100 = { +# hidden = yes +# type = character_event +# +# trigger = { +# OR = { +# has_title = title:c_jingzhao # Chang'an +# has_title = title:c_lhasa # Lhasa +# has_title = title:c_lahur # Lahur +# has_title = title:c_shazhou # Dunhuang +# has_title = title:c_khiva # Khiva +# has_title = title:c_dvin # Dvin +# } +# } +# +# immediate = { +# culture = { save_temporary_scope_as = culture_temp } +# # Find market for yearly if relevant +# if = { +# limit = { NOT = { exists = scope:title } } +# title:c_jingzhao = { add_to_list = potential_markets } # Chang'an +# title:c_lhasa = { add_to_list = potential_markets } # Lhasa +# title:c_lahur = { add_to_list = potential_markets } # Lahur +# title:c_shazhou = { add_to_list = potential_markets } # Dunhuang +# title:c_khiva = { add_to_list = potential_markets } # Khiva +# title:c_dvin = { add_to_list = potential_markets } # Dvin +# every_in_list = { +# list = potential_markets +# limit = { +# save_temporary_scope_as = county_temp +# holder = root +# any_county_situation_sub_region = { +# situation_sub_region_has_county = scope:county_temp +# OR = { +# sub_region_current_phase = phase_exceptional_bounty +# sub_region_current_phase = phase_steady_trading +# sub_region_current_phase = phase_hardship +# } +# # Has not spread to this culture before or is known by this culture +# var:innovation ?= { +# save_temporary_scope_as = innovation_temp +# NOR = { +# scope:culture_temp = { +# any_in_list = { +# variable = silk_road_unlocked_innovations +# this = scope:innovation_temp +# } +# } +# is_known_by_culture = scope:culture_temp +# } +# } +# } +# } +# save_temporary_scope_as = market_temp +# silk_road_market_spread_innovation_effect = yes +# } +# } +# # Use gained market otherwise +# else = { +# scope:title = { save_temporary_scope_as = market_temp } +# silk_road_market_spread_innovation_effect = yes +# } +# } +#} diff --git a/events/factions/faction_demands.txt b/events/factions/faction_demands.txt new file mode 100644 index 000000000..d3baca31f --- /dev/null +++ b/events/factions/faction_demands.txt @@ -0,0 +1,4074 @@ +namespace = faction_demand + +################################################## +# GENERAL SCRIPTED TRIGGERS & EFFECTS + +scripted_trigger faction_leader_would_consider_turning_down_co_emperorship_trigger = { + OR = { + is_ai = no + # Won't change their mind. + AND = { + has_trait = stubborn + NOR = { + has_trait = arrogant + has_trait = ambitious + } + } + # Eyes on the prize. + AND = { + has_trait = humble + NOT = { has_trait = ambitious } + } + # Not swayed by high office. + AND = { + has_trait = content + NOT = { has_trait = arrogant } + } + } +} + +scripted_trigger faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = { + may_appoint_co_emperors_trigger = yes + has_active_diarchy = no +} + +scripted_effect faction_demand_counter_offer_co_rule_start_diarchy_effect = { + custom_tooltip = { + text = faction_demand.0000.enter_co_rule_avoiding_worst_effects + try_start_diarchy = co_emperorship + set_diarch = scope:faction_leader + change_diarchy_swing = 30 + reverse_add_opinion = { + target = scope:faction_leader + modifier = respect_opinion + opinion = 50 + } + } +} + + + + + + + + + + +################################################## +# EVENTS + +################################################## +# Independence Faction +# by Joakim Andreasson & Ismael Serrano +# 0001 - 0010 +################################################## + +scripted_effect faction_demand_independence_counter_offer_corule_accepted_effect = { + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + custom_tooltip = { + text = faction_demand.0000.truce_from_co_rule + scope:faction = { + every_faction_member = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = scope:faction.faction_target + years = faction_counter_offer_appointed_co_emperor_value + name = ep3_truce_appointed_faction_leader_coruler + } + } + } + } + add_prestige = { + value = medium_prestige_value + multiply = -1 + } + scope:faction = { destroy_faction = yes } +} + +scripted_effect faction_demand_independence_rejected_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + + show_as_tooltip = { + scope:faction = { + custom_tooltip = faction_starts_war.tt.replacement + } + } + + if = { + limit = { + scope:faction = { + faction_is_type = independence_faction + } + } + scope:faction = { + every_faction_member = { + save_scope_as = char_temp + add_clan_unity_interaction_effect = { + CHARACTER = scope:char_temp + TARGET = root + VALUE = medium_unity_loss + DESC = clan_unity_joined_independence_faction.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + } + } +} + +# Independence Faction Demand +# by Joakim Andreasson +faction_demand.0001 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_INDEPENDENCE" + } + desc = "FACTION_DEMAND_INDEPENDENCE_DESC" + + trigger = { + # May have ceased to exist by the time this triggers + exists = scope:faction + } + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + } + + # Accept. + option = { + name = "FACTION_DEMAND_ACCEPT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + root = { + save_scope_as = faction_target + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + } + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + + scope:faction = { + every_faction_member = { + change_liege_or_become_independent = { + CHANGE = scope:change + VASSAL = this + } + + hidden_effect = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_GRANT_INDEPENDENCE + } + + # Struggle Catalysts. + if = { + limit = { + is_important_or_vip_struggle_character = yes + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + } + } + } + + trigger_event = faction_demand.0002 + } + } + + resolve_title_and_vassal_change = scope:change + + add_prestige = { + value = medium_prestige_value + multiply = -1 + } + + ai_chance = { + base = 1 + modifier = { + add = 99 + scope:faction = { faction_power >= 100 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = 25 + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -150 + is_at_war = no + primary_title.tier >= tier_empire + } + modifier = { + add = -5000 + OR = { + #mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_yes_men_enabled = yes } + } + } + } + + # Attempt to bribe. + option = { + name = "FACTION_DEMAND_BRIBE_CO_EMPEROR" + show_as_unavailable = { may_appoint_co_emperors_trigger = yes } + trigger = { faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = yes } + + # Ping-pong the choice back to the target. + ## Laying out the consequences. + show_as_tooltip = { + random_list = { + # They accept! + 100 = { + desc = faction_demand.0000.faction_leader_accepts + show_chance = no + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_independence_counter_offer_corule_accepted_effect = yes + } + # They decline. + 100 = { + desc = faction_demand.0000.faction_leader_rejects + show_chance = no + faction_demand_independence_rejected_effect = yes + } + } + } + ## And sorting the actual flow. + scope:faction_leader = { trigger_event = faction_demand.0006 } + + ai_chance = { liege_offer_co_emperorship_to_faction_leader_modifier = yes } + } + + # Reject. + option = { + name = "FACTION_DEMAND_REFUSE" + + faction_demand_independence_rejected_effect = yes + scope:faction_leader = { trigger_event = faction_demand.0003 } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 4.0 + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + compare_modifier = { + value = debt_level + multiplier = -25 + } + modifier = { + add = 5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_no_men_enabled = yes } + } + } + } +} + +# Independence Faction Demand Accepted +# by Ismael Serrano +faction_demand.0002 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_INDEPENDENCE_ACCEPTED" + } + desc = "FACTION_DEMAND_INDEPENDENCE_ACCEPTED_DESC" + + option = { + name = "FACTION_DEMAND_ACCEPTED_OPT" + custom_tooltip = faction_demand.0002.tt + } +} + +# Independence Faction Demand Refused +# by Joakim Andreasson +faction_demand.0003 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_INDEPENDENCE_REFUSED" + } + desc = "FACTION_DEMAND_INDEPENDENCE_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + faction_start_war = {} + + every_faction_member = { + limit = { this != scope:faction.faction_leader } + trigger_event = faction_demand.0004 + } + } + } +} + +# Independence Faction Demand Refused Member Notice +# by Joakim Andreasson +faction_demand.0004 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_INDEPENDENCE_REFUSED" + } + desc = "FACTION_DEMAND_INDEPENDENCE_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + } +} + +# Independence Faction Demand Send Notice +# by Joakim Andreasson +faction_demand.0005 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_INDEPENDENCE_SEND_DEMAND_NOTIFICATION" + } + desc = "FACTION_DEMAND_INDEPENDENCE_SEND_DEMAND_NOTIFICATION_DESC" + + option = { + name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" + } +} + +# Co-emperor counter-offer. +faction_demand.0006 = { + type = letter_event + sender = scope:faction_target + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_DESC + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_ACCEPT + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_start_diarchy + title = faction_demand.0000.offer_accepted + show_as_tooltip = { custom_tooltip = faction_demand.0000.enter_co_emperorship } + } + } + scope:faction = { + every_faction_member = { + limit = { + is_ai = no + this != scope:faction_leader + } + trigger_event = faction_demand.9011 + } + } + } + # Actual effects. + scope:faction_target = { + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_independence_counter_offer_corule_accepted_effect = yes + } + + # Low weight: we control the AI accepting this by toggling whether they can access the refusal option at all. + ai_chance = { base = 20 } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_REJECT + trigger = { faction_leader_would_consider_turning_down_co_emperorship_trigger = yes } + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_war_declared_on_me + title = faction_demand.0000.offer_rejected + show_as_tooltip = { + scope:faction = { custom_tooltip = faction_starts_war.tt.replacement } + } + } + } + } + # Actual effects. + faction_demand_independence_rejected_effect = yes + + # If the AI can access this at all then they should strongly consider it. + ai_chance = { base = 80 } + } +} + +################################################## +# Liberty Faction +# by Henrik Fåhraeus +# 0101 - 0110 +################################################## + +scripted_effect faction_demand_liberty_counter_offer_corule_accepted_effect = { + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + add_prestige = -200 + add_character_flag = { + flag = recent_liberty_faction_war + years = 10 + } + custom_tooltip = { + text = faction_demand.0000.truce_from_co_rule + scope:faction = { + every_faction_member = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = scope:faction.faction_target + years = faction_counter_offer_appointed_co_emperor_value + name = ep3_truce_appointed_faction_leader_coruler + } + } + } + } + scope:faction = { destroy_faction = yes } + # This effect should always be placed here, _after_ everything except the ai_chance. + trigger_event = { on_action = on_faction_demand_accepted } +} + +scripted_effect faction_demand_liberty_rejected_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + show_as_tooltip = { + scope:faction = { + custom_tooltip = faction_starts_war.tt.replacement + } + } +} + +# Liberty Faction Demand +# by Henrik Fåhraeus +faction_demand.0101 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_LIBERTY" + } + desc = "FACTION_DEMAND_LIBERTY_DESC" + + trigger = { + # May have ceased to exist by the time this triggers + exists = scope:faction + } + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + } + + option = { + name = "FACTION_DEMAND_ACCEPT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + change_authority_effect = { CHANGE = -1 } + + add_prestige = -200 + + add_character_flag = { + flag = recent_liberty_faction_war + years = 10 + } + + scope:faction_leader = { + trigger_event = { + id = faction_demand.0102 + } + } + + scope:faction = { + destroy_faction = yes + } + + # MERITOCRATIC EMPIRE CEREMONIAL MONARCH/REGENCY CREATION + tgp_create_meritocratic_ruling_regent_title_effect = yes + + # This effect should always be placed here, _after_ everything except the ai_chance. + trigger_event = { on_action = on_faction_demand_accepted } + + ai_chance = { + base = 10 + modifier = { + add = 90 + scope:faction = { faction_power >= 100 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + add = 50 + any_character_war = { + is_war_leader = root + is_defender = root + } + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_yes_men_enabled = yes } + } + } + } + + option = { + name = "FACTION_DEMAND_BRIBE_CO_EMPEROR" + show_as_unavailable = { may_appoint_co_emperors_trigger = yes } + trigger = { faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = yes } + + # Ping-pong the choice back to the target. + ## Laying out the consequences. + show_as_tooltip = { + random_list = { + # They accept! + 100 = { + desc = faction_demand.0000.faction_leader_accepts + show_chance = no + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_liberty_counter_offer_corule_accepted_effect = yes + } + # They decline. + 100 = { + desc = faction_demand.0000.faction_leader_rejects + show_chance = no + faction_demand_liberty_rejected_effect = yes + } + } + } + ## And sorting the actual flow. + scope:faction_leader = { trigger_event = faction_demand.0106 } + + ai_chance = { liege_offer_co_emperorship_to_faction_leader_modifier = yes } + } + + option = { + name = "FACTION_DEMAND_REFUSE" + + faction_demand_liberty_rejected_effect = yes + + scope:faction_leader = { + trigger_event = { + id = faction_demand.0103 + days = 1 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 4.0 + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + modifier = { + add = 10000 + scope:faction_leader = { is_no_men_enabled = yes } + } + } + } +} + +# Liberty Faction Demand Accepted +# by Henrik Fåhraeus +faction_demand.0102 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_LIBERTY_ACCEPTED" + } + desc = "FACTION_DEMAND_LIBERTY_ACCEPTED_DESC" + + option = { + name = "FACTION_DEMAND_ACCEPTED_OPT" + custom_tooltip = faction_demand.0102.tt + } +} + +# Liberty Faction Demand Refused +# by Henrik Fåhraeus +faction_demand.0103 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_LIBERTY_REFUSED" + } + desc = "FACTION_DEMAND_LIBERTY_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + faction_start_war = {} + + every_faction_member = { + limit = { this != scope:faction.faction_leader } + trigger_event = faction_demand.0104 + } + } + } +} + +# Liberty Faction Demand Refused Member Notice +# by Henrik Fåhraeus +faction_demand.0104 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_LIBERTY_REFUSED" + } + desc = "FACTION_DEMAND_LIBERTY_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + } +} + +# Liberty Faction Demand Send Notice +# by Henrik Fåhraeus +faction_demand.0105 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_LIBERTY_SEND_DEMAND_NOTIFICATION" + } + desc = "FACTION_DEMAND_LIBERTY_SEND_DEMAND_NOTIFICATION_DESC" + + option = { + name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" + } +} + +# Co-emperor counter-offer. +faction_demand.0106 = { + type = letter_event + sender = scope:faction_target + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_DESC + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_ACCEPT + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_start_diarchy + title = faction_demand.0000.offer_accepted + show_as_tooltip = { custom_tooltip = faction_demand.0000.enter_co_emperorship } + } + } + scope:faction = { + every_faction_member = { + limit = { + is_ai = no + this != scope:faction_leader + } + trigger_event = faction_demand.9011 + } + } + } + # Actual effects. + scope:faction_target = { + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_liberty_counter_offer_corule_accepted_effect = yes + } + + # Low weight: we control the AI accepting this by toggling whether they can access the refusal option at all. + ai_chance = { base = 20 } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_REJECT + trigger = { faction_leader_would_consider_turning_down_co_emperorship_trigger = yes } + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_war_declared_on_me + title = faction_demand.0000.offer_rejected + show_as_tooltip = { + scope:faction = { custom_tooltip = faction_starts_war.tt.replacement } + } + } + } + } + # Actual effects. + faction_demand_liberty_rejected_effect = yes + + # If the AI can access this at all then they should strongly consider it. + ai_chance = { base = 80 } + } +} + +################################################## +# Populist Faction +# by Henrik Fåhraeus and Sean Hughes +# 1001, 1010 (but not the range between them), & 0099 too for some inexplicable reason +################################################## + +# Populist Faction Demand +# by Henrik Fåhraeus and Sean Hughes +faction_demand.1001 = { + type = letter_event + sender = scope:peasant_leader + opening = { + desc = "FACTION_DEMAND_POPULIST" + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + government_allows = state_faith + primary_title.state_rite != scope:peasant_leader.rite + } + desc = FACTION_DEMAND_POPULIST_DESC_ADMIN + } + triggered_desc = { + trigger = { + culture != scope:peasant_leader.culture + faith = scope:peasant_leader.faith + } + desc = "FACTION_DEMAND_POPULIST_DESC_CULTURE" + } + triggered_desc = { + trigger = { + faith != scope:peasant_leader.faith + culture = scope:peasant_leader.culture + } + desc = "FACTION_DEMAND_POPULIST_DESC_FAITH" + } + desc = "FACTION_DEMAND_POPULIST_DESC" + } + } + + trigger = { + exists = scope:faction + exists = scope:peasant_leader + scope:peasant_leader.joined_faction = scope:faction + } + + on_trigger_fail = { + debug_log = "Popular Faction tried to press claim (probably) without existing peasant_leader" + debug_log_scopes = yes + debug_log = "Popular Faction error reporting complete" + } + + immediate = { + every_realm_province = { + county = { add_to_list = remaining_counties_list } + } + scope:faction = { + every_faction_county_member = { remove_from_list = remaining_counties_list } + } + } + + # Option A: Convert to the faction's faith or culture. + option = { + name = "FACTION_DEMAND_POPULIST_ACCEPT_CONVERT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + trigger = { + # If more than 30% of your realm belongs to the revolting culture or faith, you get the option to switch to it. + OR = { + culture = scope:peasant_leader.culture + any_realm_province = { + percent >= 0.30 + culture = scope:peasant_leader.culture + } + } + OR = { + faith = scope:peasant_leader.faith + any_realm_province = { + percent >= 0.30 + faith = scope:peasant_leader.faith + } + } + + # Heads of Faith can never convert. + faith.religious_head != root + + # Option unavailable to realms with State Faith + NOT = { government_allows = state_faith } + + ###Restrictions to stop the AI converting quite so freely + trigger_if = { + limit = { + is_ai = yes + } + + # May not convert to an unreformed faith from a reformed one. + NAND = { + scope:peasant_leader.faith = { has_doctrine_parameter = unreformed } + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + + # Must be converting from a low-fervor faith to a higher-fervor faith. + scope:peasant_leader.faith = { fervor >= 31 } + faith = { fervor <= 30 } + + # Zealous rulers do not get the option to change faith. + OR = { + NOT = { has_trait = zealous } + faith = scope:peasant_leader.faith + } + + # Crusaders & Crusader-Monarchs should never accept this. + NOR = { + has_trait = faith_warrior + has_trait = crusader_king + #has_title = title:k_jerusalem + } + } + ###End AI restrictions. + } + + if = { + limit = { + culture != scope:peasant_leader.culture + } + set_culture = scope:peasant_leader.culture + add_prestige_level = -2 + } + else = { + add_prestige_level = -1 + } + + if = { + limit = { + faith != scope:peasant_leader.faith + } + set_character_faith = scope:peasant_leader.faith + set_character_rite = scope:peasant_leader.rite + if = { + limit = { + scope:peasant_leader.faith = { has_doctrine = doctrine_monotheist } + } + custom_description_no_bullet = { text = mandala_monotheist_warning_tt } + } + add_piety_level = -1 + } + + if = { + limit = { + dread > 0 + } + add_dread = medium_dread_loss + } + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + # Struggle Catalysts. + if = { + limit = { + is_important_or_vip_struggle_character = yes + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + CHAR = scope:peasant_leader + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + CHAR = scope:peasant_leader + } + } + activate_struggle_catalyst = { + catalyst = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + character = root + } + } + } + + scope:faction = { + hidden_effect = { + clean_revolt_county_modifiers_from_faction_members_effect = yes + } + destroy_faction = yes # Show this to have it explicitly said in the tooltip that the faction actually disbands. + } + + stress_and_fulfillment_impact = { + zealous = massive_stress_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + trigger = { + faith != scope:peasant_leader.faith + } + ai_zeal = -1 + min = 0 + } + + compare_modifier = { # Weaker factions increase the chance of an AI ruler refusing; at 80% army strength (minimum), this will be -20; at 200% army strength, this will max out at +50. + value = { + value = scope:faction.faction_power + subtract = 100 + } + max = 50 + } + + modifier = { + add = 50 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:peasant_leader = { is_yes_men_enabled = yes } + } + } + } + + # Option D: Switch State Faith to the faction faith + # (out of order so it appears correctly in the event. this option has been added subsequently) + option = { + name = FACTION_DEMAND_POPULIST_ACCEPT_CONVERT_STATE_FAITH + + trigger = { # Only available if ruler fulfills the following: + government_allows = state_faith + primary_title.state_rite != scope:peasant_leader.rite + OR = { # You share religion OR faction leader's faith is the largest faith in the realm - This is to avoid flipping to a faith that doesn't make sense + religion = scope:peasant_leader.religion + any_realm_county = { + percent >= 0.6 + faith = scope:peasant_leader.faith + } + } + culture = scope:peasant_leader.culture + } + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + primary_title = { + set_state_rite = scope:peasant_leader.rite + pam_tenet_popularity_boost_rite_effect = { RITE = state_rite } + } + if = { + limit = { government_has_flag = government_has_influence } + change_influence = monumental_influence_loss + } + else = { + add_prestige_level = -1 + } + add_piety_level = -1 + + ai_chance = { + base = 50 + ai_value_modifier = { + trigger = { + faith != scope:peasant_leader.faith + } + ai_zeal = -1 + min = 0 + } + + compare_modifier = { # Weaker factions increase the chance of an AI ruler refusing; at 80% army strength (minimum), this will be -20; at 200% army strength, this will max out at +50. + value = { + value = scope:faction.faction_power + subtract = 100 + } + max = 50 + } + + modifier = { + add = 50 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + + modifier = { # Don't agree to change the state faith to another religion + factor = 0 + faith.religion != scope:peasant_leader.faith.religion + } + + modifier = { # Byzantium should try to avoid becoming Latin-rite + factor = 0 + primary_title = title:e_byzantium + primary_title.state_rite.faith.religion = scope:peasant_leader.faith.religion + scope:peasant_leader.rite = { + NOT = { rite_has_doctrine = special_doctrine_is_eastern_christian_faith } + } + } + } + } + + # Option B: Grant the faction independence. + option = { + name = "FACTION_DEMAND_POPULIST_ACCEPT_GRANT_INDEPENDENCE" + trigger = { # AI should not give the faction independence if a player is targeted by the faction. + NAND = { + scope:faction = { + has_variable = faction_targets_player + } + is_ai = yes + } + # Only allow this option for governments with state faith it's a cultural populist faction + trigger_if = { + limit = { + government_allows = state_faith + } + primary_title.state_rite = scope:peasant_leader.rite + culture != scope:peasant_leader.culture + } + } + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_prestige_level = -1 + if = { + limit = { + dread > 0 + } + add_dread = medium_dread_loss + } + + successful_popular_revolt_outcome_effect = { + FACTION_LEADER = scope:peasant_leader + TARGET_TITLE = scope:target_title + SOURCE_GOVERNMENT = root + } + + # If the faction includes ALL of our counties, notify the player that it will leave them landless! + if = { + limit = { + any_in_list = { + list = remaining_counties_list + count < 1 + } + } + custom_tooltip = FACTION_DEMAND_POPULIST_ACCEPT_GRANT_INDEPENCE_TT + } + + # Struggle Catalysts. + # Should rename the Catalysts? + if = { + limit = { + is_important_or_vip_struggle_character = yes + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + CHAR = scope:peasant_leader + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + CHAR = scope:peasant_leader + } + } + activate_struggle_catalyst = { + catalyst = catalyst_accepted_demand_from_faction_requesting_culture_faith_conversion + character = root + } + } + } + + hidden_effect = { + if = { + limit = { + exists = scope:faction + } + scope:faction = { + clean_revolt_county_modifiers_from_faction_members_effect = yes + destroy_faction = yes + } + } + } + + ai_chance = { + base = 0 + compare_modifier = { # Stronger factions increase the chance of an AI ruler capitulating; at 200% ruler army strength, this maxes out at +50% chance to accept demands. + value = { + value = scope:faction.faction_power + subtract = 100 + multiply = 0.5 + } + max = 50 + } + compare_modifier = { # Craven rulers can get up to +37% chance to accept demands. + value = ai_boldness + multiplier = -0.5 + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = 25 + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -150 + is_at_war = no + primary_title.tier >= tier_empire + } + + modifier = { + add = -5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + government_allows = state_faith + } + } + } + } + + # Option C: Refuse the demand and start a war. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + government_allows = state_faith + primary_title.state_rite != scope:peasant_leader.rite + } + desc = FACTION_DEMAND_POPULIST_REFUSE_ADMIN + } + desc = FACTION_DEMAND_POPULIST_REFUSE + } + } + } + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + + scope:faction = { + faction_start_war = { + title = scope:target_title + } + } + + custom_tooltip = FACTION_DEMAND_POPULIST_REFUSE_TT + + if = { # Send follow up event to affected vassals. + limit = { + list_size = { + name = popular_faction_vassal_targets + value > 0 + } + } + every_in_list = { + list = popular_faction_vassal_targets + trigger_event = faction_demand.0099 + } + } + + ai_chance = { + base = 100 + compare_modifier = { # Weaker factions increase the chance of an AI ruler refusing; at 80% army strength (minimum), this will be +20; at 200% army strength, this will max out at -50. + value = { + value = scope:faction.faction_power + subtract = 100 + multiply = -1 + } + min = -50 + } + compare_modifier = { # Brave rulers get up to a 50% bonus chance to refuse. + value = ai_boldness + multiplier = -0.5 + min = -50 + } + modifier = { + factor = 1.5 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = -25 + } + modifier = { + add = 5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:peasant_leader = { is_no_men_enabled = yes } + } + } + } + + after = { + if = { + limit = { + exists = scope:faction + scope:faction = { + has_variable = faction_targets_player + } + } + scope:faction = { + remove_variable = faction_targets_player + } + } + } +} + +# Populist Faction Demand - Affected vassals choose their action +faction_demand.0099 = { + type = letter_event + sender = scope:peasant_leader + opening = { + desc = "FACTION_DEMAND_POPULIST" + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = scope:peasant_leader.culture + faith = scope:peasant_leader.faith + } + desc = "FACTION_DEMAND_POPULIST_VASSAL_DESC_SAME_CULTURE_AND_FAITH" + } + triggered_desc = { + trigger = { + culture != scope:peasant_leader.culture + faith = scope:peasant_leader.faith + } + desc = "FACTION_DEMAND_POPULIST_VASSAL_DESC_CULTURE" + } + triggered_desc = { + trigger = { + faith != scope:peasant_leader.faith + culture = scope:peasant_leader.culture + } + desc = "FACTION_DEMAND_POPULIST_VASSAL_DESC_FAITH" + } + desc = "FACTION_DEMAND_POPULIST_VASSAL_DESC" + } + } + + trigger = { + exists = scope:faction + exists = scope:peasant_leader + scope:peasant_leader.joined_faction = scope:faction + } + + immediate = { + scope:faction.faction_war = { + save_scope_as = populist_war + } + } + + # Option A: Convert to the faction's culture/faith and join the rebels. + option = { + name = { + trigger = { + culture = scope:peasant_leader.culture + faith = scope:peasant_leader.faith + } + text = "FACTION_DEMAND_POPULIST_VASSAL_JOIN_REBELS" + } + name = { + trigger = { + NAND = { + culture = scope:peasant_leader.culture + faith = scope:peasant_leader.faith + } + } + text = "FACTION_DEMAND_POPULIST_VASSAL_CONVERTS" + } + trigger = { + # Have to be of the same faith as the faction, or the faith must have a large enough presence in the vassal's realm. + OR = { + faith = scope:peasant_leader.faith + any_realm_province = { + percent >= 0.20 + faith = scope:peasant_leader.faith + } + } + + # Heads of Faith can never convert. + faith.religious_head != root + + # Restrictions to stop the AI converting quite so freely + trigger_if = { + limit = { + is_ai = yes + } + + # May not convert to an unreformed faith from a reformed one. + NAND = { + scope:peasant_leader.faith = { has_doctrine = unreformed_faith_doctrine } + faith = { + NOT = { has_doctrine = unreformed_faith_doctrine } + } + } + + # Must be converting from a low-fervor faith to a higher-fervor faith. + scope:peasant_leader.faith = { fervor >= 31 } + faith = { fervor <= 30 } + + # Zealous rulers do not get the option to change faith. + OR = { + NOT = { has_trait = zealous } + faith = scope:peasant_leader.faith + } + + # Crusaders & Crusader-Monarchs should never accept this. + NOR = { + has_trait = faith_warrior + has_trait = crusader_king + #has_title = title:k_jerusalem + } + } + + # You cannot join the attacking side if you already are at war with another participant. + scope:faction.faction_war = { + NOT = { + any_war_participant = { + is_at_war_with = root + } + } + } + + # You cannot join the attacking side if it would put you against someone you are fighting another war with. + scope:faction.faction_war = { + NOT = { + any_war_defender = { + any_war_ally = { + this = root + } + } + } + } + } + + # Change culture/faith and apply penalties if needed. + if = { + limit = { + culture != scope:peasant_leader.culture + } + set_culture = scope:peasant_leader.culture + add_prestige_level = -1 + } + if = { + limit = { + faith != scope:peasant_leader.faith + } + save_scope_as = convert_at_war + convert_to_rite_with_consequences_effect = { RITE = scope:peasant_leader.rite } + } + + # Join the war. + scope:faction.faction_war = { + add_attacker = root + } + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_CONVERTS_TT + + stress_and_fulfillment_impact = { + zealous = massive_stress_gain + } + + ai_chance = { + base = 0 + + # Want to convert for cultural reasons + modifier = { + add = 10 + OR = { + AND = { + culture = scope:peasant_leader.culture + culture != scope:faction_target.culture + } + AND = { + any_realm_province = { + percent >= 0.40 + culture = scope:peasant_leader.culture + } + culture != scope:faction_target.culture + } + } + } + modifier = { + factor = 0 + culture = { has_cultural_tradition = tradition_staunch_traditionalists } + culture != scope:faction_target.culture + } + + # Want to convert for religious reasons + modifier = { + add = 20 + OR = { + AND = { + faith = scope:peasant_leader.faith + faith != scope:faction_target.faith + } + AND = { + any_realm_province = { + percent >= 0.40 + faith = scope:peasant_leader.faith + } + faith != scope:faction_target.faith + } + } + } + modifier = { + factor = 0 + culture = { has_cultural_tradition = tradition_zealous_people } + faith != scope:peasant_leader.faith + } + modifier = { + factor = 1.5 + culture = { has_cultural_tradition = tradition_religion_blending } + } + modifier = { + factor = 2 + has_trait = zealous + faith = scope:peasant_leader.faith + } + + # General modifiers + modifier = { + factor = 1.25 + has_trait = fickle + } + } + } + + # Option B: Fight alongside your liege. + option = { + name = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR + + # You cannot join the defending side... + trigger = { + custom_tooltip = { # ... If you already are at war with another participant. + text = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_BLOCK_TT + scope:faction.faction_war = { + NOT = { + any_war_participant = { + is_at_war_with = root + } + } + } + } + custom_tooltip = { # ... If it would put you against someone you are fighting another war with. + text = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_BLOCK_TT_2 + scope:faction.faction_war = { + NOT = { + any_war_attacker = { + any_war_ally = { + this = root + } + } + } + } + } + } + show_as_unavailable = { + OR = { + scope:faction.faction_war = { + any_war_participant = { + is_at_war_with = root + } + } + scope:faction.faction_war = { + any_war_attacker = { + any_war_ally = { + this = root + } + } + } + } + } + + # Join the war. + scope:faction.faction_war = { + add_defender = root + } + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_TT + + ai_chance = { + base = 100 + } + } + + # Option C: Do nothing. + option = { + name = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE_TT_A + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE_TT_B + + ai_chance = { + base = 0 + + modifier = { + add = 20 + has_trait = craven + } + } + } +} + +# Spawn rebel reinforcements for popular revolts which successfully capture holdings. +faction_demand.1010 = { + hidden = yes + + trigger = { + has_variable = rebel_leader_peasants + joined_faction = var:rebel_leader_peasants + exists = scope:war + scope:war = { + primary_defender = scope:previous_controller + } + OR = { + scope:county.culture = root.culture + scope:county.religion = root.religion + } + } + + immediate = { + # Spawn the army on the captured province. + spawn_army = { + name = peasant_troops_name + levies = { + value = scope:county.county_levies_to_raise + multiply = 0.5 + } + men_at_arms = { + type = pikemen_militia + stacks = 1 + } + location = scope:barony.title_province + war = scope:war + } + + # Additional loss of county control, can be up to -50 for large counties. + every_in_list = { + list = occupied_baronies + scope:county = { + change_county_control = -10 + } + } + } +} + +################################################## +# Peasant Faction +# by Sean Hughes +# 1101 - 1110 +################################################## + +faction_demand.1101 = { + type = letter_event + sender = scope:peasant_leader + opening = "FACTION_DEMAND_PEASANT" + desc = FACTION_DEMAND_PEASANT_DESC + + trigger = { + exists = scope:faction + exists = scope:peasant_leader + scope:peasant_leader.joined_faction = scope:faction + } + + on_trigger_fail = { + debug_log = "Peasant Faction tried to press claim (probably) without existing peasant_leader" + debug_log_scopes = yes + debug_log = "Peasant Faction error reporting complete" + } + + option = { + name = "FACTION_DEMAND_PEASANT_ACCEPT" + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + peasant_faction_demands_enforced = {FACTION = scope:faction} + + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = -4 + } + modifier = { + add = 50 + scope:faction = { faction_power >= 100 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 110 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 120 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 130 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 140 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = -50 + scope:faction.faction_target = { + is_at_war = no + primary_title.tier >= tier_kingdom + } + } + modifier = { + add = -150 + scope:faction.faction_target = { + is_at_war = no + primary_title.tier >= tier_empire + } + } + modifier = { + add = 10000 + scope:peasant_leader = { is_yes_men_enabled = yes } + } + } + } + + option = { + name = "FACTION_DEMAND_PEASANT_REFUSE" + + scope:faction = { + faction_start_war = {} + + # This needs to run after 'faction_start_war' or the troops won't spawn correctly. + faction_spawn_member_county_armies_effect = { + FACTION = scope:faction + ARMY_OWNER = scope:peasant_leader + PEASANT_ARMY_NAME = peasant_faction_event_troops + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 4 + } + modifier = { + add = 50 + scope:faction = { faction_power < 90 } + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 10000 + scope:peasant_leader = { is_no_men_enabled = yes } + } + } + } +} + +faction_demand.1102 = { + hidden = yes + + trigger = { + is_imprisoned = no + } + + immediate = { + death = { + death_reason = death_vanished + } + } +} + +faction_demand.1110 = { + hidden = yes + + trigger = { + has_variable = rebel_leader_peasants + joined_faction = var:rebel_leader_peasants + exists = scope:war + scope:war = { + primary_defender = scope:previous_controller + } + } + + immediate = { + # Spawn the army on the captured province. + spawn_army = { + name = peasant_troops_name + levies = { + value = scope:county.county_levies_to_raise + multiply = 0.5 + } + men_at_arms = { + type = pikemen_militia + stacks = 1 + } + location = scope:barony.title_province + war = scope:war + } + + # Additional loss of county control, can be up to -70 for large counties. + every_in_list = { + list = occupied_baronies + scope:county = { + change_county_control = -10 + } + } + # Lose an extra -10 county control. + scope:county = { + change_county_control = -10 + } + } +} + +################################################## +# Claimant Faction +# by Ismael Serrano +# 2001 - 2010 +################################################## + +scripted_effect faction_demand_claimant_counter_offer_corule_accepted_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + + custom_tooltip = { + text = faction_demand.0000.truce_from_co_rule + scope:faction = { + every_faction_member = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = scope:faction.faction_target + years = faction_counter_offer_appointed_co_emperor_value + name = ep3_truce_appointed_faction_leader_coruler + } + } + } + } + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + on_claimant_faction_war_win_common = { + TARGET_TITLES = target_titles + ATTACKER = scope:faction.faction_leader + DEFENDER = root + CLAIMANT = scope:faction.special_character + } + + scope:faction = { destroy_faction = yes } +} + +scripted_effect faction_demand_claimant_rejected_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + + show_as_tooltip = { + scope:faction = { + faction_start_war = { title = scope:target_title } + faction_spawn_member_county_armies_effect = { + FACTION = scope:faction + ARMY_OWNER = scope:faction_leader + PEASANT_ARMY_NAME = claimant_faction_event_troops + } + } + } +} + +# Claimant Faction Demand +# by Ismael Serrano +faction_demand.2001 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_CLAIMANT" + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:faction_claimant = scope:faction_leader } + desc = "FACTION_DEMAND_CLAIMANT_DESC_ME" + } + desc = "FACTION_DEMAND_CLAIMANT_DESC" + } + } + + trigger = { + # May have ceased to exist by the time this triggers + exists = scope:faction + } + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + set_variable = { + name = claimant_faction_sent_demand + value = scope:faction_claimant + } + } + + option = { + name = "FACTION_DEMAND_ACCEPT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + scope:faction = { + every_faction_member = { + trigger_event = faction_demand.2002 + } + + special_title = { + add_to_list = target_titles + } + } + + # Admin Emperors lose all their held titles + if = { + limit = { has_realm_law = acclamation_succession_law } + every_held_title = { + # not baronies + title_tier >= county + limit = { + # But not their noble family title, so they can continue playing as LADMIN + NOR = { has_title_law = noble_family_succession_law } + } + add_to_list = target_titles + } + } + + on_claimant_faction_war_win_common = { + TARGET_TITLES = target_titles + ATTACKER = scope:faction.faction_leader + DEFENDER = root + CLAIMANT = scope:faction.special_character + # ATTACKER_PRESTIGE = 0 + # DEFENDER_PRESTIGE = 0 + } + + ai_chance = { + base = 10 + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + factor = 0 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + modifier = { + add = -25 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_empire + } + modifier = { + add = -5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_yes_men_enabled = yes } + } + } + } + + option = { + name = "FACTION_DEMAND_BRIBE_CO_EMPEROR" + show_as_unavailable = { + OR = { + may_appoint_co_emperors_trigger = yes + scope:faction_leader != scope:faction.special_character + } + } + trigger = { + faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = yes + custom_tooltip = { + text = FACTION_DEMAND_BRIBE_CO_EMPEROR_REASON + scope:faction_leader = scope:faction.special_character + } + } + + # Ping-pong the choice back to the target. + ## Laying out the consequences. + show_as_tooltip = { + random_list = { + # They accept! + 100 = { + desc = faction_demand.0000.faction_leader_accepts + show_chance = no + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_claimant_counter_offer_corule_accepted_effect = yes + } + # They decline. + 100 = { + desc = faction_demand.0000.faction_leader_rejects + show_chance = no + faction_demand_claimant_rejected_effect = yes + } + } + } + ## And sorting the actual flow. + scope:faction_leader = { trigger_event = faction_demand.2006 } + + ai_chance = { liege_offer_co_emperorship_to_faction_leader_modifier = yes } + } + + option = { + name = "FACTION_DEMAND_REFUSE" + + faction_demand_claimant_rejected_effect = yes + + scope:faction_leader = { trigger_event = faction_demand.2003 } + + ai_chance = { + base = 100 + compare_modifier = { + trigger = { + ai_boldness > 0 + } + value = ai_boldness + multiplier = 3 + } + compare_modifier = { + trigger = { + ai_boldness < 0 + } + value = ai_boldness + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + modifier = { + add = 5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_no_men_enabled = yes } + } + } + } + + after = { + remove_variable = claimant_faction_sent_demand + } +} + +# Claimant Faction Demand Accepted +# by Ismael Serrano +faction_demand.2002 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_CLAIMANT_ACCEPTED" + } + desc = "FACTION_DEMAND_CLAIMANT_ACCEPTED_DESC" + + option = { + name = "FACTION_DEMAND_ACCEPTED_OPT" + } +} + +# Claimant Faction Demand Refused +# by Ismael Serrano +faction_demand.2003 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_CLAIMANT_REFUSED" + } + desc = "FACTION_DEMAND_CLAIMANT_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + every_faction_member = { + limit = { + this != root # i.e. not faction leader, even when the war disbands the faction + } + trigger_event = faction_demand.2004 + } + + faction_start_war = { + title = special_title + } + + # This needs to occur after the war begins, or the troops can't spawn correctly. + faction_spawn_member_county_armies_effect = { + FACTION = scope:faction + ARMY_OWNER = scope:faction_leader + PEASANT_ARMY_NAME = claimant_faction_event_troops + } + } + } +} + +# Claimant Faction Demand Refused Member Notice +# by Ismael Serrano +faction_demand.2004 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_CLAIMANT_REFUSED" + } + desc = "FACTION_DEMAND_CLAIMANT_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + custom_tooltip = faction_demand.2004.opt_tt + } +} + +# Claimant Faction Demand Send Notice +# by Ismael Serrano +faction_demand.2005 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_CLAIMANT_SEND_DEMAND_NOTIFICATION" + } + desc = "FACTION_DEMAND_CLAIMANT_SEND_DEMAND_NOTIFICATION_DESC" + + option = { + name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" + } +} + +# Co-emperor counter-offer. +faction_demand.2006 = { + type = letter_event + sender = scope:faction_target + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_DESC + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_ACCEPT + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_start_diarchy + title = faction_demand.0000.offer_accepted + show_as_tooltip = { custom_tooltip = faction_demand.0000.enter_co_emperorship } + } + } + scope:faction = { + every_faction_member = { + limit = { + is_ai = no + this != scope:faction_leader + } + trigger_event = faction_demand.9011 + } + } + } + # Actual effects. + scope:faction_target = { + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_claimant_counter_offer_corule_accepted_effect = yes + } + + # Low weight: we control the AI accepting this by toggling whether they can access the refusal option at all. + ai_chance = { base = 20 } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_REJECT + trigger = { faction_leader_would_consider_turning_down_co_emperorship_trigger = yes } + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_war_declared_on_me + title = faction_demand.0000.offer_rejected + show_as_tooltip = { + scope:faction = { custom_tooltip = faction_starts_war.tt.replacement } + } + } + } + } + # Actual effects. + faction_demand_claimant_rejected_effect = yes + + # If the AI can access this at all then they should strongly consider it. + ai_chance = { base = 80 } + } +} + +################################################## +# Ceremonial Claimant Faction +# by Joe Parkin +# 2011 - 2020 +################################################## + +# Ceremonial Claimant Faction Demand +faction_demand.2011 = { + type = letter_event + sender = scope:faction_leader + opening = "FACTION_DEMAND_CEREMONIAL_CLAIMANT" + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:faction_claimant = scope:faction_leader } + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_DESC_ME" + } + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_DESC" + } + } + + trigger = { exists = scope:faction } # May have ceased to exist by the time this triggers + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + set_variable = { + name = ceremonial_claimant_faction_sent_demand + value = scope:faction_claimant + } + } + + option = { + name = "FACTION_DEMAND_ACCEPT" + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + scope:faction = { + every_faction_member = { trigger_event = faction_demand.2012 } + } + on_ceremonial_claimant_faction_war_win_common = { + TITLE = scope:faction.special_title + ATTACKER = scope:faction.faction_leader + DEFENDER = root + CLAIMANT = scope:faction.special_character + } + hidden_effect = { + scope:faction = { destroy_faction = yes } + } + ai_chance = { + base = 10 + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + factor = 0 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + modifier = { + add = -25 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_empire + } + modifier = { + add = -5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + scope:faction.special_character ?= { is_close_family_of = root } + add = 25 + } + modifier = { + scope:faction.special_character.primary_spouse ?= { is_close_family_of = root } + add = 25 + } + } + } + + option = { + name = "FACTION_DEMAND_REFUSE" + faction_demand_claimant_rejected_effect = yes + scope:faction_leader = { trigger_event = faction_demand.2013 } + ai_chance = { + base = 100 + compare_modifier = { + trigger = { + ai_boldness > 0 + } + value = ai_boldness + multiplier = 3 + } + compare_modifier = { + trigger = { + ai_boldness < 0 + } + value = ai_boldness + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + modifier = { + add = 5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + scope:faction.special_title.holder ?= { is_close_family_of = root } + add = -25 + } + modifier = { + scope:faction.special_title.holder.primary_spouse ?= { is_close_family_of = root } + add = -25 + } + } + } + + after = { remove_variable = ceremonial_claimant_faction_sent_demand } +} + +# Ceremonial Claimant Faction Demand Accepted +faction_demand.2012 = { + type = letter_event + sender = scope:faction_target + opening = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_ACCEPTED" + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_ACCEPTED_DESC" + option = { name = "FACTION_DEMAND_ACCEPTED_OPT" } +} + +# Ceremonial Claimant Faction Demand Refused +faction_demand.2013 = { + type = letter_event + sender = scope:faction_target + opening = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_REFUSED" + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + every_faction_member = { + limit = { this != root } # i.e. not faction leader, even when the war disbands the faction + trigger_event = faction_demand.2014 + } + faction_start_war = { title = special_title } + # This needs to occur after the war begins, or the troops can't spawn correctly. + faction_spawn_member_county_armies_effect = { + FACTION = scope:faction + ARMY_OWNER = scope:faction_leader + PEASANT_ARMY_NAME = claimant_faction_event_troops + } + } + } +} + +# Ceremonial Claimant Faction Demand Refused Member Notice +faction_demand.2014 = { + type = letter_event + sender = scope:faction_target + opening = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_REFUSED" + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_REFUSED_DESC" + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + custom_tooltip = faction_demand.2004.opt_tt + } +} + +# Ceremonial Claimant Faction Demand Send Notice +faction_demand.2015 = { + type = letter_event + sender = scope:faction_leader + opening = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_SEND_DEMAND_NOTIFICATION" + desc = "FACTION_DEMAND_CEREMONIAL_CLAIMANT_SEND_DEMAND_NOTIFICATION_DESC" + option = { name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" } +} + +################################################## +# Imperial Policy Faction +# by Joe Parkin +# 0221 - 0230 +################################################## + +scripted_effect faction_demand_imperial_policy_counter_offer_corule_accepted_effect = { + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + add_prestige = -200 + add_character_flag = { + flag = recent_imperial_policy_faction_war + years = 10 + } + custom_tooltip = { + text = faction_demand.0000.truce_from_co_rule + scope:faction = { + every_faction_member = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = scope:faction.faction_target + years = faction_counter_offer_appointed_co_emperor_value + name = ep3_truce_appointed_faction_leader_coruler + } + } + } + } + scope:faction = { destroy_faction = yes } + # This effect should always be placed here, _after_ everything except the ai_chance. + trigger_event = { on_action = on_faction_demand_accepted } +} + +scripted_effect faction_demand_imperial_policy_rejected_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + show_as_tooltip = { + scope:faction = { + custom_tooltip = faction_starts_war.tt.replacement + } + } +} + +# Imperial Policy Demand +faction_demand.0221 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_IMPERIAL_POLICY" + } + desc = "FACTION_DEMAND_IMPERIAL_POLICY_DESC" + + trigger = { + # May have ceased to exist by the time this triggers + exists = scope:faction + } + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + } + + option = { + name = "FACTION_DEMAND_ACCEPT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + add_prestige = -200 + + add_character_flag = { + flag = recent_imperial_policy_faction_war + years = 10 + } + + scope:faction_leader = { + trigger_event = { + id = faction_demand.0222 + } + custom_tooltip = faction_demand.0222.tt + } + + scope:faction = { + destroy_faction = yes + } + + # This effect should always be placed here, _after_ everything except the ai_chance. + trigger_event = { on_action = on_faction_demand_accepted } + + ai_chance = { + base = 10 + modifier = { + add = 90 + scope:faction = { faction_power >= 100 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + add = 50 + any_character_war = { + is_war_leader = root + is_defender = root + } + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_yes_men_enabled = yes } + } + } + } + + option = { + name = "FACTION_DEMAND_BRIBE_CO_EMPEROR" + show_as_unavailable = { may_appoint_co_emperors_trigger = yes } + trigger = { faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = yes } + + # Ping-pong the choice back to the target. + ## Laying out the consequences. + show_as_tooltip = { + random_list = { + # They accept! + 100 = { + desc = faction_demand.0000.faction_leader_accepts + show_chance = no + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_imperial_policy_counter_offer_corule_accepted_effect = yes + } + # They decline. + 100 = { + desc = faction_demand.0000.faction_leader_rejects + show_chance = no + faction_demand_imperial_policy_rejected_effect = yes + } + } + } + ## And sorting the actual flow. + scope:faction_leader = { trigger_event = faction_demand.0226 } + + ai_chance = { liege_offer_co_emperorship_to_faction_leader_modifier = yes } + } + + option = { + name = "FACTION_DEMAND_REFUSE" + + faction_demand_imperial_policy_rejected_effect = yes + + scope:faction_leader = { + trigger_event = { + id = faction_demand.0223 + days = 1 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 4.0 + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + modifier = { + add = 10000 + scope:faction_leader = { is_no_men_enabled = yes } + } + } + } +} + +# Imperial Policy Demand Accepted +faction_demand.0222 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_IMPERIAL_POLICY_ACCEPTED" + } + desc = "FACTION_DEMAND_IMPERIAL_POLICY_ACCEPTED_DESC" + + option = { + name = "FACTION_DEMAND_ACCEPTED_OPT" + custom_tooltip = faction_demand.0222.tt + trigger_event = { + id = faction_demand.0227 + days = 1 + } + } +} + +# Imperial Policy Demand Refused +faction_demand.0223 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_IMPERIAL_POLICY_REFUSED" + } + desc = "FACTION_DEMAND_IMPERIAL_POLICY_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + faction_start_war = {} + + every_faction_member = { + limit = { this != scope:faction.faction_leader } + trigger_event = faction_demand.0224 + } + } + } +} + +# Imperial Policy Demand Refused Member Notice +faction_demand.0224 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_IMPERIAL_POLICY_REFUSED" + } + desc = "FACTION_DEMAND_IMPERIAL_POLICY_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + } +} + +# Imperial Policy Demand Send Notice +faction_demand.0225 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_IMPERIAL_POLICY_SEND_DEMAND_NOTIFICATION" + } + desc = "FACTION_DEMAND_IMPERIAL_POLICY_SEND_DEMAND_NOTIFICATION_DESC" + + option = { + name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" + } +} + +# Co-emperor counter-offer. +faction_demand.0226 = { + type = letter_event + sender = scope:faction_target + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_DESC + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_ACCEPT + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_start_diarchy + title = faction_demand.0000.offer_accepted + show_as_tooltip = { custom_tooltip = faction_demand.0000.enter_co_emperorship } + } + } + scope:faction = { + every_faction_member = { + limit = { + is_ai = no + this != scope:faction_leader + } + trigger_event = faction_demand.9011 + } + } + } + # Actual effects. + scope:faction_target = { + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_imperial_policy_counter_offer_corule_accepted_effect = yes + } + + # Low weight: we control the AI accepting this by toggling whether they can access the refusal option at all. + ai_chance = { base = 20 } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_REJECT + trigger = { faction_leader_would_consider_turning_down_co_emperorship_trigger = yes } + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_war_declared_on_me + title = faction_demand.0000.offer_rejected + show_as_tooltip = { + scope:faction = { custom_tooltip = faction_starts_war.tt.replacement } + } + } + } + } + # Actual effects. + faction_demand_imperial_policy_rejected_effect = yes + + # If the AI can access this at all then they should strongly consider it. + ai_chance = { base = 80 } + } +} + +scripted_trigger imperial_policy_option_trigger = { + NOT = { has_realm_law = $LAW$ } + OR = { + var:page = $PAGE$ + is_ai = yes + } +} + +scripted_effect imperial_policy_option_effect = { + remove_variable = page + top_liege = { add_realm_law = $LAW$ } +} + +# Choose policy +faction_demand.0227 = { + type = character_event + title = faction_demand.0227.t + desc = faction_demand.0227.desc + theme = crown + override_background = { reference = study } + + left_portrait = { + character = scope:faction_leader + animation = war_over_win + } + right_portrait = { + character = scope:faction_target + animation = disapproval + } + + immediate = { + # Fired from the war victory as well as from faction_demand.0222, and the war path carries no faction scopes. + save_scope_as = faction_leader + if = { + limit = { NOT = { exists = scope:faction_target } } + top_liege = { save_scope_as = faction_target } + } + if = { + limit = { + NOT = { exists = var:page } + } + set_variable = { + name = page + value = 0 + } + } + } + + option = { + name = faction_demand.0227.a + trigger = { + imperial_policy_option_trigger = { + LAW = defense_mobilization_law + PAGE = 0 + } + } + imperial_policy_option_effect = { LAW = defense_mobilization_law } + ai_chance = { + base = 0 + modifier = { + top_liege = { + any_war_enemy = { + is_independent_ruler = yes + current_military_strength >= root.top_liege.eighty_percent_of_current_military_strength + } + } + add = 50 + } + modifier = { + government_has_flag = government_is_japan_feudal + add = 10 + } + } + } + + option = { # Disarmament + name = faction_demand.0227.b + trigger = { + imperial_policy_option_trigger = { + LAW = disarmament_law + PAGE = 0 + } + } + imperial_policy_option_effect = { LAW = disarmament_law } + ai_chance = { + base = 0 + modifier = { + government_has_flag = government_is_japan_administrative + add = { + value = 10 + every_neighboring_realm_same_rank_owner = { + limit = { + top_liege = root.top_liege + NOT = { government_has_flag = government_is_japan_administrative } + } + add = 25 + } + } + } + } + } + + option = { + name = faction_demand.0227.c + trigger = { + imperial_policy_option_trigger = { + LAW = isolation_law + PAGE = 0 + } + } + imperial_policy_option_effect = { LAW = isolation_law } + ai_chance = { + base = 0 + modifier = { + add = { + value = 0 + every_character_epidemic = { add = 25 } + } + } + modifier = { + government_has_flag = government_is_japan_feudal + add = 10 + } + } + } + + option = { + name = faction_demand.0227.e + trigger = { + imperial_policy_option_trigger = { + LAW = imperial_expansion_law + PAGE = 1 + } + } + imperial_policy_option_effect = { LAW = imperial_expansion_law } + ai_chance = { + base = 0 + modifier = { + add = { + value = 0 + top_liege = { + every_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + has_any_cb_on = root.top_liege + NOT = { is_allied_to = root.top_liege } + current_power_with_allies_value >= root.top_liege.current_power_with_allies_half_value + } + add = 25 + } + } + } + } + modifier = { + government_has_flag = government_is_japan_feudal + add = 10 + } + } + } + + option = { + name = faction_demand.0227.f + trigger = { + imperial_policy_option_trigger = { + LAW = manor_reform_law + PAGE = 1 + } + } + imperial_policy_option_effect = { LAW = manor_reform_law } + ai_chance = { + base = 0 + modifier = { + government_has_flag = government_is_japan_administrative + add = 10 + } + } + } + + option = { + name = faction_demand.0227.g + trigger = { + imperial_policy_option_trigger = { + LAW = bandit_crackdown_law + PAGE = 2 + } + } + imperial_policy_option_effect = { LAW = bandit_crackdown_law } + ai_chance = { + base = 0 + modifier = { + add = { + value = 0 + every_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + county_control < 75 + } + add = 10 + } + } + } + } + } + + option = { # Turn page + name = faction_demand.0227.i + custom_tooltip = faction_demand.0227.i.tt + if = { + limit = { var:page = 2 } + set_variable = { + name = page + value = 0 + } + } + else = { + change_variable = { + name = page + add = 1 + } + } + trigger_event = faction_demand.0227 + ai_chance = { base = 0 } + } +} + +################################################## +# Nation Fracturing Faction +# by Maxence Voleau +# 1000 - 1009 (but not 1001 or 1010) +################################################## + +scripted_effect faction_demand_nation_fracturing_counter_offer_corule_accepted_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + custom_tooltip = { + text = faction_demand.0000.truce_from_co_rule + scope:faction = { + every_faction_member = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = scope:faction.faction_target + years = faction_counter_offer_appointed_co_emperor_value + name = ep3_truce_appointed_faction_leader_coruler + } + } + } + } + scope:faction = { destroy_faction = yes } +} + +scripted_effect faction_demand_nation_fracturing_rejected_effect = { + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + + show_as_tooltip = { + scope:faction = { + custom_tooltip = faction_starts_war.tt.replacement + } + } +} + +# Nation Fracturing demands +faction_demand.1000 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_COLLAPSE" + } + desc = "FACTION_DEMAND_COLLAPSE_DESC" + + trigger = { + # May have ceased to exist by the time this triggers + exists = scope:faction + } + + immediate = { + # Grab our scope for loc. + save_scope_as = faction_target + } + + option = { + name = "FACTION_DEMAND_ACCEPT" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_dread = medium_dread_loss + # LEGITIMACY LOSS FOR ACCEPTING FACTION DEMANDS + faction_accept_demand_legitimacy_effect = yes + + # We are doing this before the create_title_and_vassal_change as the scope:change will be stored as a event_target for the faction_demand.1002 and cause an "OOS" - Title and vassal changes should be resolved in the same tick + scope:faction = { + every_faction_member = { + trigger_event = faction_demand.1002 + } + } + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + + scope:faction = { + every_faction_member = { + change_liege_or_become_independent = { + CHANGE = scope:change + VASSAL = this + } + + hidden_effect = { + save_scope_as = recipient # Ensuring it localizes correctly + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_GRANT_INDEPENDENCE + } + + # Struggle Catalysts. + if = { + limit = { + catalyst_gave_independence_to_powerful_diff_faith_culture_vassal_preliminary_trigger = { + CHAR1 = root + CHAR2 = scope:recipient + } + any_character_struggle = { + involvement = involved + activate_struggle_catalyst_secondary_character_involvement_involved_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + } + every_character_struggle = { + involvement = involved + limit = { + activate_struggle_catalyst_secondary_character_involvement_either_trigger = { + CATALYST = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + CHAR = scope:recipient + } + } + activate_struggle_catalyst = { + catalyst = catalyst_gave_independence_to_powerful_diff_faith_culture_vassal + character = root + } + } + } + } + } + } + + every_vassal = { + limit = { is_ai = no } + send_interface_toast = { + type = event_faction_neutral_text + title = liege_primary_title_dissolution + desc = liege_primary_title_dissolution_desc + left_icon = root + } + } + + resolve_title_and_vassal_change = scope:change + + every_held_title = { + limit = { + tier = prev.primary_title.tier + } + add_to_temporary_list = titles_to_destroy + } + + every_in_list = { + list = titles_to_destroy + holder = { + destroy_title = prev + } + } + + add_prestige = { + value = medium_prestige_value + multiply = -1 + } + + ai_chance = { + base = 1 + modifier = { + add = 99 + scope:faction = { faction_power >= 100 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 125 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 150 } + } + modifier = { + add = 50 + scope:faction = { faction_power >= 200 } + } + modifier = { + add = 100 + scope:faction = { faction_power >= 300 } + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = 25 + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -150 + is_at_war = no + primary_title.tier >= tier_empire + } + modifier = { + add = -5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_yes_men_enabled = yes } + } + } + } + + option = { + name = "FACTION_DEMAND_BRIBE_CO_EMPEROR" + show_as_unavailable = { may_appoint_co_emperors_trigger = yes } + trigger = { faction_target_can_attempt_to_bribe_with_co_emperorship_trigger = yes } + + # Ping-pong the choice back to the target. + ## Laying out the consequences. + show_as_tooltip = { + random_list = { + # They accept! + 100 = { + desc = faction_demand.0000.faction_leader_accepts + show_chance = no + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_nation_fracturing_counter_offer_corule_accepted_effect = yes + } + # They decline. + 100 = { + desc = faction_demand.0000.faction_leader_rejects + show_chance = no + faction_demand_nation_fracturing_rejected_effect = yes + } + } + } + ## And sorting the actual flow. + scope:faction_leader = { trigger_event = faction_demand.1006 } + + ai_chance = { liege_offer_co_emperorship_to_faction_leader_modifier = yes } + } + + option = { + name = "FACTION_DEMAND_REFUSE" + + faction_demand_nation_fracturing_rejected_effect = yes + + scope:faction_leader = { + trigger_event = faction_demand.1003 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 4.0 + } + modifier = { + add = 50 + scope:faction = { faction_power < 80 } + } + modifier = { + add = 100 + scope:faction = { faction_power < 60 } + } + modifier = { + add = 1000 + scope:faction = { faction_power < 40 } + } + compare_modifier = { + value = debt_level + multiplier = -25 + } + modifier = { + add = 5000 + OR = { + mpo_has_gok_mongol_empire_trigger = yes + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:faction_leader = { is_no_men_enabled = yes } + } + } + } +} + +# Nation Fracturing Demand Accepted +faction_demand.1002 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_COLLAPSE_ACCEPTED" + } + desc = "FACTION_DEMAND_COLLAPSE_ACCEPTED_DESC" + + option = { + name = "FACTION_DEMAND_ACCEPTED_OPT" + custom_tooltip = faction_demand.1002.tt + } +} + +# Nation Fracturing Demand Refused +faction_demand.1003 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_COLLAPSE_REFUSED" + } + desc = "FACTION_DEMAND_COLLAPSE_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + scope:faction = { + faction_start_war = {} + + every_faction_member = { + limit = { this != scope:faction.faction_leader } + trigger_event = faction_demand.1004 + } + } + } +} + +# Independence Faction Demand Refused Member Notice +faction_demand.1004 = { + type = letter_event + sender = scope:faction_target + opening = { + desc = "FACTION_DEMAND_COLLAPSE_REFUSED" + } + desc = "FACTION_DEMAND_COLLAPSE_REFUSED_DESC" + + option = { + name = "FACTION_DEMAND_REFUSED_OPT" + } +} + +# Independence Faction Demand Send Notice +faction_demand.1005 = { + type = letter_event + sender = scope:faction_leader + opening = { + desc = "FACTION_DEMAND_COLLAPSE_SEND_DEMAND_NOTIFICATION" + } + desc = "FACTION_DEMAND_COLLAPSE_SEND_DEMAND_NOTIFICATION_DESC" + + option = { + name = "FACTION_DEMAND_SEND_DEMAND_NOTIFICATION_OPT" + } +} + +# Co-emperor counter-offer. +faction_demand.1006 = { + type = letter_event + sender = scope:faction_target + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_DESC + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_ACCEPT + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_start_diarchy + title = faction_demand.0000.offer_accepted + show_as_tooltip = { custom_tooltip = faction_demand.0000.enter_co_emperorship } + } + } + scope:faction = { + every_faction_member = { + limit = { + is_ai = no + this != scope:faction_leader + } + trigger_event = faction_demand.9011 + } + } + } + # Actual effects. + scope:faction_target = { + faction_demand_counter_offer_co_rule_start_diarchy_effect = yes + faction_demand_nation_fracturing_counter_offer_corule_accepted_effect = yes + } + + # Low weight: we control the AI accepting this by toggling whether they can access the refusal option at all. + ai_chance = { base = 20 } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_CORULE_REJECT + trigger = { faction_leader_would_consider_turning_down_co_emperorship_trigger = yes } + + # Inform the relevant parties. + hidden_effect = { + scope:faction_target = { + send_interface_toast = { + type = msg_war_declared_on_me + title = faction_demand.0000.offer_rejected + show_as_tooltip = { + scope:faction = { custom_tooltip = faction_starts_war.tt.replacement } + } + } + } + } + # Actual effects. + faction_demand_nation_fracturing_rejected_effect = yes + + # If the AI can access this at all then they should strongly consider it. + ai_chance = { base = 80 } + } +} + +################################################## +# Faction Edgecases +# by various +# 9001 - 9050 +################################################## + +# Faction declares a retaliatory war. +faction_demand.9001 = { + type = character_event + title = faction_demand.9001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + is_imprisoned = yes + imprisoner = scope:actor + } + } + desc = FACTION_SUCCESSFUL_IMPRISONMENT_RETALIATION + } + desc = FACTION_FAILED_IMPRISONMENT_RETALIATION + } + desc = FACTION_IMPRISONMENT_RETALIATION_END + } + theme = war + override_background = { + trigger = { + scope:recipient = { + is_imprisoned = yes + imprisoner = scope:actor + } + } + reference = dungeon + } + left_portrait = { + character = scope:actor + animation = schadenfreude + } + right_portrait = { + character = scope:recipient + animation = anger + } + + trigger = { + exists = scope:retaliating_faction + } + + immediate = { + show_as_tooltip = { + scope:retaliating_faction = { + faction_start_war = {} + } + } + } + + option = { + name = FACTION_IMPRISONMENT_RETALIATION_OPT + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + } +} + +# Co-emperor counter-offer. +faction_demand.9011 = { + type = letter_event + sender = scope:faction_leader + opening = FACTION_DEMAND_COUNTER_OFFER_CORULE_MEMBER_NOTIFICATION + desc = FACTION_DEMAND_COUNTER_OFFER_CORULE_MEMBER_NOTIFICATION_DESC + + immediate = { + show_as_tooltip = { + scope:faction_target = { faction_demand_counter_offer_co_rule_start_diarchy_effect = yes } + scope:faction = { destroy_faction = yes } + } + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_MEMBER_NOTIFICATION.A + + # No need for AI chance or stress, just a notification event. + } + + option = { + name = FACTION_DEMAND_COUNTER_OFFER_MEMBER_NOTIFICATION.B + trigger = { is_ai = no } + + cancel_truce_both_ways = scope:faction_target + reverse_add_opinion = { + target = scope:faction_target + modifier = refusal_opinion + opinion = -40 + } + change_strife_opinion = major_strife_gain + + # Player-only choice. + } +} + +################################################## +# Nomadic Faction +################################################## + +# Nomadic Faction Demand +faction_demand.9998 = { + type = letter_event + sender = scope:peasant_leader + opening = { + desc = "FACTION_DEMAND_NOMADIC" + } + desc = FACTION_DEMAND_NOMADIC_DESC + + trigger = { + exists = scope:faction + exists = scope:peasant_leader + scope:peasant_leader.joined_faction = scope:faction + } + + immediate = { + every_realm_province = { + county = { add_to_list = remaining_counties_list } + } + scope:faction = { + every_faction_county_member = { + remove_from_list = remaining_counties_list + duchy = { + every_de_jure_county = { + limit = { + is_in_list = remaining_counties_list + } + remove_from_list = remaining_counties_list + } + } + } + } + scope:peasant_county.duchy = { save_scope_as = nomad_main_duchy } + } + + # Option A: Grant the faction independence. + option = { + name = "FACTION_DEMAND_NOMADIC_ACCEPT_GRANT_INDEPENDENCE" + trigger = { # AI should not give the faction independence if a player is targeted by the faction. + NAND = { + scope:faction = { + has_variable = faction_targets_player + } + is_ai = yes + } + } + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_accepted } + + add_prestige_level = -1 + if = { + limit = { + dread > 0 + } + add_dread = medium_dread_loss + } + + successful_nomadic_revolt_outcome_effect = { + FACTION_LEADER = scope:peasant_leader + } + + # If the faction includes ALL of our counties, notify the player that it will leave them landless! + if = { + limit = { + any_in_list = { + list = remaining_counties_list + count < 1 + } + } + custom_tooltip = FACTION_DEMAND_POPULIST_ACCEPT_GRANT_INDEPENCE_TT + } + + hidden_effect = { + if = { + limit = { + exists = scope:faction + } + scope:faction = { + clean_revolt_county_modifiers_from_faction_members_effect = yes + destroy_faction = yes + } + } + } + + ai_chance = { + base = 0 + compare_modifier = { # Stronger factions increase the chance of an AI ruler capitulating; at 200% ruler army strength, this maxes out at +50% chance to accept demands. + value = { + value = scope:faction.faction_power + subtract = 100 + multiply = 0.5 + } + max = 50 + } + compare_modifier = { # Craven rulers can get up to +37% chance to accept demands. + value = ai_boldness + multiplier = -0.5 + } + modifier = { + factor = 0.1 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = 25 + } + modifier = { + add = -50 + is_at_war = no + primary_title.tier >= tier_kingdom + } + modifier = { + add = -150 + is_at_war = no + primary_title.tier >= tier_empire + } + + modifier = { + add = -5000 + OR = { + #has_title = title:e_mongol_empire + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + government_allows = state_faith + } + } + modifier = { + add = 10000 + scope:faction_leader ?= { is_yes_men_enabled = yes } + } + } + } + + # Option B: Refuse the demand and start a war. + option = { + name = "FACTION_DEMAND_POPULIST_REFUSE" + + # This effect should always be placed here, _before_ all the other effects in the block. + trigger_event = { on_action = on_faction_demand_rejected } + + scope:faction = { + faction_start_war = { + title = scope:nomad_main_duchy + } + } + + custom_tooltip = FACTION_DEMAND_POPULIST_REFUSE_TT + + if = { # Send follow up event to affected vassals. + limit = { + list_size = { + name = nomadic_faction_vassal_targets + value > 0 + } + } + every_in_list = { + list = nomadic_faction_vassal_targets + limit = { + is_ai = no + } + trigger_event = faction_demand.9999 + } + } + + ai_chance = { + base = 100 + compare_modifier = { # Weaker factions increase the chance of an AI ruler refusing; at 80% army strength (minimum), this will be +20; at 200% army strength, this will max out at -50. + value = { + value = scope:faction.faction_power + subtract = 100 + multiply = -1 + } + min = -50 + } + compare_modifier = { # Brave rulers get up to a 50% bonus chance to refuse. + value = ai_boldness + multiplier = -0.5 + min = -50 + } + modifier = { + factor = 1.5 + any_ally = { + NOR = { + target_is_liege_or_above = root + target_is_vassal_or_below = root + } + max_military_strength > root.max_military_strength + } + } + compare_modifier = { + value = debt_level + multiplier = -25 + } + modifier = { + add = 5000 + OR = { + #has_title = title:e_mongol_empire + #has_title = title:e_ilkhanate + #has_title = title:e_golden_horde + #has_title = title:e_chagatai + #has_title = title:e_red_horde + #has_title = title:e_white_horde + #has_title = title:e_aarlud_khanate + #has_title = title:e_togskol_khanate + #has_title = title:e_baruun_khanate + #has_title = title:e_great_yuan + #has_title = title:e_blue_horde + #has_title = title:e_omnod_dalai_khanate + has_title = title:e_byzantium + has_variable = conqueror + } + } + modifier = { + add = 10000 + scope:peasant_leader = { is_no_men_enabled = yes } + } + } + } + + after = { + if = { + limit = { + exists = scope:faction + scope:faction = { + has_variable = faction_targets_player + } + } + scope:faction = { + remove_variable = faction_targets_player + } + } + } +} + +# Nomadic Faction Demand - Affected vassals choose their action +faction_demand.9999 = { + type = letter_event + sender = scope:peasant_leader + opening = { + desc = "FACTION_DEMAND_NOMADIC" + } + desc = FACTION_DEMAND_NOMADIC_VASSAL_DESC + + trigger = { + exists = scope:faction + exists = scope:peasant_leader + scope:peasant_leader.joined_faction = scope:faction + } + + immediate = { + scope:faction.faction_war = { + save_scope_as = populist_war # Used for loc + } + } + + # Option A: Fight alongside your liege. + option = { + name = FACTION_DEMAND_NOMADIC_VASSAL_JOIN_WAR + + # You cannot join the defending side... + trigger = { + custom_tooltip = { # ... If you already are at war with another participant. + text = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_BLOCK_TT + scope:faction.faction_war = { + NOT = { + any_war_participant = { + is_at_war_with = root + } + } + } + } + custom_tooltip = { # ... If it would put you against someone you are fighting another war with. + text = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_BLOCK_TT_2 + scope:faction.faction_war = { + NOT = { + any_war_attacker = { + any_war_ally = { + this = root + } + } + } + } + } + } + show_as_unavailable = { + OR = { + scope:faction.faction_war = { + any_war_participant = { + is_at_war_with = root + } + } + scope:faction.faction_war = { + any_war_attacker = { + any_war_ally = { + this = root + } + } + } + } + } + + # Join the war. + scope:faction.faction_war = { + add_defender = root + } + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_JOIN_WAR_TT + + ai_chance = { + base = 100 + } + } + + # Option B: Do nothing. + option = { + name = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE_TT_A + custom_tooltip = FACTION_DEMAND_POPULIST_VASSAL_TAKE_NO_SIDE_TT_B + + ai_chance = { + base = 0 + + modifier = { + add = 20 + has_trait = craven + } + } + } +} diff --git a/events/religion_events/local_shrine_events.txt b/events/religion_events/local_shrine_events.txt new file mode 100644 index 000000000..8ec8467a6 --- /dev/null +++ b/events/religion_events/local_shrine_events.txt @@ -0,0 +1,790 @@ +######################## +# Rites in Local Shrine +######################## +namespace = local_rites +#shrine_location = Where we perform the rites (AKA the destination) + +scripted_trigger has_two_local_shrine_options_trigger = { + # Stops after we've found 2 good places for a sacrifice (don't want to overload the player). + calc_true_if = { + amount >= 2 + exists = scope:hills_location + exists = scope:mountains_location + exists = scope:temple_holding_location + exists = scope:forest_location + exists = scope:point_of_interest_location + exists = scope:mount_tai_location + } +} + +scripted_effect local_shrine_at_location_effect = { + set_variable = { + name = shrine_location + value = scope:$SHRINE$_location + } + scope:$SHRINE$_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + start_travel_plan = { + destination = var:shrine_location + on_travel_planner_cancel_event = local_rites.10 + on_arrival_event = local_rites.2 + on_arrival_destinations = all_but_last + } + add_character_modifier = { + modifier = visit_local_shrine_modifier + days = local_shrine_duration + } + add_character_flag = { + flag = local_shrine_rite + years = 1 #This is a fallback, it is also cleared at location + } +} + +# If the player exits the travel planning UI, this event fires reseting the decision cooldown and removing variables +local_rites.10 = { + hidden = yes + trigger = { + OR = { + exists = var:shrine_location + has_character_flag = local_shrine_rite + } + } + immediate = { + current_travel_plan ?= { cancel_travel_plan = yes } + remove_decision_cooldown = visit_local_shrine_decision + remove_variable = shrine_location + remove_character_flag = local_shrine_rite + } +} + +local_rites.1 = { + type = character_event + title = local_rites.1.t + desc = local_rites.1.desc + theme = faith + + override_background = { + reference = throne_room + } + + left_portrait = { + character = root + animation = personality_rational + } + + immediate = { + # Stop characters from planning multiple activities at once. + add_character_flag = { + flag = planning_an_activity + days = 30 + } + + capital_barony.title_province = { + save_scope_as = capital_location + } + + # Pick out possible locations + # First any Special Building Shrines + # If I am the Emperor of China I go to Mount Tai + #if = { + # limit = { + # #I am the emperor + # has_title = title:h_china + # #My dynasty did not perform this sacrifice before + # dynasty = { + # NOT = { has_variable = fengshan_performed } + # } + # #The Cycle is stable + # OR = { + # situation:dynastic_cycle = { + # situation_current_phase = situation_dynastic_cycle_phase_stability_expansion + # } + # situation:dynastic_cycle = { + # situation_current_phase = situation_dynastic_cycle_phase_stability_advancement + # } + # } + # title:b_qianfeng = { + # this != root.capital_barony + # holder.top_liege = root + # } + # } + # title:b_qianfeng = { + # title_province = { save_scope_as = mount_tai_location } + # } + #} + # Everyone else + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + #Now we look for Mountains + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + title_province = { save_scope_as = mountains_location } + } + } + #Now we look for any Temple Holding + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + has_holding_type = church_holding + } + } + title_province = { save_scope_as = temple_holding_location } + } + } + #Now we look for Hills + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = hills + terrain = terraced_hills + } + } + } + title_province = { save_scope_as = hills_location } + } + } + #Any Forests? + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + title_province = { save_scope_as = forest_location } + } + } + #If we found nothing we look to the top realm + if = { + limit = { + NOT = { exists = scope:point_of_interest_location } #Because this is the one we try to save. + has_two_local_shrine_options_trigger = no + } + top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + #We also try this a second time for landless vassals. + if = { + limit = { + has_two_local_shrine_options_trigger = no + NOT = { exists = scope:point_of_interest_location } + } + top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + #And last but not least we try to save one for adventurers + if = { + limit = { + has_two_local_shrine_options_trigger = no + NOT = { exists = scope:point_of_interest_location } + exists = location.county + } + location.county.holder.top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + } + + # Option 1: Rituals at home - Low Impact + option = { #This option does not set the flag for being unavailable + name = local_rites.1.home + set_variable = { + name = shrine_location + value = scope:capital_location + } + add_character_modifier = { + modifier = visit_local_shrine_modifier + days = local_shrine_duration + } + scope:capital_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + custom_tooltip = local_rites.1.home.tt + trigger_event = local_rites.3 #When you sacrifice at home this is instant. + } + + # I am the Emperor Headed for Mt Tai + option = { + trigger = { + exists = scope:mount_tai_location + scope:mount_tai_location.barony = title:b_qianfeng + } + name = local_rites.1.mount_tai + local_shrine_at_location_effect = { SHRINE = mount_tai } + custom_tooltip = local_rites.1.fengshan.tt + } + # Visit Famous Shrine - High Impact, High Offering Expectation + option = { + trigger = { exists = scope:point_of_interest_location } + name = local_rites.1.major_shrine + local_shrine_at_location_effect = { SHRINE = point_of_interest } + custom_tooltip = local_rites.1.major_shrine.tt + } + + # Shrine in the hills. Medium Impact + option = { + trigger = { exists = scope:hills_location } + name = local_rites.1.hills + local_shrine_at_location_effect = { SHRINE = hills } + } + + # Shrine in the forest. Medium Impact + option = { + trigger = { exists = scope:forest_location } + name = local_rites.1.forest + local_shrine_at_location_effect = { SHRINE = forest } + } + + # Shrine in the mountains. Medium Impact + option = { + trigger = { exists = scope:mountains_location } + name = local_rites.1.mountains + local_shrine_at_location_effect = { SHRINE = mountains } + } + + # Shrine in the temple holding - High Impact, High Offerings. + option = { + trigger = { exists = scope:temple_holding_location } + name = local_rites.1.temple_holding + local_shrine_at_location_effect = { SHRINE = temple_holding } + custom_tooltip = local_rites.1.major_shrine.tt + } + + # Option 3: Opt-out + option = { + name = local_shrine.optout + flavor = local_shrine.optout.flavor + + ai_chance = { + base = 0 + } + + remove_decision_cooldown = visit_local_shrine_decision + } + + after = { + remove_character_flag = planning_an_activity + trigger_event = local_rites.5 + } +} + +local_rites.5 = { + hidden = yes + immediate = { + hidden_effect = { + random_courtier = { #We want to bring a priest if we can, if not we still want at least one character. + limit = { + is_adult = yes + is_clergy = yes + is_diarch = no + is_travelling = no + } + alternative_limit = { + is_adult = yes + is_diarch = no + is_travelling = no + } + save_scope_as = companion + } + if = { + limit = { exists = scope:companion } + current_travel_plan ?= { + add_companion = scope:companion + } + } + } + } +} + +local_rites.2 = { + hidden = yes + immediate = { + send_interface_toast = { + title = local_rites.2.toast + left_icon = root + current_travel_plan = { + delay_travel_plan = { days = local_shrine_duration } + } + } + trigger_event = { + id = local_rites.3 + days = local_shrine_duration + } + } +} + +local_rites.3 = { #Destination - Making a Sacrifice + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + desc = local_rites.3.t.fengshan #Feng Shan + } + triggered_desc = { + trigger = { + OR = { + OR = { + faith = { is_in_family = rf_sinitic } + faith = faith:mahayana_faith + } + } + } + desc = local_rites.3.t #Sacrificing to Heaven + } + desc = local_rites.3.fallback.t #More Generic Version + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:at_home = yes } + desc = local_rites.3.desc_at_home + } + triggered_desc = { + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + desc = local_rites.3.desc_mt_tai_huangdi + } + triggered_desc = { + trigger = { + var:shrine_location = { + has_building_with_flag = travel_point_of_interest_religious + } + } + desc = local_rites.3.desc_important_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + has_holding_type = church_holding + } + } + desc = local_rites.3.desc_holding_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + desc = local_rites.3.desc_mountain_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + desc = local_rites.3.desc_forest_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + terrain = hills + } + } + desc = local_rites.3.desc_hills_shrine + } + } + triggered_desc = { + trigger = { + has_trait = cynical + } + desc = local_rites.3.desc_cynical + } + } + theme = faith + override_background = { #Fengshan + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + reference = mpo_steppe_evening + } + override_background = { + trigger = { scope:at_home = yes } + reference = tgp_temple_asia + } + override_background = { + trigger = { + scope:at_home = no + scope:shrine_location = { + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_holding_type = church_holding + } + } + } + reference = tgp_holysite_asia + } + override_background = { + trigger = { + scope:at_home = no + scope:shrine_location = { + NOR = { + has_building_with_flag = travel_point_of_interest_religious + has_holding_type = church_holding + } + } + } + reference = wilderness_scope + } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:companion + animation = pondering + } + + immediate = { + + if = { #First we try to get a travel companion + limit = { + current_travel_plan ?= { + any_entourage_character = { + NOT = { this = root } + is_adult = yes + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + NOT = { this = root } + is_clergy = yes + is_adult = yes + } + alternative_limit = { + NOT = { this = root } + is_adult = yes + } + save_scope_as = companion + } + } + } + else_if = { #If you are travelling without adult companions we get a courtier/follower. + limit = { + any_courtier = { + is_adult = yes + } + } + random_courtier = { + limit = { + is_adult = yes + is_clergy = yes + } + alternative_limit = { + is_adult = yes + } + save_scope_as = companion + } + } + else = { #Your court is somehow also empty. If we get here it is going to be a bit weird. But we shouldn't. + random_pool_character = { + province = root.location + limit = { + is_adult = yes + } + save_scope_as = companion + } + } + + if = { + limit = { + NOT = { + exists = var:shrine_location + } + } + set_variable = { + name = shrine_location + value = root.location + } + } + var:shrine_location = { + save_scope_as = shrine_location + save_scope_as = background_wilderness_scope + } + + # Are we at home? + if = { + limit = { + exists = capital_province + scope:shrine_location = root.capital_province + } + save_scope_value_as = { + name = at_home + value = yes + } + } + else = { + save_scope_value_as = { + name = at_home + value = no + } + } + + #Are we at Mt Tai? Am I the Emperor? + if = { + limit = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + hidden_effect = { + dynasty = { set_variable = fengshan_performed } + } + } + } + + option = { + name = fengshan_option + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + add_treasury = { + value = major_treasury_value + multiply = -1 + } + add_prestige = massive_prestige_loss + add_legitimacy = massive_legitimacy_gain + add_piety = major_piety_gain + } + option = { + name = local_rites.3.pay_gold + trigger = { + scope:at_home = no + NOR = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + } + #Pay Gold - Get Piety + switch = { + trigger = exists + scope:hills_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:mountains_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:temple_holding_location = { + remove_short_term_gold = medium_gold_value + add_piety = major_piety_gain + } + scope:forest_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:shrine_location = { + remove_short_term_gold = medium_gold_value + add_piety = major_piety_gain + } + } + } + option = { + name = local_rites.3.pay_prestige + trigger = { + scope:at_home = no + NOR = { + has_title = title:h_china + var:shrine_location.barony = title:b_qianfeng + } + } + #Pay Prestige - Get Piety + switch = { + trigger = exists + scope:hills_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:mountains_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:temple_holding_location = { + add_prestige = medium_prestige_loss + add_piety = major_piety_gain + } + scope:forest_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:shrine_location = { + add_prestige = medium_prestige_loss + add_piety = major_piety_gain + } + } + } + option = { + name = local_rites.3.pay_at_home #So be it + trigger = { + scope:at_home = yes + } + #Pay A little Gold - Get Piety + remove_short_term_gold = miniscule_gold_value + add_piety = minor_piety_gain + remove_character_flag = local_shrine_rite + } + + after = { + stress_and_fulfillment_impact = { #Not the main purpose of the trip but the ritual comes with some stress relief + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + # Run the clean-up event. + if = { + limit = { + scope:at_home = no + } + trigger_event = { + id = local_rites.1000 + days = 30 + } + } + else = { + remove_variable = shrine_location + } + } +} + +local_rites.1000 = { + hidden = yes + immediate = { + send_interface_toast = { + title = religious_decision.0291.toast + left_icon = root + current_travel_plan ?= { + if = { + limit = { is_paused = yes } + resume_travel_plan = yes + } + } + } + remove_variable = shrine_location + remove_character_flag = local_shrine_rite + } +} diff --git a/gfx/interface/illustrations/scripted_illustrations/ingame.txt b/gfx/interface/illustrations/scripted_illustrations/ingame.txt index 6c4fef539..09c07b758 100644 --- a/gfx/interface/illustrations/scripted_illustrations/ingame.txt +++ b/gfx/interface/illustrations/scripted_illustrations/ingame.txt @@ -2116,7 +2116,7 @@ character_view_bg = { trigger = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2126,7 +2126,7 @@ character_view_bg = { trigger = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2140,7 +2140,7 @@ character_view_bg = { exists = primary_spouse primary_spouse = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2148,7 +2148,7 @@ character_view_bg = { exists = betrothed betrothed = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2156,7 +2156,7 @@ character_view_bg = { liege.diarch ?= this liege ?= { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2173,7 +2173,7 @@ character_view_bg = { trigger = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_mecca + #involved_activity.activity_location.county = title:c_mecca location ?= involved_activity.activity_location } } @@ -2183,7 +2183,7 @@ character_view_bg = { trigger = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_mecca + #involved_activity.activity_location.county = title:c_mecca location ?= involved_activity.activity_location } } @@ -2197,7 +2197,7 @@ character_view_bg = { exists = primary_spouse primary_spouse = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_mecca + #involved_activity.activity_location.county = title:c_mecca location ?= involved_activity.activity_location } } @@ -2205,7 +2205,7 @@ character_view_bg = { exists = betrothed betrothed = { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } } @@ -2213,7 +2213,7 @@ character_view_bg = { liege.diarch ?= this liege ?= { involved_activity ?= { has_activity_type = activity_pilgrimage } - involved_activity.activity_location.county = title:c_jerusalem + #involved_activity.activity_location.county = title:c_jerusalem location ?= involved_activity.activity_location } }